Practical 9

Execute queries in the Neo4j graph database 

Theory:

In traditional databases where all data arrange in rows, columns and tables, Neo4j has a flexible structure defined by stored relationships between data records.

With Neo4j, each data record, or node, stores direct pointers to all the nodes it’s connected to. Because Neo4j is designed around this simple, yet powerful optimization, it performs queries with complex connections orders of magnitude faster, and with more depth, than other databases.

Install neo4j form Here.

After installing follow this step to create graph database 

Step 1: create database set name and password.


Fig 1 create database


Fig 2 After starting database given screen will open
Step 2: Using help command you can check different command  can be use.

Fig 3 help command
Step 3: create table person add  different data 

Fig 4 add data



Step 4 : add attribute to data



Fig 5 attribute  of data

Step 5 : remove attribute.

Step 6: Add relation ship between data



Fig 6 Relationship between data
Step 7 : get data from table using where query.

Fig 7 Output of given query

Step 8: remove node (data)




Fig 8 Remove Node
Here is all relation and table name is listed.

Step 9: Remove all data with relation.

                                                                Fig 9 Output of remove all data





In this practical we learn how we can create simple database run qyuery in neo4j and se the relation in form of graph.

For this practical I have taken reference from Here 










Comments