CS338 Lecture Notes - Lecture 2: Relational Model, Arity, Cardinality

87 views3 pages

Document Summary

Schema - describes a table: table name, attribute names, and types. Instance contents of the table: relation/ relation state. Domain is specified by data type: eg. Integer, string, date, real, etc: can specify by format: (###)###-#### Set of n-tuples r = {t1 tm: unordered, no duplicates, each n-tuple t, ordered list of n values t = Finite subset of the cartesian product of the domains defining r: rel(r ) subset of (dom(a1) x dom(a2) xdom(an), relations are time-varying, only reflects state at a given time. Notation: upper case letters q,r,s are relation names, uppercase letters a,b,c, h are attributes, attributes can also be denoted using dot notation; r. a. Lower case letters t, u, v are tuples. Flat relational model: values in a tuple are atomic, cannot be nested, composite and multivalued attributes not allowed, known as first normal form (1nf, composite attributes - can be split into simple component attributes, eg.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents