Can I connect Zotero database via the API (read-only) to a (relational?) database for further tags?

Hi,

I have a database on police reform and am building a team project to collate and score the evidence.

The collation bit is relatively simple. I've set up a Group Library and team members can use that to organise the evidence.

The team is also scoring the evidence by its quality. I don't want that to be public, so I don't want to do it via tags, plus that'd probably be restrictive anyhow, as we are likely to want to manipulate the data and I don't want to mess with the SQ lite database.

My 'solution' thus far (nb I'm not a programmer) is to create a second database (a relational one, I think) which draws from Zotero, read-only, and then team members can add extra data to the bibliographic data (ie scores). I'm not quite sure what the best way of doing that is. I think I can create a second database, or get a developer to, and take data from Zotero via the API. I'd welcome any advice: is that plausible and what's the simplest way of doing it?

This thread provides some guidance (https://forums.zotero.org/discussion/76572/can-anyone-recommend-a-simple-relational-database-software-not-access), but was for a local copy. My team is dispersed internationally and I don't want to have to manage version control around downloading csv files, if possible. Linking two databases via an API seems plausible but I'm not sure and would like to know the art of the possible.

Best,

Liam
  • If you're committed to using a separate database, an easy approach would be to just store the JSON from the web API by item key in a database and add additional properties as necessary. Pulling updates one way is trivial with ?since=.

    You could massage it into a relational database (which is where it comes from in Zotero), but there's no real reason for that unless you really need complex joins and such. Probably easier to use a document-based database like MongoDB, or a relational DB used just as a key-value store, perhaps with a JSON extension.
  • Ah. Thanks. A friend advised I might be better off using a python script to get the Zotero db into google sheets, then I could add further data in there. That would be handy as I'd quite like to manipulate the data in google sheets (using Data Studio). Not sure how possible/practical it is but I'll look into both.
  • Yeah, that's a good idea. I've never worked with Google Sheets programmatically, so I don't know how straightforward that is, but if there's a good Python API that could be pretty easy.

    One way or another, if the existing items might be updated after creation you'd want to use ?since= (or whatever pyzotero's interface to that is) to pull updates and merge those into the data store, preserving any custom properties you've added.
  • (there are excellent API libraries for Google Sheets in python, yes)
Sign In or Register to comment.