Here is a sample database documentation that includes the necessary Nodes and their attributes:
Student
id: unique identifier for the student
name: name of the student
email: email address of the student
Teacher
id: unique identifier for the professor
name: name of the professor
email: email address of the professor
Course
id: unique identifier for the course
name: name of the course
credits: number of credits assigned to the course
Department
id: unique identifier for the department
name: name of the department
Let's now create some dummy data to see how our system will work.
Department
SELECT * FROM cypher('university', $$
create(:Department{name:'Computer Science', rooms:30})
$$) as (v agtype);
Student
SELECT * FROM cypher('university', $$
create(:student{name:'std1', rollNo:1})
$$) as (v agtype);
SELECT * FROM cypher('university', $$
create(:student{name:'std2', rollNo:2})
$$) as (v agtype);
SELECT * FROM cypher('university', $$
create(:student{name:'std3', rollNo:3})
$$) as (v agtype);
SELECT * FROM cypher('university', $$
create(:student{name:'std4', rollNo:4})
$$) as (v agtype);
SELECT * FROM cypher('university', $$
create(:student{name:'std5', rollNo:5})
$$) as (v agtype);
Teacher
SELECT * FROM cypher('university', $$
create(:teacher{name:'Micheal', role:'Assistant Prof'})
$$) as (v agtype);
SELECT * FROM cypher('university', $$
create(:teacher{name:'Muneeb', role:'Professor'})
$$) as (v agtype);
Course
SELECT * FROM cypher('university', $$
create(:course{name:'Programming', creditHours:3})
$$) as (v agtype);
SELECT * FROM cypher('university', $$
create(:course{name:'Database', creditHours:3})
$$) as (v agtype);
For more details visit: https://age.apache.org/overview/
AGE Github Link: https://github.com/apache/age
AGE Viewer Github Link: https://github.com/apache/age-viewer
Top comments (0)