Mike Pluta discusses some ideas behind NoSQL, Graph Databases, and Neo4j, including what they are and how they work


What is NoSQL?

NoSQL is a word derived from the word SQL. SQL stands for Structured Query Language. SQL is a programming language used to manage data (retrieve data, insert data, update existing data) in a relational database management system.

So, then, what’s a relational database? If I were to write a complete description about relational databases this post would become too long (and boring!) to read. In short, relational databases use a relation schema as the data model of the database. In a relational database, data is stored as collection of relations (tables).

So again, returning to our question. What is NoSQL?

NoSQL doesn’t means Not SQL or “no” SQL or the abjurement of SQL. It simply means NOT ONLY SQL. There are several common characteristics for NoSQL databases. They are:

  • Non-Relational
  • Cluster Friendly
  • CAP Theorem Instead of ACID
  • Schema less

In relational database systems, the relation schema is the data model of the database. What, then, is the data model of a NoSQL database? There are several dominant data models for NoSQL databases. Based on those data models NoSQL databases are commonly categorized as follows:

  • Column-Oriented Database
  • Document Database
  • Key-Value Store Database
  • Graph Database

Graph Data Model

Here in this example graph we have three vertices. Let denotes the vertices set as V={a,b,c}. If we denotes the set of edges as E, we can write E={ab,ac, bc}. The graph in the image is not a directional graph. That means the direction of the edges actually doesn’t matter. In our example graph data model we will use directional graphs.

What is Neo4j?

Neo4j is a NoSQL database management system which uses a graph data model as its NoSQL data model. For more details, visit the Neo4j home page: http://www.neo4j.org/

Installing Neo4j

Neo4j is available for Windows, Linux and MacOS X environments. The installation of Neo4j is very simple.

Locate the appropriate version of the Neo4j database at the following link: http://www.neo4j.org/download

The rest of this section makes the assumption that you are installing onto a Windows-based system, however, the basics of installing Neo4j do not differ all that much from Windows to Linux (amazingly!).

After downloading the zip file, decompress it to any place desired. On my system, I’ve uncompressed the downloaded .ZIP file to a folder named “WORK” in the root of my F: drive.

Prerequisites

Before taking the next step to installing Neo4j, make sure that you have the most current stable Java JDK on your system. In addition, you will need to be running a 64-bit OS (and the 64-bit JDK).

There were reports on the internet of Neo4j installations failing due to an error in the start script. On the systems I have installed, I have not run into this issue, however, THIS LINK will take you a blog post which discusses and addresses this issue.

Starting Neo4J

  • Open a command window with elevated privileges (Run as Administrator)
  • Navigate to the directory into which you unzipped the Neo4J file you previously downloaded
  • Further navigate into the bin folder
  • Type Neo4j start to start the Neo4J database

The command window will display some startup information along with the port number where the Neo4J Server is running. Neo4j will also open a blank Java console window. This can be minimised, but do not close this window.

Read the Full Article Here.