HTML5数据库的状况如何?[英] What is the status of HTML5 Database?



这个规范 说:


本文档在 W3C 推荐轨道上,但规范工作已停止.规范陷入僵局:所有感兴趣的实现者都使用相同的 SQL 后端(Sqlite),但我们需要多个独立的实现来沿着标准化路径前进.

这是否意味着 HTML5 数据库正在消失,并且在一段时间内我们将拥有使用 SQLite 的事实上的标准,可能与浏览器不同?还是 W3C 发布了完成标准的攻击计划?




[...] 我们认为值得解释我们的设计选择,以及为什么我们认为 IndexedDB 是比 Web SQL 数据库更好的 Web 解决方案.

在另一篇文章中,我们比较 IndexedDB 和 Web SQL 数据库,并注意前者比后者提供了更多的语法简单性.IndexedDB 为第三方 JavaScript 库留出了空间,可以使用 BTree API 跨越底层原语,我们期待看到像 BrowserCouch 这样的举措建立在 IndexedDB 之上.无畏的 Web 开发人员甚至可以在 IndexedDB 之上构建 SQL API.我们特别欢迎在 IndexedDB 之上实现 Web SQL 数据库 API,因为我们认为这在技术上是可行的.从用于浏览器原语的基于 SQL 的 API 开始并不是正确的第一步,但在 IndexedDB 之上当然还有基于 SQL 的 API 的空间.

我个人并不被文章中提出的论点所左右,但似乎很明显(目前)Mozilla 已经决定 Web SQL 数据库已死.




This spec 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?


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.