I'm doing some research and I would like to learn how CKAN manages data, in particular, I would like to learn its database scheme. Do you know where I can find it?
-
4Probably, you will find the answer in the official github of CKAN. github.com/ckan/ckan– TasosJun 2, 2014 at 12:15
-
The links in the answers are broken. And the question is about 4 years old. Is there any update to CKAN database scheme? Come on, some tables cannot be so hard to draw an entity-realtionship model of.– WeSeeSep 27, 2019 at 14:11
1 Answer
CAVEAT: I am not an experienced user of the CKAN software.
From reviewing the online documentation, it appears that CKAN supports storing data in two methods: FileStore and DataStore. FileStore is storing and retrieving an entire datasets (e.g., CSV file, PDF document, etc). It does not involve a database.
The Datastore uses what they call an ad-hoc database for storing and querying individual elements of a structured dataset. In one mode, it appears to be fairly generic, creating a table and entries based on the column names in the structured data, and supporting an API query based on the column names.
http://docs.ckan.org/en/1117-start-new-test-suite/datastore.html
I believe it has more advanced capabilities and relationships in the structured data is linked data or RDF and is constructed using a vocabulary supported by CKAN, which include the Dublin Core, DCAT, VoID and SCOVO.
http://docs.ckan.org/en/1117-start-new-test-suite/linked-data-and-rdf.html
-
This file is probably closest to what you're looking for: github.com/ckan/ckan/blob/master/ckan/logic/schema.py Otherwise, you can just install CKAN, run its migrations, and then dump its database schema. Feb 21, 2015 at 14:28