9

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?

Patrick Hoefler
  • 5,790
  • 4
  • 31
  • 47
  • 4
    Probably, you will find the answer in the official github of CKAN. https://github.com/ckan/ckan – Tasos Jun 02 '14 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. – WeSee Sep 27 '19 at 14:11

1 Answers1

6

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

Andrew - OpenGeoCode
  • 8,657
  • 17
  • 28
  • This file is probably closest to what you're looking for: https://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. – James McKinney Feb 21 '15 at 14:28