What is the status of HTML5 Database?
Asked Answered
U

3

13

This spec http://www.w3.org/TR/webdatabase/ says:

This document was on the W3C Recommendation track but specification work has stopped. The specification reached an impasse: all interested implementors have used the same SQL backend (Sqlite), but we need multiple independent implementations to proceed along a standardisation path.

Does this mean that HTML5 database is going away, and for some time we will have a de-facto standard using SQLite, possibly with browser differences? Or has the W3C published a plan of attack for finishing the standard?

Undercut answered 18/1, 2011 at 4:53 Comment(1)
Status: Proposal implemented by Google and Apple, and killed by Microsoft and Mozilla (aka not implemented because "the users don't want it" [=if Microsoft would implement it, you could do fast fulltext-search in gMail], which is something MS doesn't want you to be able to do because you should use and pay for MS Outlook]). As usual. "Replaced" by IndexedDB, which is really not a relational DB, but an object-oriented NoSQL Key-Value document store. Which is pointless, since the interface is too complicated, and all JavaScript objects already are associative arrays.Halibut
U
5

According to this article:

[...] we think it is worth explaining our design choices, and why we think IndexedDB is a better solution for the web than Web SQL Database.

In another article, we compare IndexedDB with Web SQL Database, and note that the former provides much syntactic simplicity over the latter. IndexedDB leaves room for a third-party JavaScript library to straddle the underlying primitives with a BTree API, and we look forward to seeing initiatives like BrowserCouch built on top of IndexedDB. Intrepid web developers can even build a SQL API on top of IndexedDB. We’d particularly welcome an implementation of the Web SQL Database API on top of IndexedDB, since we think that this is technically feasible. Starting with a SQL-based API for use with browser primitives wasn’t the right first step, but certainly there’s room for SQL-based APIs on top of IndexedDB.

I'm not personally swayed by the arguments put forth in the article, but it seems clear that (for the time being) Mozilla has decided that Web SQL Database is dead.

Further interesting comments about this article may be found on Hacker News.

Undercut answered 18/1, 2011 at 17:0 Comment(1)
Thanks to @a_horse_with_no_name for the original article that linked me to more relevant discussion.Undercut
L
4

My understanding is that this is now called "IndexedDB"
http://www.w3.org/TR/IndexedDB/

Apparently the Firefox team has started implementing this:
http://hacks.mozilla.org/2011/01/indexeddb-in-firefox-4/

Lynx answered 18/1, 2011 at 11:18 Comment(2)
IndexedDB is a lesser standard, but does appear to be the successor proper. Thanks for the helpful links.Undercut
See in particular Example 4 in this article comparing IndexedDB to Web SQL. Look closely at the crazy code needed to perform a LEFT JOIN.Undercut
T
1

I don't know if anyone knows the answer. Mozilla doesn't like the dependence upon SQLite and has decided to go a different way. However, all WebKit based browsers already have it implemented and I don't see them removing it as any websites built to take advantage of the spec would be broken.

This means that at least in certain contexts, mostly within the mobile sphere where most browsers have a webkit implementation, it can still makes sense to use the HTML5 Web SQL spec. I see this as especially true for developers who are looking to create mobile applications using a framework like phonegap.

There are some times where as an application developer you want to provide users with access to data even if they aren't connected to the internet or if the connection is slow and some types of data is just more efficiently stored in a database than in a cookie or JSON cashe. For example, if you have data that has relationships it is much easier and quicker to do a join query to pull the data you need than it is to search a json map.

I don't think the spec is dead, and I actually hope that Mozilla will reverse their stance so that developers can use it to solve problems outside of the mobile webkit world.

Totaquine answered 9/9, 2011 at 17:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.