|Google Lovefield Relational Query Engine|
|Written by Kay Ewbank|
|Friday, 21 November 2014|
The case for a SQL data store for web development is an interesting one. Developers can make use of Web Storage, but that’s limited to key-value storage. An alternative is Indexed DB, but it is again object-and lacks traditional relational database features. Earlier versions of Google Chrome used to support the W3C’s WebSQL Database API, but work on this stopped because all the implementations that used WebSQL used SQLite as the back end, and the W3C said that “we need multiple independent implementations to proceed along a standardization path.”
The language of Lovefield is a rather limited subset of SQL that lets you write select, insert, update, and delete queries, and provides atomicity for transactions. You can make use of integrity constraint checks using primary keys, unique values, and specify whether columns can be null or not. Aggregation operators include count, min, max, sum, avg, stddev, and distinct. The Select operator can have a Group by clause, and you can set up multi-table joins.
Google says that Lovefield includes a query optimizer that will evaluate different execution plans and pick the most promising. On the Google Open Source blog, Demetrios Papadopoulos of the Chrome team states:
“We are confident that current performance will satisfy the majority of use cases (less than 50k rows) and we plan to further improve the performance for larger datasets in the near future.”
Papadopoulos also says that Google is working to provide more advanced features such as foreign keys, cascaded delete/update, self-table join, and observers/data-binding “ in the near future”. There are no plans to add more advanced SQL features such as views, cursors, triggers and subqueries.
According to the blog post, Lovefield is already powering a few Google services, including Google Play Movies Chrome app. The team hopes that by releasing the library to other developers, they’ll enable the development of data-rich applications, and attract interest and feedback from developers. The feedback will be used in working out how to move forward with the project.
To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter, Facebook, Google+ or Linkedin, or sign up for our weekly newsletter.
or email your comment to: firstname.lastname@example.org
|Last Updated ( Friday, 21 November 2014 )|