By C.J. Date
Book Price: $29.95 USD
£20.95 GBP
PDF Price: $23.99
Cover | Table of Contents | Colophon
principle: a source, root, origin: that which is fundamental: essential nature: theoretical basis: a fundamental truth on which others are founded or from which they spring
Definition: A data model (first sense) is an abstract, self-contained, logical definition of the data structures, data operators, and so forth, that together make up the abstract machine with which users interact.
Definition: An implementation of a given data model is a physical realization on a real machine of the components of the abstract machine that together constitute that model.
DECLARE N INTEGER ... ;
CREATE TABLE T ... ;
DELETE S WHERE CITY = 'Athens' ;
Definition: A value is an "individual constant": for example, the individual integer 3. A value has no location in time or space. However, values can be represented in memory by means of some encoding, and those representations do have locations in time and space. Indeed, distinct representations of the same value can appear at any number of distinct locations in time and space, meaning, loosely, that any number of different variables—see the definition below—can have the same value, at the same time or different times. Observe in particular that, by definition, a value can't be updated ; for if it could, then after such an update it would no longer be that value.
Definition: A variable is a holder for a representation of a value. A variable does have location in time and space. Also, of course, variables, unlike values, can be updated; that is, the current value of the variable can be replaced by another value.
http://oreilly.com/catalog/databaseid. Suppliers Parts Shipments
SNO : SNO PNO : PNO SNO : SNO
SNAME : NAME PNAME : NAME PNO : PNO
STATUS : INTEGER COLOR : COLOR QTY : QTY
CITY : CHAR WEIGHT : WEIGHT
CITY : CHARSP.SNO = S.SNO /* OK */
SP.PNO = S.SNO /* not OK */
SELECT S.SNO, S.SNAME, S.STATUS, S.CITY
FROM S
WHERE NOT EXISTS
( SELECT SP.PNO
FROM SP
WHERE SP.PNO = S.SNO ) /* not OK */ 1 VAR S BASE
2 RELATION { SNO SNO, SNAME NAME, STATUS INTEGER, CITY CHAR }
3 KEY { SNO } ;Definition: Let T1, T2, . . . ,Tn (n ≥ 0) be type names, not necessarily all distinct. Associate with each Ti a distinct attribute name, Ai; each of the n attribute-name:type-name combinations that results is an attribute. Associate with each attribute a value vi of type Ti; each of the n attribute:value combinations that results is a component. The set of all n components thus defined, t say, is a tuple value (or just a tuple for short) over the attributes
Definition: Let T1, T2, . . . ,Tn (n ≥ 0) be type names, not necessarily all distinct. Associate with each Ti a distinct attribute name, Ai; each of the n attribute-name:type-name combinations that results is an attribute. Associate with each attribute a value vi of type Ti; each of the n attribute:value combinations that results is a component. The set of all n components thus defined, t say, is a tuple value (or just a tuple for short) over the attributes A1, A2,..., An. The value n is the degree of t; a tuple of degree one is unary, a tuple of degree two is binary, a tuple of degree three is ternary,..., and more generally a tuple of degree n is n-ary. The set of all n attributes is the heading of t.
TUPLE { SNO SNO, CITY CHAR }
Definition: Let {H} be a tuple heading and let t1, t2, . . . , tm (m ≥ 0) be distinct tuples with heading {H}. The combination, r say, of {H} and the set of tuples {t1, t2, . . . , tm} is a relation value (or just a relation for short) over the attributes A1, A2, . . . , An, where A1, A2, . . . , An are the attributes in {H}. The heading of r is {H}; r has the same attributes (and hence the same attribute names and types) and the same degree as that heading does. The body of r is the set of tuples {t1, t2, . . . , tm}. The value m is the cardinality of r.
RELATION { SNO SNO, SNAME NAME, STATUS INTEGER, CITY CHAR }