Can I use a external SQL database?

As the entries in Zotero increasing, Firefox spends more time at startup. Now it takes about five minutes for startup. Can I use a external SQL database, such as mysql or sqlite, as a backend of Zotero?
  • If you read through the forums, you'll see that the startup time is not a function of the database (which *is* SQLite). It's the UI: the JS-based sorting of the table, etc.
  • I know it. I think the sorting might be avoided with a SQL backend. Then the stratup time could be saved much.
  • We use SQLite as a backend, as Bruce said, but we can't do sorting in the DB, at least until mozStorage supports user-defined functions and collation sequences (or until SQLite has a serviceable Unicode collation algorithm, as much as such a thing is possible)—and even then it'd be quite a pain. In the JS layer we have automatic collation support based on the current locale (theoretically, at least, though I don't know how well it works for, say, Chinese) and a consistent interface to the fields being pulled, which in some cases need special handling before sorting.

    We're constantly looking for ways to optimize Zotero's performance, however, and have plans to speed things up for larger collections.
  • edited July 11, 2007
    Thank you! Maybe for now, the best solution is stoping Zotero when it isn't need. :(

    And for your information, Zotero has some problem with Chinese. My locale is zh_CN.UTF-8. I have a test once. I input a Chinese entry manually and it can be displayed properly. Then I export the entry and import it back. All the fields of the imported entry become "????".
  • Maybe for now, the best solution is stoping Zotero when it isn't need.
    Well, there shouldn't be a delay on Firefox startup, just when Zotero is first opened. In an upcoming version Zotero will remember the last used collection, so it might be possible to skip most of the delay that happens when loading all the items in the library by simply using smaller collections most of the time.
    And for your information, Zotero has some problem with Chinese. My locale is zh_CN.UTF-8. I have a test once. I input a Chinese entry manually and it can be displayed properly. Then I export the entry and import it back. All the fields of the imported entry become "????".
    Export to which format?
  • export to bibtex
  • There is one more advantage to use external SQL engine - you may use the same database on different machines - OK it is now possible - but only if you set up the Zotero directory on remote machine and mount a remote file system to local directory. When we use external SQL engine It maybe probably even possible to use the same database in a multiuser, semisimultaneus way, so we are able to build one bibliographic database for a working group/ lab /project team etc.

    Another nice thing will be to log to different databases on SQL server and join all the biblio-data in one collection in Zotero.
  • We use mozStorage for the DB. mozStorage uses SQLite. We're not going to implement another DB engine. Sorry.

    As you note, you can run Zotero off a network drive (or via sshfs, etc.) now. It's not supported, but it should work. As long as only one person has Firefox open at a time, it could be used by multiple users. We'll add a locking mechanism in the future to help enforce this. Note that using a direct DB connection wouldn't change the one-user-at-a-time limitation, so using a different database wouldn't help.

    But that doesn't mean the features you want won't be possible. Multi-computer usage is planned for 1.5. Collaborative usage is planned for 2.0. They just won't happen via SQL.
Sign In or Register to comment.