Relational Database What's a Database? 1. a system for storing and managing information 2. a collection of relations What's a Relation? 1. a table in a database 2. a set of tuples (no duplicates) What's a Tuple? 1. a row in a relation 2. an ordered list of values What's an Attribute? 1. the name of a column in a relation 2. the name of a position in a tuple What's a Scheme? the set of column names of a relation Example Database Why is the data split into multiple tables? How are the tables connected? (How can I find courses and grades for "C. Brown"?) StudentID Name Address Phone 12345 C. Brown 12 Apple St. 555-1234 67890 L. Van Pelt 34 Pear Ave. 555-5678 22222 P. Patty 56 Grape Blvd. 555-9999 Course StudentID Grade CS101 12345 A CS101 67890 B EE200 12345 C EE200 22222 B+ CS101 33333 A- PH100 67890 C+ Course Prerequisite CS101 CS100 EE200 EE005 EE200 CS100 CS120 CS101 CS121 CS120 CS205 CS101 CS206 CS121 CS206 CS205 Course Day Hour CS101 M 9AM CS101 W 9AM CS101 F 9AM EE200 Tu 10AM EE200 W 1PM EE200 Th 10AM PH100 Tu 11AM Course Room CS101 Turing Aud. EE200 25 Ohm Hall PH100 Newton Lab.