How to import data
Hi,
for a little programming project i need to know how Zotero is import data and structureing it. My Professor said i had to use the Zotero database sheme for the project since it is a really good one.
What i have to do is write scripts do import data about scientific papers into my own database. So basically i copied the sheme of Zotero and set up my own database on mysql. Now i am thinking of how to tell the Script / Parser how to import the data. For example: How does Zotero know to put the String "Year 2012" into the column "published-year"? I searched over Zotero-Code on Github but i haven't found anything yet.
Can you please tell me where i can find the way Zotero is doing this so i am able to use this code as a little tip for my own programming project?
Thank you!
for a little programming project i need to know how Zotero is import data and structureing it. My Professor said i had to use the Zotero database sheme for the project since it is a really good one.
What i have to do is write scripts do import data about scientific papers into my own database. So basically i copied the sheme of Zotero and set up my own database on mysql. Now i am thinking of how to tell the Script / Parser how to import the data. For example: How does Zotero know to put the String "Year 2012" into the column "published-year"? I searched over Zotero-Code on Github but i haven't found anything yet.
Can you please tell me where i can find the way Zotero is doing this so i am able to use this code as a little tip for my own programming project?
Thank you!
You should probably check this project to see if there is any code that you can reuse.
http://www.cogsci.nl/software/qnotero
https://github.com/smathot/qnotero
What i mean is that i am trying to build an own import script to take Data from scientific Databases and put them into my own database. One example: The database pubmed is an open database which got basic bibliographic data about thousands of articles from medical background. So if i tell my script to import the data of 1000 medical articles from pubmed into my own database how does that work? How does my script know which pubmed data needs to be stored exactly where in my own database?
This: http://eutils.ncbi.nlm.nih.gov/entrez/eutils/efetch.fcgi?db=pubmed&id=1
does export the basic bibliographic data of the article with id one in XML format to my php script. So i got all that stored in my php script in the variable $xml. But how do i tell my script to "put the value of the published year" into my database to the corresponding field? How does the script find matches? I tried to pull it off my own and started to write an own php parser but its really hard to get it working. For that i wanted to see how Zotero is doing it and maybe i can resuse some of zoteros code.
Thanks for your links i will check them now.
http://www.zotero.org/support/dev/translators/coding
Also, you can check the Zotero source in the github to see how it constructs the database. See these files in the Zotero source code.
/system.sql
/triggers.sql
/userdata.sql
For the second possibility i searched for the system, triggers and userdata.sql and found them. Then i went to my phpmyadmin executing their sql code. system.sql worked, the other 2 not. I am getting a huge pile of bugs trying to execute them.
Is there anyone outside who is kind enough to post me the complete and valid SQL code which i just need to execute in my phpmyadmin to get a blank zotero database? If not so what else should i do to get it? As i said it's not possible for me to start Zotero standalone client on this PC and i searched google for a long time now - no one ever posted the SQL Code for this. What shall i do?
https://github.com/zotero/zotero/tree/3.0
The Zotero database is built in sqlite. You may have problems building a database with the SQL source files in another SQL engine (I don't know, but there may well be sqlite-specific stuff in there).
It's not quite clear what your task is. Has your professor set you a training task to build a bibliographic storage container based on PHP, or are you looking for the least-effort path to build a working system with particular characteristics? If the latter, what are the requirements?
Recasting the Zotero database management layer in a completely different language would probably take several years of effort. You probably don't want to go there.