Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
CSC 3800 Database Management Systems Mid Term Review Fall 2008 Dr. Chuck Lillie Database Definitions Given a relational database Identify the relations Identify the attributes Identify the tuples Identify the database schema Identify each relation schema Database Definitions (example) Given a relational database model speed ram hd price 1001 2.66 1024 250 2114 pc 1002 2.10 512 250 995 3001 printer 1003 1.42 512 80 478 B 2001 laptop B 3002 printer C 1003 pc C 2002 laptop C 2003 laptop C 3003 printer maker model type A 1001 pc A 1002 A model speed ram hd screen price 2001 2.00 2048 240 20.1 3673 2002 1.73 1024 80 17.0 949 2003 1.80 512 60 15.4 549 model color type price 3001 true ink-jet 99 3002 false laser 239 3003 true laser 899 Relational Algebra Identify and define relational algebra operators Given a relational database Write simple relational algebra queries Relational Operators Selection: σC Core Relational Operators Theta-Join: ⋈C R1 := σC (R2) Projection: πL R3 := R1 ⋈C R2 Natural Join: ⋈ R1 := πL (R2) Product: Χ R3 := R1 Χ R2 R3 := R1 ⋈ R2 Renaming: ρ R1 := ρR1(A1,…,An)(R2) Usual Set Operators Union: ∪ R3 := R1 ∪ R2 Difference: — R3 := R1 — R2 Intersection: ∩ R3 := R1 ∩ R2 SQL SQL operators Identify and define SQL operators Given relational algebra operators, show the equivalent SQL operators Given a relational database Write simple SQL queries Constraints and Triggers Keys & Foreign Keys Define Use SQL to declare for given relation Constraints Define Use SQL to declare for given relation Assertions Define Use SQL to declare for given relation