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

Reduce clutter and increase insight with combos

In this blog post we look at two scenarios to show you how your users can enhance their data analysis and understanding with combos - our powerful node-grouping functionality.

Spot alerts in network topologies with graph visualization

In this blog post, we’ll show you how graph visualization can make alert detection and investigation more effective, and help you gain a clearer understanding of your infrastructure.

Detect credit card fraud with network visualization

In this post we demonstrate why network visualization should be part of your fraud detection workflow. We show how integrating KeyLines can help you make sense of large and complex fraud datasets.

Subscribe to our newsletter

Get occasional data visualization updates, stories and best practice tips by email