Introduction to Graph Database

Introduction to Graph Database

Graph Database are increasingly being adopted in various industries, such as healthcare, retail, financial services, given their ability to represent data from the real world and help to analyse various data relationships.

Graph Database is a NoSQL database which uses nodes to store data entities, and edges to store relationships between the entities.

Types of Graph Databases

True Graph Database / Property Graphs

  • Support property graphs in which the properties may be assigned to either entities or their relationships, or both.

  • They support index free adjacency, we can traverse a graph without needing an index.

  • In property graphs

    • Nodes

      • Represents entities / objects in the graph.

      • Can contain properties (i.e., key-value pairs) and be labeled with one or more labels.

    • Relationships

      • Represents the named relationships between different entities.

      • Can contain properties (i.e., key-value pairs) and are directional (definite start and end node).

  • True Graph Database / Property Graphs based database services:

Triple Stores / RDF (Resource Description Framework) database

  • Stores data in a format known as a triple of subject-predicate-object data structure.

  • Data is logically linked in Triple Stores.

  • They don’t support index free adjacency.

  • Triple Stores / RDF (Resource Description Framework) based database services:

Hypergraph Database

  • Useful for modelling many to many relationships.

  • In this type of graph based database, the relationship is called as Hyperedge which allows any number of nodes at either end of a relationship.

  • Hypergraphs are more generalizable and are multidimensional.

  • Property Graph and Hypergraph Graph are isomorphic, that is Property Graph can be represented by Hypergraph but the reverse isn’t possible.

  • Hypergraphs based database services:

Advantages of Graph Databases

  • The query speed for graph databases depends only on the number of concrete relationships and not on the total amount of data in the database.

  • The graph databases are easily able to represent real world data relationships and hierarchies.

  • The graph database representation is flexible and follows agile structures. The data entities definitions and the relationship definitions can be altered dynamically.

Disadvantages of Graph Databases

  • Each graph database provider has specified a specific syntax or language for updates and queries. Therefore, there is no standard query language that works for every graph database.

  • Difficult to scale,as graph database are designed as a single-tier architecture.

References