Next: Sample Database Instance
Up: RELATIONAL MODEL OF DATA
Previous: RELATIONAL MODEL OF DATA
- Relation Scheme: list of attribute names.
Example: R = (CID, CNAME, CITY, DISCOUNT). - Domain: set of values.
Example: set of integers, set of character strings of length 10, set of
real numbers. - With each attribute name A, we associate a domain referred to
as domain(A).
Example: domain(CID)=char4, domain(CNAME)=char13, domain(DISCOUNT)=integer - A Tuple over the relation scheme (A1, ..., An) is
(a1, ..., an) where each ai is an element of domain(Ai) or null.
Example: ('c001','TipTop', 'Duluth',10) is a tuple over scheme R. - Relation: over a relation scheme (A1, ..., An) is a
finite set of tuples over the same scheme.
Example: {('c001','TipTop', 'Duluth',10),('c002','Basics', 'Dallas',null)}
is a relation over scheme R.
Basically,
- A relation over scheme R=(A1, ..., An) can be viewed as a table
consisting of n columns and a finite set of rows.
- Each column corresponds to
an attribute name and
- Each row corresponds to a tuple within the
relation.
Relation --- Table
Attribute Name --- Column Name
Tuple --- Row
Raj Sunderraman
Tue Apr 1 16:15:10 PST 1997