A
is denoted by Domain(A
):
CP = Domain(cid)×Domain(cname)×Domain(city)×Domain(discnt) = CID × CNAME × CITY × DISCNT
CP
consists of the set of all possible 4-tuples, t=(c,n,t,d)
; e.g.,
t = ( c003, Allied, Dallas, 12.00 ), and t' = ( c001, TipTop, Duluth, 10.00 ).
customer | |||
---|---|---|---|
cid | cname | city | discnt |
c001 | TipTop | Duluth | 10.00 |
c002 | Basics | Dallas | 12.00 |
c003 | Allied | Dallas | 12.00 |
c004 | ACME | Duluth | 12.00 |
c005 | ACME | Kyoto | 0.00 |
... | ... | ... | ... |
T
that has a heading given by
Head(T) = A1 ... Anthen
T
is a subset of the Cartesian product of the sets: Domain(A1), ..., Domain(An).
For example, the table customer
is a subset of CP
.
Executing a SELECT
command is basically done in three steps:
SELECT
clause; DISTINCT may be added to avoid duplicate tuples in the result.
“Whenever you find yourself on the side of the majority, it is time to reform (or pause and reflect).” ― Mark Twain |