Database Reference
In-Depth Information
 Every column in a relation must have a unique name within the relation  All entries in a
column must be of the same kind. They are said to be defined on
the same domain
 Each row in a relation must be unique. Duplication of rows are not allowed in a
relation
 The ordering of rows and columns in a relation is not significant  Each cell or column/
row intersection in a relation should contain only a atomic
value. multiple-values are not allowed in the cells of a relation
4.5.1 Definition
A relation R is a subset of an expanded cartesian product of n, not necessarily distinct do-
mains D 1 ×D 2 ×…,×D n , such that for every element dk=<dk 1 , dk 2 ,…, dk n > R a predefined
proposition p (<dk1,dk2,…,dkn>) is true;
d k Di for every i=l, 2,…, n where k is the number of n tuples in the relation R i
(cardinality of R ) and n is the number of attributes in the relation R (degree of R ). Let
us take an example of first row of the above table, where see ; t(Registration No.) =
6226204201, t(Name) = “Amrik Singh”, t(Semester) = 1, t( Branch) = “CSE” , t( City)
=”Jalandhar”
Relation scheme R, can be represented by set of attributes a 1 , a 2 , a 3 ,….…., a n. None empty
set Di( 1<i <n ) is known as domain of attribute a i . It is denoted as Dom(a i ). A relation r of
relation scheme R is a set of tuples { t 1, t 2, t 3,………………. ,t m) from R to D.
4.6 VIEW
It is a “virtual” table made of fields from one or more tables in the database. The tables
used to compose a view, are called base tables . The relational model refers to a view as
“virtual” because it takes data from base tables rather than storing data on its own. The only
information about a view that is kept in the database is its structure. Many major RDBMS
programs support views Views enable us to see the information in our database from many
different aspects, providing us with a great amount of flexibility. Views are created in a
variety of ways. They are very useful when the base on multiple related tables. For ex-
ample, in a college scheduling database, we can create a view that consolidates data from
the students, classes, courses and class schedules tables.
4.7 CONSTRAINTS
Search WWH ::




Custom Search