Monday 30 January 2012

Relational Model ( Database system concepts )


Example of a Relation




Attribute Types

Each attribute of a relation has a name
The set of allowed values for each attribute is called the domain of the attribute
Attribute values are (normally) required to be atomic; that is, indivisible
lE.g. the value of an attribute can be an account number,
but cannot be a set of account numbers
Domain is said to be atomic if all its members are atomic
The special value null  is a member of every domain
The null value causes complications in the definition of many operations
** We shall ignore the effect of null values in our main presentation and consider their effect later


Relation Schema

Formally, given domains D1, D2, …. Dn a relation r is a subset of
       
D1D2  x … x Dn
Thus, a relation is a set of
n-tuples (a1, a2, …, an) where each ai  Î Di
Schema of a relation consists of
attribute definitions
4name
4type/domain
integrity constraints


Relation Instance

The current values (relation instance) of a relation are specified by a table
* An element t of r is a tuple, represented by a row in a table
Order of tuples is irrelevant (tuples may be stored in an arbitrary order)




No comments:

Post a Comment