Professional Documents
Culture Documents
Table Relation
Column Attribute/Domain
Row Tuple
Values in a column Domain
Table Definition Schema of a Relation
Populated Table Extension
Chapter 5-10
Outline
Relational Model Concepts
Domains, Attributes, and Relations
Characteristics of Relations
Relational Model Constrains and
Relational Database Schemas
Update Operations, Transactions, and
Dealing with Constrain Violations
Ordering
Ordering of Tuples in a Relation
a relation is defined as a set of tuples.
Mathematically, elements of a set have NO
order among them and hence ordering of
tuples in a relation is of no concern.
The ordering indicates first, second, ith,
and last records in the file.
Ordering
Ordering of values within a tuple
The values written within a tuple must be ordered.
The ordering of values in a tuple—and hence of attributes in a relation
schema– is important.
NOTE: An alternate definition of a relation can be given ,making the
ordering of values in a tuple unnecessary. According to the definition of
tuple as a mapping a tuple can be considered as a set of
(<attribute>,<value>)pairs. Here ordering is not important since
attribute name appears with its value.
Chapter 5-22
Key Constrains
For example, consider STUDENT
relation
The attribute set {SSN} is a key of
STUDENT because no two student can
have the same value for SSN
Any set of attributes that includes SSN
– for example {SSN, Name, Age} – is a
superkey
Key Constrains
In general, a relation schema may have more
than one key, in this case, each of the key is
called a candidate key
Chapter 5-30
Referential Integrity Constraints for COMPANY database
Outline
Relational Model Concepts
Domains, Attributes, and Relations
Characteristics of Relations
Relational Model Constrains and
Relational Database Schemas
Update Operations, Transactions, and
Dealing with Constrain Violations
Modification and Updates
In this section, we concentrate on the
database Updates and Modification