Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

MUHAMMAD MUBASHER ILYAS

SP20-BCS-064
SECTION A
TERMIANL AI
QUESTION NO. 1
Part A
create (p1:bilal {name: "bilal"})
create (p2:ahmad {name: "ahmad"})
create (p1)-[:Brother_of]->(p2)
create (b:book{name:"book"})
create (p2)-[:gave]->(b)-[:to]->(p1)
create (i:isbm{name:"ISBM"})
create (b)-[:has]->(i)
create (no:no{name:"1234"})
create (i)-[:with_no]->(no)
create (t:title{name:"programing AI"})
create (b)-[:has_title]->(t)
create (bw:bw{name:"between"})
create (j:jv{name:"jave"})
create (db:db{name:"database"})
create (p1)-[:place]->(b)-[:between]->(bw)
create (bw)-[:jave]->(j)
create (bw)-[:datebase]->(db)
create (p:pg{NAME:"120 pages"})
create (j)-[:has]->(p)
create (c:cover{name:"black color"})
create (db)-[:has_cover_of]->(c)
create (pro:pro{name:"programing"})
create (p2)-[:think_that]->(p1)-[:likes]->(pro)-[:but_he_is_wrong]->(p2)
Part B
create (p1:bilal {name: "bilal"})
create (p2:ahmad {name: "ahmad"})
create (bro:bro{name:"brother of"})
create (p1)-[:r]->(bro)
create (bro)-[:r]->(p2)
create (g:give{name:"give"})
create (p2)-[:r]->(g)
create (b:book{name:"Programing AI",no:"1234",category:"book"})
create (g)-[:r]->(b)
create (t:to{name:"to"})
create (b)-[:r]->(t)
create (t)-[:r]->(p1)
create (c:cre{name:"places"})
create (p1)-[:r]->(c)
create (c)-[:r]->(b)
create (bw:bw{name:"between"})
create (b)-[:r]->(bw)
create (j:jv{name:"jave",category:"book",pages:"120 pages"})
create (bw)-[:r]->(j)
create (db:db{name:"database",category:"book",cover:"black color"})
create (bw)-[:r]->(db)
create (pro:pro{name:"programing"})
create (tk:think{name:"think that"})
create (p2)-[:r]->(tk)
create (l:like{name:"likes"})
create (wr:wrong{name:"he is wrong"})
create (tk)-[:r]->(p1)
create (p1)-[:r]->(l)
create (l)-[:r]->(pro)
create (pro)-[:r]->(wr)
create (wr)-[:r]->(p2)

You might also like