DIFFERENT TYPE OF RELATION
TWO TYP OF RELATION
Relational model provides to type relations they are as following
1- basic relation
2- derived relation
1- basic relation - at any given instant of time a given relations is called the base relation.
2- derived relation We can derive relations for base relations and relations that is bring derived from base relation is called the derived relation.
for example
if we take a relations branch with attributes branch_ name, branch_city and assets.
each attribute has appropriate domains.
Thus we can
represent this relations branch branch name City e assets let's its any given
instant time the branch relations look like
THE
BRANCH TABLE
NAME
|
CITY
|
ASSETS
|
downtone
|
Brooklyn
|
400000
|
Red wood
|
Palo
|
820000
|
Mainus
|
Rye
|
200000
|
Perryridge
|
Horsenake
|
400080
|
Tollly
|
Bhunhat
|
214000
|
If there is any
derived relations say branch view which give the assets as name city and
assets, where name is derived from branch name city is derived from branch city
and assets is assets 1000000. that derived relations would looks like table.
THE DERIVED BRANCH – VIEW
NAME
|
CITY
|
ASSETS
|
downtone
|
Brooklyn
|
200000
|
Red wood
|
Palo
|
500000
|
Mainus
|
Rye
|
200302
|
Perryridge
|
Horsenake
|
4000
|
Tollly
|
Bhunhat
|
210000
|
Derived relations
of view or directly depend on the basic relation. as if we changing basic
relations these changes directly reflect in derived relations.
For example we
delete the tuple representing branch Perriyridge and its information then
resultant relations we are left which will be as follows:-
THE BRANCH RELATION
NAME
|
CITY
|
ASSETS
|
downtone
|
Brooklyn
|
400000
|
Red wood
|
Palo
|
820000
|
Mainus
|
Rye
|
200000
|
Perryridge
|
Horsenake
|
400080
|
Tollly
|
Bhunhat
|
214000
|
THE BRANCH VIEW
NAME
|
CITY
|
ASSETS
|
downtone
|
Brooklyn
|
200000
|
Red wood
|
Palo
|
500000
|
Mainus
|
Rye
|
200302
|
Perryridge
|
Horsenake
|
4000
|
Tollly
|
Bhunhat
|
210000
|
So from these
examples we can conclude
that -
1- view reflect the
change in the basic relations directly
2- attributes in
the view can be defined as any valid relations expression relation expression
may include any attribute values that correspond to be tuple and any constant
as per the need.
3- number and name
of attributes in view are independent to that of relations.
One major
difference between relation is to have a set of tuple but views to not. you
just uses the The tuples of the base relations at that instant of time. in case
of relations the definition of the relation as The tuples are stored. while in
will facilitate the applications without putting load over the database.
case of view only the definitions of view for stored , so having some useful we
Derived relations
i.e view not necessarily user the attributes of single relations. it may have
relation expression that uses some attitude one relations and some of other
included and the rule applied over them is the same.
there is no specifications of the number of relations that the expression may
1 comment:
thanks visit my site
Post a Comment
thank to you