| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Does Codd's view of a relational database differ from that ofDate&Darwin?[M.Gittens]
"Jan Hidders" <jan.hidders_at_REMOVETHIS.pandora.be> wrote in message
news:SiSxe.136301$no5.7264319_at_phobos.telenet-ops.be...
> VC wrote:
>> "Jan Hidders" <jan.hidders_at_REMOVETHIS.pandora.be> wrote in message >> news:I4Cxe.135796$Bh7.7066690_at_phobos.telenet-ops.be... >> >>>Jon Heggland wrote: >> >> [...] >> >>>>Not personally, but what more do you need than definitions of value, >>>>domain, tuple and relation, and a minimal set of algebra operators? >>> >>>The notions of database schema, database constraints, database instances >>>and how they are exactly related. >> A constraint (in the RM) is just a predicate [required to evaluate to >> true]. >
With the RM, sort of obvious, no ?
Let's assume we have a relational variable :
var PERSON relation {ssn# in ssn_type, name in name_type, age in integer, salary in integer} key{ssn#};
We can define a predicate (constraint): forAll ssn#, name, age,salary: {ssn#, name, age,salary} in PERSON & (age < 14) -> salary = 0
that says that everyone described by the PERSON relational variable (which may be a view btw) and younger than 14 earns 0. This would be an example of a relation constraint (applicable to one relational variable only).
In a similar way, one can define predicates involving two or more relational variables. The resulting constraints are usually called database constraints.
Additionally, the relational variable definition itself includes attribute constraints (name in name_type, age in integer and so on).
> >> A relation schema is a schema name R and a set of attributes A: R(A) >
That is correct. A domain, or a data type, is pair (V, O) where V is a set of values and O is a set of operations closed over V [I believe Codd did not require O so that (V, O) can be collapsed to just V. 'O' is an attempt to accomodate user defined data types (or 'objects') in the RM].
> >> A database schema is a pair (RR, C) where RR is a set of relation >> schemata and C is a set of constraints on RR. >
I did not. See above: "a relation schema is a schema *name* ...". C is a collection of database constraints, relation constraints, attribute constraints and, if one admits user defined types or 'objects', type constraints. Simple, no ?, especially in comparison to alternative data models.
> >> A relation instance for R(A) is a set of tuples. >
I did not, see the R(A) notation.
>
> -- Jan Hidders
Received on Sun Jul 03 2005 - 21:24:23 CDT
![]() |
![]() |