This is an old revision of the document!


Direct Access to the Zotero SQLite Database

While it is generally preferable to access Zotero library data via either the Web API or JavaScript API, it is also possible to directly access the SQLite database of the Zotero client using a SQLite client, library or third-party tool.

However, when externally accessing the SQLite database (this includes access via the mozStorage API), one should be extremely careful to avoid database corruption. Corruption can easily occur when modifying the database while Firefox is running, as mozStorage caching breaks the normal SQLite file-locking that allows concurrent file access to be done safely. Even if Firefox is shut down before accessing the database file, modifying the database bypasses data validation and referential integrity checks performed by Zotero or the Zotero server when an API is used. For this reason, access the database as read-only if possible.

Also be aware that the SQLite database structure can change between Zotero releases.

dev/client_coding/direct_sqlite_database_access.1302983807.txt.gz ยท Last modified: 2011/04/16 15:56 by rmzelle