NoSQL Document Stores

Visualizing NoSQL databases with KeyLines

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 NoSQL tables 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:

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 database, including CouchDB, Cassandra, MarkLogic, and MongoDB using the Blueprints API
How to visualize a NoSQL database, 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

From the blog

Solving distributed graph problems with DataStax

We caught up with Denise Gosnell, Senior Manager and Head of Global Graph Practice at DataStax, to talk about graph challenges, graph visualization, and what the future holds.

A night at the Oscars with KeyLines and Stardog

This blog post shows how quick and easy it is to integrate Stardog with KeyLines using Academy Awards data.

Visualizing TED Talks data with Memgraph

Find out how to integrate the KeyLines graph visualization toolkit with the Memgraph database, our latest technology alliance partner.

Visit the blog