Showing results for

Back to all articles

Using CIM in Stardog

Evren Sirin May 5, 2020

The Cloud Information Model (CIM) addresses the brittle data integrations that are common amongst enterprises. With the Stardog CIM archetype, you can start building your knowledge graph with a rich data model that is being standardized by industry leaders.

An enterprise may support hundreds of applications, each with its own data model. Connecting data models across applications typically requires custom code to map data across these different sources. Stardog’s open standards like RDF, OWL, SHACL and others, are designed to address this problem and allow interoperability between enterprise systems. However, since these standards are domain agnostic, they do not contain any concrete data models that can be used in a specific area. This is the exact problem CIM is aiming to solve by providing ready-to-use data models for predefined domains that are not tied to any application or vendor.

Introducing CIM

CIM is an open specification being developed as part of the Joint Development Foundation under the Linux Foundation. Stardog joined the CIM consortium in February, 2020, alongside partners Amazon Web Services and Salesforce, among others. CIM standards are in development; the latest version of the data models are being published as RDF schemas, SHACL shapes and R2RML mappings. Stardog has long been a contributor to these and other W3C data standards and as someone who personally worked in this area for many years it is exciting to see these standards adopted by CIM.

CIM is not a monolithic data model that is supposed to cover every domain. CIM consists of several inter-related modules that are called Subject Areas and further organized into components as follows:

Source: CIM website.

  • Subject Area: A major business concept identified by the CIM consortium, such as Party. Each subject area contains one or more entity groups.
  • Entity Group: A logical grouping of related entities with in a subject area, such as Account. Each entity group contains one or more entities.
  • Entity: A unique object that an organization collects information about, such as an Account Contact. An entity is analogous to a standard database table.
  • Attribute: A unique characteristic of an entity, such as Account Id or Contact Email. An attribute is analogous to a standard database field within a table.

The current subject areas in CIM are: Party, Payment, Product, Sales Order and Shipment. The initial subject areas reflect a customer-focused data model but there are more subject areas being added to CIM as more members join the consortium.

CIM Archetype in Stardog

Since CIM is being published using W3C standards one can easily load these data models into Stardog. But we have made this even easier by creating a CIM database archetype. A database archetype is a simple templating mechanism for bundling a set of namespaces, schemas and constraints to populate a newly created database.

Follow the following simple two steps to get started with the CIM archetype:

  • Check out or download the contents of Stardog Archetype Repository repository to the ${STARDOG_HOME}/.archetypes folder
  • Create a new database using the following command: $ stardog-admin db create -o database.archetypes="cim" -n db

As a result of this command all the subject areas in CIM are automatically loaded into your database along with the validation constraints. You can now fire up Stardog Studio, go to the schema visualization view or the data exploration view and start exploring the CIM model to see how your data can be described with the CIM model.

CIM schema view in Stardog Studio

Try it out!

While CIM is still evolving, the CIM consortium is working to finalize a stable release in the upcoming months and new subject areas will be included in subsequent releases. At Stardog, we are planning to develop additional subject areas and link additional vocabularies to the CIM model as well.

You can try the Stardog CIM archetype following the above instructions. Please report issues and feedback in the GitHub repo and create pull requests if you have suggestions for change.

Are you interested in joining the CIM initiative? Please feel free to email CIM for more information.

Learn more about Stardog’s Enterprise Knowledge Graph Platform and check out our learning resources. If you would like to submit your research to Stardog Labs, contact us to share your project details!

Keep Reading:

Analyzing COVID-19 Data with SPARQL

For those of us living in the US, increasing COVID-19 case numbers across the country is unfortunately at the top of our minds. We do not lack access to data or infographics about the pandemic but having access to raw data and writing queries yourself can still give you different insights or at least get you better at writing queries. For this reason, we decided to turn the open-source COVID-19 dataset published by New York Times into RDF and included it in our publicly accessible Stardog Sandbox environment.

Introducing Stardog Labs

I’m delighted to welcome you to Stardog Labs, a new hub of insight, news, and buzz about knowledge graph technology. The site will advance knowledge graph R&D by featuring technical blogs, showcasing job opportunities focused on knowledge graph development, and curating research papers and open source projects.

Get your Stardog Academic Trial

Current students, instructors, and staff at accredited academic institutions are eligible to receive a one-year Stardog license.

Download now