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:

Introducing Plan Endpoint

When it comes to languages for querying databases, they tend to look more human-readable than a typical programming language. SPARQL, as well as SQL, employs declarative approach, allowing to describe what data needs to be retrieved without burdening the user with minutiae of how to do it. Besides being easier on the eyes, this leaves a DBMS free to choose the way it executes queries. And as is typical for database management systems, Stardog has its own internal representation for SPARQL queries: the query plan.

Stardog Data Flow Automation with NiFi

We are happy to announce a new feature that enhances your ability to load data into Stardog’s graph database with the release of Nifi support in v7.4.

Try Stardog Free

Stardog is available for free for your academic and research projects! Get started today.

Download now