Post on 10-Feb-2018
transcript
7/22/2019 Codds Rules Powerpoint Presentation1
1/27
Codds Twelve Rules
Rules that a DBMS should
follow to be classified asfully relational
7/22/2019 Codds Rules Powerpoint Presentation1
2/27
Oracles grading scale
0 = doesnt meetcriteria
1/2 = meets some ofthe criteria
1 = meets the criteria
7/22/2019 Codds Rules Powerpoint Presentation1
3/27
1. Information Rule
information is to be represented as datastored in cells
Vehicle Identification Number in one cellwould violate this rule
paint color
body style
7/22/2019 Codds Rules Powerpoint Presentation1
4/27
2. Guaranteed access rule
Each data item must be accessible bycombination of
table name + primary key of row +columnname
violation of rule--ability to access by usingarrays or pointers
7/22/2019 Codds Rules Powerpoint Presentation1
5/27
How does Oracle fair on
the 1st two points??
BLOBs-Binary Large OBjectsearly RDBMS technique to store and manage
multimedia data types
typically stored outside the database (in files), and
pointers are placed in their corresponding columnpositions
BLOBs push the 1st two rules
Implementation is transparent to the user
Do not explicitly break 1st two rulesScore 1 1/21/2 pt deducted for bad conduct
competitors grade out the same
7/22/2019 Codds Rules Powerpoint Presentation1
6/27
3. Nulls must be used in a
consistent manner
Violation--0 used as value for missingnumbers and blank for missing character
valuescorrect way--nulls simply be missing data
and have no values
If values are desired for missing data,vendors usually offer the ability to usedefaultsfor this purpose.
7/22/2019 Codds Rules Powerpoint Presentation1
7/27
Grade for rule 3
1/2
current implementation for nulls in SQL is
poor for all vendorshas been attacked by Codd and another
relational pioneer, C. J. Date
Codd proposes 3 valued logic
Date proposes abolishing of nulls altogether
some very real data problems with the use ofNULLs today in RDBMSs.
7/22/2019 Codds Rules Powerpoint Presentation1
8/27
4. An active, online data
dictionary should be stored
as relational tables andaccessible through the
regular data access
language.
If any part of the data dictionary is stored
in the operating system, this rule wouldbe violated.
7/22/2019 Codds Rules Powerpoint Presentation1
9/27
Grade for rule 4
1/2
Oracle allows SELECT only, but INSERT,
UPDATE, and DELETE are not possibleThis probably should not occur frequently
and may not even be desired, but it should
be possible according to rule 4.
7/22/2019 Codds Rules Powerpoint Presentation1
10/27
7/22/2019 Codds Rules Powerpoint Presentation1
11/27
7/22/2019 Codds Rules Powerpoint Presentation1
12/27
6. All views that may be
updatable should beupdatable.
If, for example, you could join threetables as the basis for a view, but not beable to update that view, then this rule
would be violated.
7/22/2019 Codds Rules Powerpoint Presentation1
13/27
Rule 6 Grade
1/2
Improved for version 8 over 7
Version 8 is not 100% compliant
7 Th t b t l l
7/22/2019 Codds Rules Powerpoint Presentation1
14/27
7. There must be set-level
inserts, updates, and
deletes.
Currently, this is provided by most RDBMSvendors to some degree.
7/22/2019 Codds Rules Powerpoint Presentation1
15/27
7/22/2019 Codds Rules Powerpoint Presentation1
16/27
8. Physical data
independence.
An application cannot depend on physicalrestructuring. If a file supporting table
was moved from one disk to another, orrenamed, then this should have no impacton the application.
7/22/2019 Codds Rules Powerpoint Presentation1
17/27
7/22/2019 Codds Rules Powerpoint Presentation1
18/27
9. Logical data
independence.
How a User views data should not changewhen the logical structure (tables
structure) of the database changes.This rule is particularly difficult to satisfy.
Most databases rely on strong tiesbetween the user view of the data andthe actual structure of the underlyingtables.
7/22/2019 Codds Rules Powerpoint Presentation1
19/27
7/22/2019 Codds Rules Powerpoint Presentation1
20/27
10. Integrity independence.
Integrity rules should be stored in thedata dictionary. Primary key constraints,
foreign key constraints, check constraints,triggers, and so forth should all be storedin the data dictionary.
7/22/2019 Codds Rules Powerpoint Presentation1
21/27
7/22/2019 Codds Rules Powerpoint Presentation1
22/27
11. Distribution dependence.
A database should continue to workproperly even if distributed (extension of
rule 8 -- except rather than only beingdistributed on a single system (locally), adatabase may also be distributed across a
network of systems (remotely).
7/22/2019 Codds Rules Powerpoint Presentation1
23/27
Rule 11 Grade
1/2
Oracle does offer
database links, snapshots, symmetric replication, and distributed
database with a two-phase commit (2PC).
Some of the networking is user-apparent, 2PC works butnot well, and replication has its own problems
Majority of complaints center on the fact that all these
capabilities require the user to know more than oneshould have to know about the setup behind thetechnology
7/22/2019 Codds Rules Powerpoint Presentation1
24/27
12. The nonsubversion rule.
If low-level access is allowed, it must not bypasssecurity nor integrity rules, which would otherwise beobeyed by the regular data access language. A backup
or load utility, for example, should not be able to bypassauthentication, constraints, and locks. However,vendors often provide these abilities for the sake ofspeed. It is then the DBAs responsibility to ensure thatsecurity and integrity, if momentarily compromised, arereinstated. An example is disabling and re-enablingconstraints for a VLDB load.
7/22/2019 Codds Rules Powerpoint Presentation1
25/27
Through some of its utilities, such asSQL*Loader and Import, Oracle allows
data to be stored in the database bybypassing the standard SQL route,opening up the database to potentialcorruption
7/22/2019 Codds Rules Powerpoint Presentation1
26/27
Final Grade
8 1/2 out of 12
give or take a point
Point is not the precision of final score
FACT--Oracle does not meet all of Codds
12 rules
Neither does Sybase nor Informix
It is a RDBMS
Oracle and its competitors have more workto do
Oracle 7 only fully passed rule 10
7/22/2019 Codds Rules Powerpoint Presentation1
27/27
Codds Rule Zero
For a system to qualify as a RDBMS, thatsystem must use its relational facilities
exclusively to manage the database.Meet all fundamentals discussed in
relational database chapter and these 12
rules --- database may be designated asrelational