Connect Zotero to an external SQL database

I already have a hosting provider which gives me access to essentially an unlimited SQL database. I also have access to a large amount of space which could be used for storing PDFs.

Is it somehow possible to connect Zotero to an external SQL database hosted on my domain?

I would like to allow other users to connect to the SQL database and sync with it. I would also ideally like to be able to sync the PDFs somehow so that everyone can access them in my private group (something that Zotero doesnt offer with their storage option).
  • Is it somehow possible to connect Zotero to an external SQL database hosted on my domain?
    I'm not sure what you're thinking that would actually do — the Zotero dataserver is a lot more complicated than just an SQL server — but no, nothing like that exists.
    I would also ideally like to be able to sync the PDFs somehow so that everyone can access them in my private group (something that Zotero doesnt offer with their storage option).
    I don't know what you mean by that. The whole point of groups is to allow shared access to data and files.
  • I would just like to sync the bib file across multiple computers. Similar to what Jabref allows.

    I dont need the full funcitonality of the Zotero server, just syncing of (at least) the bib file
  • Obviously there is no bib file for Zotero -- that's just an export option -- but as dstillman says, no, what you're asking isn't possible and isn't likely to be possible any time soon if ever.
  • Would it not be possible to create an add-on which would generate a bib file, communicate with an external server, extract and upload new entries and download to the local Zotero client?
  • edited March 4, 2020
    I'd start with a different question: what's the problem with using Zotero's own sync more specifically? It's still unclear to me which problem(s) you're trying to solve (not saying there aren't any -- it's really just not clear)
  • Okay, sure. Sorry for not explaining myself clearer. I would like to create a shared group library across a group of around 20 people. Some of these people have a strong preference about which reference manager they would like to use. I believe it would be possible to convince the majority to use either Jabref or Zotero. (I think I would have a hard time convincing everyone to use Zotero.)

    My hope is that I can create a "neutral" external database which will allow each user in the group to sync the external database with their client of choice (Jabref / Zotero). If I use the Zotero groups I am limited (1) by the number of references (2) by the inability to sync with Jabref.
  • For (2), you'd have to effectively rebuild sync infrastructure to integrate two products with completely different sync models and data structures. That's obviously theoretically possible -- Zotero syncs via its API and so you can do anything Zotero sync does with your own server, but you're looking at a pretty massive amount of pretty complex work then.

    (Note that there is no limit on the number of references in a Zotero group, so (1) doesn't apply)
  • edited March 5, 2020
    I'm not even sure about theoretical possibility if you care even remotely about reliability. Consider I create a bib file with entries A, B and C, go offline, you in the meantime delete entry C from the central copy, and I come back online. I see a bib file with only A and B, I have A, B and C locally.

    I could conclude I have added an entry C not yet synced to the central bib file and re-add it, but it could also have been that entry C was deleted from the central file and I should delete my local C.

    File times are not reliably comparable across systems, so you can't reliably tell which of the two scenarios hold. You could add a version to each separate entry but you'd still have to deal with the inevitable race conditions that would ensue because there's no locking.

    Not even JabRef tries this (probably because the devs value their sanity somewhat), and it is entirely centered around bibtex.

    edit: oh sorry, you meant wrapping a server around the central bib file? OK, that makes it theoretically possible, but indeed a ton of complex work, and he'd have to modify both Zotero and JabRef to talk to this server.

    Your realistic options as far as I can tell are
  • Hi,
    I have been working with some bibliometric tools, specifically CiteSpace. The problem is that compatibility wise, I haven't been able to correctly import any Output Style from Zotero. The creator told me that the best would be to load the data to MySQL@localhost and try to use their References > Resolve. The thing is that I'm not sure how to to do such a thing: ZOTERO references -> MySQL db?
    Is it possible to do it a simple manner, I am far from knowing much programming.
    Thank you for your attention.
  • One-way sync is simple. I have a skeleton sync library that does one-way sync leaving the program that uses it to implement storage (in this case, saving to a mysql DB)
Sign In or Register to comment.