Download - c Odds Rules
-
8/22/2019 c Odds Rules
1/28
-
8/22/2019 c Odds Rules
2/28
1.The Information Rule
All Information is explicitly andlogically represented in tables asdata values.
-
8/22/2019 c Odds Rules
3/28
2.The Rule Of Guaranteed Access
Every item of data must be logicallyaddressable with the help of a name,primary key value and column name.
-
8/22/2019 c Odds Rules
4/28
3.The Systematic treatment ofnull values
The RDBMS must be able to
support null values (these valuesare different are different fromzeros and spaces) to present
missing or inapplicableinformation.
-
8/22/2019 c Odds Rules
5/28
4.The Database Description Rule
A description of database is
manipulated using logical structureswith which data was defined theRDBMS. These are accessible to users
with appropriate authority and arestored in the dictionary
-
8/22/2019 c Odds Rules
6/28
5.Comprehensive Data Sub Language
According to this rule, the system mustthe following
Data definitionView definitionData manipulation
Integrity constraintsAuthorizationTransaction management operations
-
8/22/2019 c Odds Rules
7/28
6. The View Updating Rule
All views that are theoreticallyupdateable must also be updateable bysystem.
-
8/22/2019 c Odds Rules
8/28
7. The Insert and Update Rule
A single operand must hold good forall retrieval, update delete and insertactivities. This rule implies that all thedata manipulation commands must beoperational on sets of rows having a
relation rather than on a single row.
-
8/22/2019 c Odds Rules
9/28
8. The Physical Independence Rule
Application programs must remainunimpaired when any changes aremade in storage representation or
access methods.
-
8/22/2019 c Odds Rules
10/28
9. The Logical Data IndependenceRule
The changes that are should affect the
users ability to work with the data. Thechange can be splitting the table intomany more tables.
-
8/22/2019 c Odds Rules
11/28
10. The Integrity IndependenceRule
The Integrity constraints should bestored in the system catalog or in thedatabase as a table.
-
8/22/2019 c Odds Rules
12/28
11. The Distribution Rule
The System must be able to accessor manipulate the data that isdistributed in other systems.
-
8/22/2019 c Odds Rules
13/28
12. The Non-Subversion Rule
The non-subversion rule states thatdifferent levels of the language cannotsubvert or bypass the integrity rules and
constraints. To put it in simple words, ifan RDBMS supports a lower levellanguage then it should not bypass any
integrity constraints defined in thehigher level.
-
8/22/2019 c Odds Rules
14/28
-
8/22/2019 c Odds Rules
15/28
Normalization theory is built the concept ofnormal forms.
Normalizations reduces redundancy.Redundancy is unnecessary repetition of data.It can cause problems with storage andretrieval of data.
During the process of normalization,dependencies can be identified, which cancause problems during deletion and updation.
Normalization theory is based on thefundamental notation of functional dependency.Normalization helps in simplifying the structureof tables.
-
8/22/2019 c Odds Rules
16/28
First Normal Form
consider an example, One employeehas different project codes. Hence the
Projcode is said to be functionallydependent on the attribute Ecode. Nowconsider an unnormalized data that isrepresented in the following Table.
-
8/22/2019 c Odds Rules
17/28
Ecode Dept Projcode Hours
101
343
987
Accounts
Admin
Sales
2040
4156782045
90101
6050924867
-
8/22/2019 c Odds Rules
18/28
A relational model does not permit orsupport such unnormalized tables. The datatable must be present atleast in the firstnormal form.
Ecode Dept Projcode Hours
101
101
101
343
343
987
987
Accounts
Accounts
Accounts
Admin
Admin
Sales
Sales
20
40
41
56
78
20
45
90
101
60
50
92
48
67
-
8/22/2019 c Odds Rules
19/28
Second Normal Form
In the previous form it was noted thatthere was redundancy of data, andhence the table was decomposed
withoutany loss of information. The problemsencountered here were:
Insertion:Employee details cannot berecorded until the employee is assigned
a project.
-
8/22/2019 c Odds Rules
20/28
Updation: The employee code anddepartment is repeated. Hence if anemployee is transferred to anotherdepartment, these changes must bereflected everywhere. Any omission
will lead inconsistencies.
Deletion: If an employee completeshis project, his record will be deleted
and details pertaining to thatemployee lost.
-
8/22/2019 c Odds Rules
21/28
Ecode Dept
101
343987
Accounts
AdminSales
Ecode Projcode Hours
101101
101343343987
987
2040
41567820
45
90101
60509248
67
-
8/22/2019 c Odds Rules
22/28
Third Normal FormA table is said to be in the third
normal form if it in second normalform and every non-key attribute isfunctionally dependent on just the
primary key. The primary key here isEcode. The attribute dept-code isdependent on dept. There is an
indirect dependence on the primarykey, which has to be noticed. It isillustrated in the following table.
-
8/22/2019 c Odds Rules
23/28
Ecode Dept Dept-code
101303
400500600777
FinanceSales
SalesAdminSystemsFinance
909906
906908901909
-
8/22/2019 c Odds Rules
24/28
Even here it was noted that there wereproblems during insertion, updation and
deletion. The relation is thus reduced asshown in the following table.
Ecode Dept
101303
400500600777
FinanceSales
SalesAdminSystemsFinance
Dept Dept-
code
FinanceSales
SalesAdminSystems
Finance
909906
906908901
909
-
8/22/2019 c Odds Rules
25/28
Each non-key attribute is wholly dependentonly on the primary key. Even the thirdnormal form did not satisfy the needs.Hence, a new form called theBoyee-Codd Normal from was introduced.
Boyee-Codd Normal FormThe third normal form was notsatisfactory for relations that had multiplecandidate keys, are unique for each row.Consider that another table that has fewother details, as shown in the followingtable.
-
8/22/2019 c Odds Rules
26/28
Cusno Cusname
100121280
PreethiJaikumar
Shalini
Here the candidate keys are cuscode, andcusname. The attribute cuscode and cusnameare unique for each row. Consider that tablethat has few other details, as shown in thefollowing table.
-
8/22/2019 c Odds Rules
27/28
Cuscode Cusname Itemcode Qty
100100121
280
PreethiPreethiJai Kumar
Shalini
191629
33
426
1
The attributes cuscode and cusname of theabove two tables can be used to link thesetables. These act as a foreign key in thesecond table. These tables can be reduced onorder to minimize redundancy. The tables are
shown below.
-
8/22/2019 c Odds Rules
28/28
Cuscode Itemcode Qty
100101121280
19162923
4261
Cuscode Cusname
100121280
PreethiJai KumarShalini