DEV Community

Cover image for Graph in Apache AGE Part 1
farakh-shahid
farakh-shahid

Posted on

Graph in Apache AGE Part 1

In this post I'm going to explore about Graph in Apache AGE.
First of All What is Graph Database.

Grapgh
According to Apache AGE documentation A graph consists of a set of vertices and edges, where each individual node and edge possesses a map of properties. A vertex is the basic object of a graph, that can exist independently of everything else in the graph. An edge creates a directed connection between two vertices.

As we all know the graph is a pictorial representation of data in the form of nodes and relationships which are represented by edges. A graph database is a type of database used to represent the data in the form of a graph. It has three components: nodes, relationships, and properties. These components are used to model the data.

**The concept of a Graph Database **is based on the theory of graphs. It was introduced in the year 2000. They are commonly referred to NoSql databases as data is stored using nodes, relationships and properties instead of traditional databases. A graph database is very useful for heavily interconnected data. Here relationships between data are given priority and therefore the relationships can be easily visualized.

Sample Image to Demonstrate:
Here we have 4 nodes Users, Teams stadium ,cities

grapgh

Characteristics of a Graph Database

A graph data consists of nodes and edges. Nodes are also sometimes called vertices. The nodes represent an entity such as a Person, City, Employee, and Customer etc. Edges are used to map the relationship between entities. Graph databases are well suited to things like supply chain management systems. Graph databases have also proven efficient to develop recommender systems where the relationships like “Person who bought item X, also bought item Y,” have to be mapped.

The description of components are as follows:

Nodes: represent the objects or instances. They are equivalent to a row in database. The node basically acts as a vertex in a graph. The nodes are grouped by applying a label to each member.
Relationships: They are basically the edges in the graph. They have a specific direction, type and form patterns of the data. They basically establish relationship between nodes.
Properties: They are the information associated with the nodes.

For part 2 click here

References:

  1. https://www.geeksforgeeks.org/introduction-to-graph-database-on-nosql/
  2. https://www.sqlshack.com/understanding-graph-databases-in-sql-server/
  3. https://neo4j.com/developer/graph-database/

Top comments (1)

Collapse
 
capnspek profile image
Bhaskar Sharma

Great distillation of complex information.