# Create the students create (p:Person:Student { bannerid:918000101, name:'Mary Kennedy'}) return p create (p:Person:Student { bannerid:918000102, name:'Phil Smith'}) return p create (p:Person:Student { bannerid:918000103, name:'Joe Johnson'}) return p create (p:Person:Student { bannerid:918000104, name:'Asa Khaled'}) return p create (p:Person:Student { bannerid:918000105, name:'Kyle Young'}) return p create (p:Person:Student { bannerid:918000106, name:'Sue Lange'}) return p create (p:Person:Student { bannerid:918000107, name:'Pete Robinson'}) return p create (p:Person:Student { bannerid:918000108, name:'Adam Smith'}) return p create (p:Person:Student { bannerid:918000109, name:'Tony Rossi'}) return p create (p:Person:Student { bannerid:918000110, name:'Ganesh Patel'}) return p create (p:Person:Student { bannerid:918000111, name:'Amber Jones'}) return p create (p:Person:Student { bannerid:918000112, name:'Kurt Jones'}) return p create (p:Person:Student { bannerid:918000113, name:'Fadhi Shah'}) return p create (p:Person:Student { bannerid:918000114, name:'Mike Bailey'}) return p create (p:Person:Student { bannerid:918000115, name:'Cherise Moore'}) return p create (p:Person:Student { bannerid:918000116, name:'Derek Goodman'}) return p create (p:Person:Student { bannerid:918000117, name:'Evan Peterson'}) return p create (p:Person:Student { bannerid:918000118, name:'Edward Patel'}) return p create (p:Person:Student { bannerid:918000119, name:'Olivia Wu'}) return p create (p:Person:Student { bannerid:918000120, name:'Isaac Mayer'}) return p # Create the instructors (variant, can be run as a block of code - different variables, no return) create (p1:Person:Instructor { name:'Jack Myers'}) create (p2:Person:Instructor { name:'Jake Levy'}) create (p3:Person:Instructor { name:'Gary Mann'}) create (p4:Person:Instructor { name:'Parva Basu'}) create (p5:Person:Instructor { name:'Marci Quinn'}) create (p6:Person:Instructor { name:'Darren Provine'}) # Create the courses create (c1:Course { name:'OOPDA' }) create (c2:Course { name:'Calculus II' }) create (c3:Course { name:'English Comp I' }) create (c4:Course { name:'Lab Techniques' }) # Create the sections match (c:Course { name: 'OOPDA' }), (i:Instructor {name: 'Jack Myers'}) create (c) <- [:SECTION_OF] - (s:Section { name: 24185, room: 312, building: 'Robinson' }) <- [:TEACHES] - (i) return c, s, i match (c:Course { name: 'OOPDA' }), (i:Instructor {name: 'Jake Levy'}) create (c) <- [:SECTION_OF] - (s:Section { name: 24186, room: 325, building: 'Robinson' }) <- [:TEACHES] - (i) return c, s, i match (c:Course { name: 'Calculus II'}), (i:Instructor {name: 'Gary Mann'}) create (c) <- [:SECTION_OF] - (s:Section { name: 26122, room: 211, building: 'James'}) <- [:TEACHES] - (i) return c, s, i match (c:Course { name: 'English Comp I'}), (i:Instructor {name: 'Parva Basu'}) create (c) <- [:SECTION_OF] - (s:Section { name: 26453, room: 103, building: 'James'}) <- [:TEACHES] - (i) return c, s, i match (c:Course { name: 'English Comp I'}), (i:Instructor {name: 'Marci Quinn'}) create (c) <- [:SECTION_OF] - (s:Section { name: 26454, room: 211, building: 'James'}) <- [:TEACHES] - (i) return c, s, i match (c:Course { name: 'Lab Techniques'}), (i:Instructor {name: 'Darren Provine'}) create (c) <- [:SECTION_OF] - (s:Section { name: 27112, room: 325, building: 'Robinson'}) <- [:TEACHES] - (i) return c, s, i match (c:Course { name: 'Lab Techniques'}), (i:Instructor {name: 'Darren Provine'}) create (c) <- [:SECTION_OF] - (s:Section { name: 27113, room: 312, building: 'Robinson'}) <- [:TEACHES] - (i) return c, s, i # Course Coordinators --- do this. # Enrollment match (p:Student {bannerid:918000103}), (s:Section {name:24185}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000107}), (s:Section {name:24185}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000118}), (s:Section {name:24185}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000104}), (s:Section {name:24185}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000102}), (s:Section {name:24186}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000114}), (s:Section {name:24186}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000119}), (s:Section {name:24186}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000106}), (s:Section {name:24186}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000101}), (s:Section {name:26122}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000103}), (s:Section {name:26122}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000105}), (s:Section {name:26122}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000107}), (s:Section {name:26122}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000109}), (s:Section {name:26122}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000111}), (s:Section {name:26122}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000113}), (s:Section {name:26122}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000109}), (s:Section {name:26453}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000108}), (s:Section {name:26453}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000111}), (s:Section {name:26453}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000114}), (s:Section {name:26453}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000117}), (s:Section {name:26453}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000120}), (s:Section {name:26453}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000115}), (s:Section {name:26454}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000118}), (s:Section {name:26454}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000105}), (s:Section {name:26454}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000119}), (s:Section {name:26454}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000101}), (s:Section {name:26454}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000104}), (s:Section {name:26454}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000103}), (s:Section {name:27112}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000108}), (s:Section {name:27112}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000109}), (s:Section {name:27112}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000120}), (s:Section {name:27113}) create (p) - [:ENROLLED_IN] -> (s) return p,s match (p:Student {bannerid:918000102}), (s:Section {name:27113}) create (p) - [:ENROLLED_IN] -> (s) return p,s ####################################################################################################### # queries # ####################################################################################################### # 1. Students enrolled in OOPDA # 2. Persons associated with Robinson 312 # 3. Students that have not registered # 4. Sections taught by course coordinators # 5. Students in OOPDA and Calc II # 6. Studnets in OOPDA but not Lab Techniques # 7. Rooms used in Robinson # 8. What is taught in Robinson 325