Presentation is loading. Please wait.

Presentation is loading. Please wait.

Database Systems 236363 Summary. Topics – Reminder Entity Relationship Diagrams (ERD) SQL Relational Algebra Relational Calculus Database Design Theory.

Similar presentations


Presentation on theme: "Database Systems 236363 Summary. Topics – Reminder Entity Relationship Diagrams (ERD) SQL Relational Algebra Relational Calculus Database Design Theory."— Presentation transcript:

1 Database Systems 236363 Summary

2 Topics – Reminder Entity Relationship Diagrams (ERD) SQL Relational Algebra Relational Calculus Database Design Theory – Functional Dependencies – Schemas Decomposition and Normal Forms XML and XPath 2.0 Graph Databases – Neo4j and Cypher Relational Databases

3 Common Weaknesses Weak entities IsA relationships IsA vs. aggregation Determining the key in 1-to-many relationships TRC syntax Paths in Cypher

4 Weak Entities What is the key of a company? What is the key of a group? What is the table representation of this ER diagram? Company Group Department B-C Company name Dept. Num Group name Company num Group num C-P

5 Weak Entities How do the tables content change now? Company Group Department B-C Company name Dept. Num Group name Company num Group num C-P

6 Weak Entities How do the tables content change now? Company Group Department B-C Company name Dept. Num Group name Company num Group num C-P

7 Weak Entities How do the tables content change now? Company Group Department B-C Company name Dept. Num Group name Company num Group num C-P Logo

8 IsA When do we use it? What is the key? Movie Movie Name Year Genre ISA Nature Film Cartoon Location Animator

9 IsA What is the difference? Movie Movie Name Year Genre ISA Nature Film Cartoon Location Animator Movie Movie Name Year Genre ISA Nature Film Cartoon Location Animator

10 Aggregation When do we use this? Make sure you understand the difference between aggregation and IsA Movie actor Name Birth date Photo Movie Movie Name Year Genre Played in Role Awarded Award Award Name

11 1-to-Many Relationships What is the key? Ingredient Ingredient Name Vendor Vendor Name Supplies Price

12 TRC syntax What about “which lines serve stations below sea level”? – {t[L_Num,Direction] :  r,s (r  Station  s  Serves   s[L_Num]=t[L_Num]  s[Direction]=t[Direction]   r[S_Name]=s[S_Name]  r[Height]<0 )} Important! – The relation should return a tuple and not a collection of attributes

13 Paths in Cypher What is the difference between the following two expressions: – MATCH (a)-[:Friend*3..4]->()<-[:Friend*3..4]-(b) RETURN a,b – MATCH (a)-[:Friend*4]->() ()<-[:Friend*..2]-(b) RETURN a,b

14 Final Comments on the Exam Open material – Only printed – no electronic devices Material for the exam includes everything we talked about in the lectures and/or recitations and/or home assignments Exams from previous years appear in the course’ web site


Download ppt "Database Systems 236363 Summary. Topics – Reminder Entity Relationship Diagrams (ERD) SQL Relational Algebra Relational Calculus Database Design Theory."

Similar presentations


Ads by Google