NoSQL Document Store Visualizations

Getting started with KeyLines and document stores

What is a NoSQL document store?

A NoSQL document-oriented database is one that stores, manages and retrieves data using the notion of a document. A document is a collection of data items about an entity, organized into a single item.

For example, using the same example as we did to explain Key Value and Column stores, car insurance data could be held in a document store using this format:


{
  "policyNumber": "AB 123 123",
  "policyAddress": "123 Road Street",
  "holderName": "Joe Smith",
  "vehicleID": "19UYA1234L000213",
  "vehicleModel": "Coupe",
  "vehicleYear": "2012"
}
{
  "policyNumber": "ZN 987987",
  "policyAddress": "42 Mill Crescent",
  "holderName": "Chris Bloggs",
  "vehicleID": "14PLU1234L120213",
  "vehicleModel": "Estate",
  "vehicleYear": "2007"
}
{
  "policyNumber": "JP 456456",
  "policyAddress": "12 Sample Street",
  "holderName": "Michael Richards",
  "vehicleID": "19UYA1234L000213",
  "vehicleModel": "Coupe",
  "vehicleYear": "2012"
}

These items can be extracted in any format, such as XML, JSON or plain text, but would need to be parsed into KeyLines own JSON format for visualization. Document stores are popular as they offer excellent performance, but also schema flexibility. Database admins aren’t constrained by pre-determined document attributes – new attributes can be easily added later on. Examples of popular document datastores include MongoDB, Cassandra, CouchDB, and MarkLogic.

Converting a NoSQL document store into a network

When visualizing document store data as a network, we may first need to convert the flat data structure into a connected network model of nodes and links. Each document in the NoSQL database can be mapped to a network item, such as a link or node, with several properties.

For example, if investigating car insurance fraud, it could be advisable to look for vehicles with more than one insurance policy. In this case the Vehicle Identification Numbers and Policy Numbers would be mapped to nodes, with the remaining data entities included as properties:

nosql document store: mapping the nosql schema to a graph structure

Mapping to a network structure with Blueprints

One tool to help with the conversion of a flat structure into a complex interconnected network structure is the Blueprints API. Part of the Tinkerpop open source graph computing framework, the Blueprints API provides a set of interfaces between NoSQL and Graph databases.

NoSQL Visualization infrastructure

Many of our customers use KeyLines to visualize data in their key-value NoSQL datastores using the following basic architecture:

How to visualize a NoSQL document store, including CouchDB, Cassandra, MarkLogic, and MongoDB using the Blueprints API

A user interaction in the KeyLines component raises an AJAX request for data from the database. This can happen via the Blueprints API or your own choice of API. Once the data is retrieved from the database, it is parsed into KeyLines’ own published JSON format and merged or loaded into the KeyLines chart.

Learn more

To learn more about the KeyLines network visualization toolkit and how to visualize your complex connected data, download a copy of our KeyLines white paper.

Download the White Paper

Registered in England and Wales with Company Number 07625370 | VAT Number 113 1740 61
6-8 Hills Road, Cambridge, CB2 1JP. All material © Cambridge Intelligence 2022.
Read our Privacy Policy.