Accessing the Zotero SQLite db with multiple clients

Hi,

I'm taking over a documentation base that has been created with Zotero.
Organisation being growing, we need to have several people recording information at the same time, and on the other hand, we also need to provide an access to the database to other clients, typically other software layers.

Is there an existing API that would allow access without using the Zotero plugin?

I'm not familiar with SQLite. It's apparently a 'serverless' db engine.
Does it explain why the SQLite file is restricted to one access. It can't be multiuser right?

Any advice welcome. I'm looking for a direction to take.
thanks for your help.
Jean
  • I highly recommend that you use Zoteros group library features and online synchronization instead of trying to use the same database file for different users. You cannot have the same database open in multiple Zotero clients without code changes to Zotero. While the actual change to disable DB locking is small, you will most likely end up with a corrupted database if the DB is written to by may clients simultanously.

    For accessing Zotero data from other software, see Zotero API documentation.

    http://www.zotero.org/support/dev/server_api
  • thanks for your answer.

    As I understand from my reading, the supported way to share a Zotero base is to go through Sync and Groups.

    We're using Zotero in a small office for our documentation references. Unfortunately, with all the Pdfs we have, we're close to a 10Gb base already. And this is only a start.

    Sync can't be an option for us, all our computer seat next to each others and besides, we are in a country where fast connections are not available. It doesn't make sense to go through the web to sync computers within an office.

    So what are we left with?
    You're saying disabling DB locking is an option?
    That sounds like the most promising option to us.

    From what I've read about SQLite, it seems it's able to handle multi read, and multi write but sequentially only. Which is a non blocker, as we won't update so often.
    But I mean, SQLite engine itself handle the blocking for concurrent writes, so it seems to be a safe usage. DB should not possibly get corrupted.

    Are there some experience sharing available on disabling DB locking?

    How do you do that?

    Is Zotero actually open source? Is the source code available?

    Looking at the news on Zotero's site, it seems that the direction is to base everything on Zotero's online server, so that you can access your base from mobile, browsers, from anywhere.

    What about big sized base like we have, what's the plan to handle big volumes?
    Does our case fall outside of the scope?

    cheers
  • no. You do not want to unlock your SQlite. That's just insane & it wouldn't work the way you seem to think it does in the first place.

    Of course Zotero is actually open source.
    http://www.zotero.org/support/dev/svn_and_trac_access
    has the code.

    Your use case is certainly within what Zotero sync can handle, it's just that for other reasons you don't want to use it, which is fine.

    Some people have tried to set-up local versions of Zotero server. The source code is here:
    https://www.zotero.org/trac/browser/dataserver?order=name
    here are some user-generated instructions
    http://www.zotero.org/support/dev/dataserver_setup
    note that there is absolutely no official support for this.

    You could also use Zotfile and link files instead of storing them in Zotero. Zotero data sync is free and you could link the files to a local network drive.
  • What mronkko and adamsmith said. None of what you read about SQLite locking applies to Zotero. Zotero does not support multi-user access to the local Zotero database.

    Linking to external files and using Zotero syncing for the metadata is likely your best option.
  • As for accessing the data using other layers of your environment, I'm not sure exactly what you mean, but there are already clients for working with the Zotero server API for PHP[1] and Python[2], so you can have services communicate with the API that way. There's even a Python library[3] that provides read-only access to libraries by reading from the Sqlite database.

    _1: https://github.com/fcheslack/libZotero (which Zotero.org uses)
    _2: http://packages.python.org/Pyzotero/
    _3: http://www.cogsci.nl/blog/tutorials/97-writing-a-command-line-zotero-client-in-9-lines-of-code
Sign In or Register to comment.