昨日深夜在 Firefox Add-ons 網站上找些測試網站下載速度的工具時,無意中見到 SQLite Manager,是 Firefox 的 Add-on, 可以讓你在 Firefox/Mozilla 直接維護管理 SQLite 資料庫。

原來是 Firefox 2 逐漸將 Mork 換成以 SQLite 為基礎的 mozStorage (Gecko 1.9 之後),現在如 Cookies, FormHistory, Search, Downloads 等都已經是存在 SQLite 中。

於是 Mrinal Kant 利用 mozStorage APIs 與 XUL 刻了一個 Firefox extension, 支援了以下功能

  • dialogs for creation, deletion of tables, indexes, views and triggers
  • ability to rename, copy, reindex tables
  • ability to add and drop columns
  • create new db, open any existing db, copy an existing db
  • a tab for database settings (no need to write the pragma statements) where you can view and change the sqlite library settings
  • export tables/views as csv or xml files
  • import tables from csv or xml files
  • a dropdown menu showing all profile db (*.sqlite)
  • an intuitive heirarchical tree showing all tables, indexes, views and triggers
  • ability to browse data from any table
  • dialogs to allow searching in a table
  • allows editing and deleting selected record while browsing a table’s data
  • an extensive menu that helps with writing sql by hand and then executing it
  • remembers the last used db, table and the tab (structure, browse & search, etc.) across sessions

如此已經足以應付一般的基本操作了,可以暫時丟掉 SQLite Database Browser。程式原始碼可以於 MozDev 下載。

令我感興趣的是,顯然已經到時間用 XUL/mozStorage 刻單機版的小資料庫軟體,比 HTML 5Client-side session and persistent storage of name/value pairs 還令我興奮一點。