Domain Model/Dataset
From CKAN
| Deprecated. This page is deprecated and should no longer be used. It has been wholly or partially replaced by http://docs.ckan.org/en/latest/domain-model-dataset.html |
A Dataset (known as a (Data) Package in CKAN <=1.4) is the object representing datasets in CKAN and, as such, is the central domain object.
When you retrieve a Dataset in the CKAN API it will automatically include information from most related objects including Tags, Resources, Relationships, Ratings etc.
Schema
- id: unique id
- name (slug): unique name that is used in urls and for identification
- title: short title for dataset
- url (home page): home page for this dataset
- author: original creator of the dataset
- author_email:
- maintainer: current maintainer or publisher of the dataset
- maintainer_email:
- license: license under which the dataset is made available
- version: dataset version
- notes (description): description and other information about the dataset
- tags: arbitrary textual tags for the dataset
- state: state of dataset in CKAN system (active, deleted, pending)
- resources: list of Resources
- groups: list of Groups this dataset is a member of
- "extras" - arbitrary, unlimited additional key/value fields
The schema in code (see default_package_schema): https://github.com/okfn/ckan/blob/master/ckan/logic/schema.py
Background
The CKAN Dataset was originally heavily based on the kind of packaging information provided for software but with some modifications. One of our aims is to keep things simple and as generic as possible as we have data from a lot of different domains.
Thus we've tried to keep the core metadata pretty restricted but allow for additional info either via tags or via "extra" arbitrary key/value fields. So very roughly:
- unique name
- title
- url + download url
- author/maintainer info
- license
- notes
- tags
- [extendable with "extra" fields]
Example
Here's the result of accessing the 'ckan' dataset (the list of all datasets in ckan.net) via the API (http://thedatahub.org/api/2/rest/dataset/ckan):
{
"author": null,
"author_email": null,
"ckan_url": "http://thedatahub.org/dataset/ckan",
"extras": {
"links:2000-us-census-rdf": "1",
"links:austrian_ski_racers": "1",
"links:bbc-music": "1",
"links:bbc-programmes": "1",
"links:bbc-wildlife-finder": "1",
"links:bibbase": "1",
"links:business-data-gov-uk": "1",
"links:chronicling-america": "4",
"links:ckan": "3",
"links:cornetto": "2",
"links:data-gov-uk-time-intervals": "4",
"links:data-incubator-discogs": "1",
"links:data-incubator-moseley": "1",
"links:data-incubator-musicbrainz": "3",
"links:data-incubator-nasa": "1",
"links:data-incubator-pokedex": "1",
"links:data-open-ac-uk": "3",
"links:dbpedia": "3",
"links:dbpedia-lite": "1",
"links:dbtropes": "1",
"links:dbtune-artists-last-fm": "1",
"links:dcs-sheffield": "3",
"links:dnb-gemeinsame-normdatei": "4",
"links:ecs": "2",
"links:education-data-gov-uk": "2",
"links:enakting-co2emission": "1",
"links:enakting-mortality": "1",
"links:enakting-population": "1",
"links:environment-data-gov-uk": "1",
"links:environmental-applications-reference-thesaurus": "1",
"links:esd-standards": "2",
"links:eurostat-ontologycentral": "1",
"links:eurostat-rdf": "3",
"links:event-media": "1",
"links:fishes-of-texas": "2",
"links:flickr-wrappr": "1",
"links:fu-berlin-eurostat": "1",
"links:gemeenschappelijke-thesaurus-audiovisuele-archieven": "2",
"links:geonames-semantic-web": "1",
"links:geospecies": "1",
"links:gesis-thesoz": "1",
"links:govtrack": "1",
"links:hungarian-national-library-catalog": "4",
"links:iserve": "1",
"links:john-goodwins-family-tree": "1",
"links:knoesis-linked-sensor-data": "1",
"links:lexvo": "1",
"links:linked-open-numbers": "1",
"links:linkedlccn": "2",
"links:london-gazette": "1",
"links:lotico": "2",
"links:marc-codes": "2",
"links:my-experiment": "2",
"links:national-diet-library-subject-headings": "1",
"links:opencalais": "3",
"links:openlibrary": "1",
"links:openlylocal": "1",
"links:ordnance-survey-linked-data": "2",
"links:patents-data-gov-uk": "1",
"links:printed-book-auction-catalogues": "1",
"links:rdfize-lastfm": "1",
"links:rechtspraak": "1",
"links:reference-data-gov-uk": "2",
"links:research-data-gov-uk": "1",
"links:revyu": "1",
"links:rkb-explorer-acm": "1",
"links:rkb-explorer-budapest": "1",
"links:rkb-explorer-citeseer": "1",
"links:rkb-explorer-cordis": "1",
"links:rkb-explorer-courseware": "1",
"links:rkb-explorer-curriculum": "1",
"links:rkb-explorer-darmstadt": "1",
"links:rkb-explorer-dblp": "1",
"links:rkb-explorer-deepblue": "1",
"links:rkb-explorer-deploy": "1",
"links:rkb-explorer-dotac": "1",
"links:rkb-explorer-eprints": "1",
"links:rkb-explorer-era": "1",
"links:rkb-explorer-eurecom": "1",
"links:rkb-explorer-ft": "1",
"links:rkb-explorer-ibm": "1",
"links:rkb-explorer-ieee": "1",
"links:rkb-explorer-irit": "1",
"links:rkb-explorer-jisc": "1",
"links:rkb-explorer-kisti": "1",
"links:rkb-explorer-laas": "1",
"links:rkb-explorer-newcastle": "1",
"links:rkb-explorer-nsf": "1",
"links:rkb-explorer-oai": "1",
"links:rkb-explorer-pisa": "1",
"links:rkb-explorer-rae2001": "1",
"links:rkb-explorer-resex": "1",
"links:rkb-explorer-risks": "1",
"links:rkb-explorer-roma": "1",
"links:rkb-explorer-southampton": "1",
"links:rkb-explorer-ulm": "1",
"links:rkb-explorer-unlocode": "1",
"links:rkb-explorer-wiki": "1",
"links:rkb-explorer-wordnet": "1",
"links:semantic-xbrl": "1",
"links:statistics-data-gov-uk": "1",
"links:stw-thesaurus-for-economics": "2",
"links:surge-radio": "1",
"links:t4gm-info": "1",
"links:talis-openlibrary": "3",
"links:taxonconcept": "6",
"links:telegraphis": "1",
"links:the-view-from": "1",
"links:transport-data-gov-uk": "3",
"links:uberblic": "1",
"links:ugent_biblio": "1",
"links:uk-legislation-api": "1",
"links:uk-postcodes": "1",
"links:university-plymouth-reading-lists": "1",
"links:uriburner": "2",
"links:viaf": "1",
"links:vivo-cornell-university": "2",
"links:vivo-indiana-university": "2",
"links:vivo-university-of-florida": "2",
"links:vu-wordnet": "2",
"links:zbw-pressemappe20": "3",
"links:zitgist-musicbrainz": "1",
"triples": "50000"
},
"groups": [],
"id": "e1d0ba33-5772-44b8-bea7-c7436d98f65c",
"license": "OKD Compliant::Open Data Commons Open Database License (ODbL)",
"license_id": "odc-odbl",
"maintainer": "Open Knowledge Foundation and Community",
"maintainer_email": "ckan-discuss@lists.okfn.org",
"metadata_created": "2007-04-10T21:19:38",
"metadata_modified": "2011-05-12T21:42:14.888405",
"name": "ckan",
"notes": null,
"notes_rendered": "",
"ratings_average": 4.2000000000000002,
"ratings_count": 5,
"relationships": [],
"resources": [
{
"description": "",
"format": "json",
"hash": "",
"id": "78668dba-a8bd-40d8-bb46-58799ddd2682",
"package_id": "e1d0ba33-5772-44b8-bea7-c7436d98f65c",
"position": 0,
"resource_group_id": "3d982089-1f91-08e0-481b-a51b8a969f61",
"url": "http://www.ckan.net/dump/ckan.net-daily.json.gz"
},
{
"description": "SPARQL Endpoint",
"format": "api/sparql",
"hash": "",
"id": "9d54933b-e76e-41e3-85b7-0a191d778173",
"package_id": "e1d0ba33-5772-44b8-bea7-c7436d98f65c",
"position": 1,
"resource_group_id": "3d982089-1f91-08e0-481b-a51b8a969f61",
"url": "http://semantic.ckan.net/sparql"
},
{
"description": "RDF/XML",
"format": "application/rdf+xml",
"hash": "",
"id": "afbd9592-b482-4210-868c-907f105da5c3",
"package_id": "e1d0ba33-5772-44b8-bea7-c7436d98f65c",
"position": 2,
"resource_group_id": "3d982089-1f91-08e0-481b-a51b8a969f61",
"url": "http://semantic.ckan.net/catalogue.rdf"
},
{
"description": "N3",
"format": "text/n3",
"hash": "",
"id": "dcfc2852-2278-496f-844d-50dd34a55166",
"package_id": "e1d0ba33-5772-44b8-bea7-c7436d98f65c",
"position": 3,
"resource_group_id": "3d982089-1f91-08e0-481b-a51b8a969f61",
"url": "http://semantic.ckan.net/catalogue.n3"
},
{
"description": "NTriples",
"format": "application/x-ntriples",
"hash": "",
"id": "2ab8f943-7920-4f61-8313-b4e3097cdabb",
"package_id": "e1d0ba33-5772-44b8-bea7-c7436d98f65c",
"position": 4,
"resource_group_id": "3d982089-1f91-08e0-481b-a51b8a969f61",
"url": "http://semantic.ckan.net/catalogue.nt"
},
{
"description": "Example N3 Resource",
"format": "example/n3",
"hash": "",
"id": "e1574b3f-fc5f-4501-97ec-7cc89f4e6906",
"package_id": "e1d0ba33-5772-44b8-bea7-c7436d98f65c",
"position": 5,
"resource_group_id": "3d982089-1f91-08e0-481b-a51b8a969f61",
"url": "http://semantic.ckan.net/package/c/k/ckan.n3"
},
{
"description": "Example RDF/XML Resource",
"format": "example/rdf+xml",
"hash": "",
"id": "84a96d6c-ad3a-469a-879e-bee9ad2c891c",
"package_id": "e1d0ba33-5772-44b8-bea7-c7436d98f65c",
"position": 6,
"resource_group_id": "3d982089-1f91-08e0-481b-a51b8a969f61",
"url": "http://semantic.ckan.net/package/c/k/ckan.rdf"
},
{
"description": "Example NTriples Resource",
"format": "example/ntriples",
"hash": "",
"id": "725bef83-bd8f-435b-b5da-e5cb0f9f0182",
"package_id": "e1d0ba33-5772-44b8-bea7-c7436d98f65c",
"position": 7,
"resource_group_id": "3d982089-1f91-08e0-481b-a51b8a969f61",
"url": "http://semantic.ckan.net/package/c/k/ckan.nt"
}
],
"revision_id": "84a9b01c-a9f7-474b-b93a-f07df697e447",
"state": "active",
"tags": [
"access-api",
"bio2rdf",
"catalog",
"catalogue",
"format-dcat",
"format-opmv",
"format-rdf",
"format-void",
"package-type.catalog",
"published-by-producer",
"registry",
"resource-deref"
],
"title": "Comprehensive Knowledge Archive Network",
"url": "http://www.ckan.net/",
"version": null
}