

Let's see how different.Īssume for a minute we would have a relational database with a schema called "chemistry" and a table called "chemical_element". It's like the query is mirrored in the result. Symmetry between Query and ResultIn the previous example, we just saw that the query and its result have a similar structure.

Differences between MQL and SQLEven this simple example reveals a lot about the differences between MQL and SQL. This query specifies null for almost all other properties, and because null is a special placeholder for scalar values, the query engine responds by retrieving the values for those keys and returns them in the result. Because chemcical elements are identified by name (there are more properties that can identify a chemical element, name is just one of them), this query will match the same object in Freebase. For now, consider the following JSON representation of the chemical element Oxygen: If you execute this query, you get a result that is essentially the same as the previous one. In fact, the sample object we discussed in previous section about JSON is nearly a valid MQL query. MQL QueriesA MQL query is either a JSON object, or a JSON array of objects. Which implements a MQL service for relational database systems.

In a third article, I will discuss the mql-to-sql project, The topic of this installment is the MQL database query language and how it compares to SQL. The my previous post, I covered some background information on modern web applications, JavaScript and JSON. However, with MQL-to-SQL, a project that provides a SQL adapter for MQL, you can run MQL queries against any RDBMS with a SQL interface. MQL is not a standard database query language, and currently only natively supported by Freebase. The conference will be held April 11-14 2011 in the Hyatt Regency hotel in Santa Clara, California.Ībstract: MQL is a JSON-based database query language that has some very interesting features as compared to SQL, especially for modern ( AJAX) web-applications.
Json query language series#
This is the second article in a series to provide some background to my talk for the MySQL User's conference.
