A Relational Model of Data For Large Shared Data Banks
A Relational Model of Data For Large Shared Data Banks
T.M.Hennayake
I.Willarachchige
G.M.Ekanayake
Agenda
Abstract
This Paper is concerned with…
Introduction
Data Dependencies in Present Systems
A Relational View of Data
Normal Form
Some Linguistic Ability
Expressible, Named And Stored Relations
Redundancy and Consistency
2
Abstract
In using large data banks we do not need to know the internal
representation of data
Changes in data representation often be needed as a result of changes in,
Query
Update
Report traffic
Natural growth in the types of stored information
When the internal or external representation of data changes, it will
affect to the
Activities of users at terminals
Most Application programs
3
This Paper is concerned with…
Section 1:
Inadequacies of these models are discussed
A model based on n-ary relations, a normal form for
database relations and concept of a universal data
sublanguage are introduced
4
Introduction
This paper concerned with the application of elementary
relation theory to systems which provide shared access to
large banks of formatted data
Problems Identified
Data independence
Independence of application programs
Data inconsistency
Expected to become troublesome even in non-deductive
systems
5
Introduction Cont’d...
Why ER Model became superior….
6
Data Dependencies in Present
Systems
Mainly 3 types
Ordering Dependence
Indexing Dependence
Access Path Dependence
7
Ordering Dependence
Data in a databank can be stored in many different
ways. Elements can be stored in one order or in
different sorted orders
8
Indexing Dependence
Performance Oriented
9
Indexing Dependence Cont’d…
Problem :-
“ Can the application programs/terminals remain
invariant as indices come and go…? “
Solution:-
Have taken different approaches in addressing the
problem
TDMS :- Indexing on all attributes
IMS :- Provides user with a choice for each file
Problem:-
Regardless of the stored representation, terminal activities & programs become
dependent on user access paths
Solution
Defined user access paths not made obsolete until, all programs which uses this
become obsolete. This is Not Practical
11
A Relational View of Data
R(s1, s2, s3, ……….., sn )
12
A Relational View of Data Cont’d…
N- ary Relation
Each row represents an n tuple of R
Active Domain
Primary Key
Foreign Key
Simple Domain
Non simple Domain
14
A Relational View of Data Cont’d…
PK:- one domain of a given relation has values which
uniquely identify each element of that relation.
part part quantity
1 5 9
Component 2 5 7
3 5 2
15
A Relational View of Data Cont’d…
Active Domain:-Set of values represented at some
instance is called as the active domain.
Simple Domain:-Domains whose elements are
nondecomposable(atomic).
NonSimple Domain:-Domains whose elements are
decomposable.
16
Employee
Unnormalized set
Children childname birthyear
18
Some Linguistic Ability
Normalized schema has very high linguistic
power.
descriptive ability
sensible
19
Expressible, named, and stored relations
The named set
Relations that the community of users can
identify by means of a simple name (or identifier)
20
Expressible, named, and
stored relations….
Problem
Determining the class of stored representations to
be supported.
Variety of permitted data arrange and continual
reinterpretation of descriptions for the structures
currently in effect.
21
Redundancy and Consistency
Redundancy
Data redundancy is a data organization issue that allows
the unnecessary duplication of data within the database
Consistency
Consistency is that only valid data will be written to the
database
22
Operations on Relations
Since relations are sets, all of the usual set
operations are applicable to them
23
Redundancy and Consistency
Operations on Relations…..
Permutations
Permutation of a set of values is an arrangement of
those values into a particular order
Example :
permutation of the set consist with 3 columns can be;
3!= 6
{1,2,3} = [1,2,3] , [1,3,2] , [2,1,3] , [2,3,1] , [3,1,2] and
[3,2,1]
24
Operations on Relations Cont’d...
Projection
Striking out the others and then remove from the resulting
array any duplication in the rows
The final array represents a relation which is said to be a
projection of the given relation
Person πAge,Weight(Person)
Name Age Weight
Age Weight
Harry 34 80
34 80
Sally 28 64
28 64
George 29 70
29 70
Helena 54 54
54 54
Peter 34 80
25
Operations on Relations Cont’d…
Join
26
Operations on Relations Cont’d…
Example : Natural Join
Employee Dept
DeptName Manager
Name EmpId DeptName
Finance George
Harry 3415 Finance
Sales Harriet
Sally 2241 Sales
Production Charles
George 3401 Finance
Harriet 2202 Sales
Employee join Dept
DeptNam
Name EmpId e Manager
27
Operations on Relations cont’d…
Composition
Thus, two relations are composable if and only if they
are joinable
28
Operations on Relations Cont’d…
Restriction
A subset of a relation is a relation.
29
Redundancy
Data redundancy is a data organization issue
that allows the unnecessary duplication of
data
StrongRedundancy
Weak Redundancy
30
Strong Redundancy
Least one relation that possesses a
projection which is derivable from other
projections of relations in the set
31
Weak Redundancy
A collection of relations is weakly redundant if it
contains a relation that has a projection
32
Consistency
33
Consistency
Ways to detect and respond to
inconsistencies