Professional Documents
Culture Documents
Definition
• This is the process which allows you to winnow out
redundant data within your database.
• This involves restructuring the tables to successively
meeting higher forms of Normalization.
• A properly normalized database should have the
following characteristics
– Scalar values in each fields
– Absence of redundancy.
– Minimal use of null values.
– Minimal loss of information.
Update Anomalies
Relations that have redundant data may
have problems called update anomalies,
which are classified as ,
Insertion anomalies
Deletion anomalies
Modification anomalies
Example of Update Anomalies
Figure 1 StaffBranch
relation
Example of Update Anomalies (2)
Staf
f
staffNo sName position salary branceNo
SL21 John White Manager 30000 B005
SG37 Ann Beech Assistant 12000 B003
SG14 David Ford Supervisor 18000 B003
SA9 Mary Howe Assistant 9000 B007
SG5 Susan Brand Manager 24000 B003
SL41 Julie Lee Assistant 9000 B005
Branch
branceNo bAddress
B005 22 Deer Rd, London
B007 16 Argyll St, Aberdeen
B003 163 Main St,Glasgow
Lossy Decomposition
123-45-6789 Kim 882-0000 1984-April-29
987-65-4321 Kim 869-9999 1981-01-16
Number of Tables
Redundancy
– Third Normal Form (3NF)
Complexity
– Boyce-Codd Normal Form (BCNF)
– Fourth Normal Form (4NF)
– Fifth Normal Form (5NF)
– Domain Key Normal Form (DKNF)
0-55-123456-9 Main Street Small House 714-000-0000 $22.95 0-55-123456-9 Jones 123-333-3333
B is
A functionally B
dependent on
A
Determina dependency
the left-hand side of the arrow of a functional
nt Refers to the attribute or group of attributes on
Functional dependencies
• Consider a relational schema R, and let α c
R and β c R.
• The functional dependency α β holds on
schema r( R), for all pairs of tuples t1 and
t2 in r such that t1[α] = t2[α] , is also the
case t1[β]=t2[β].
Functional Dependencies
1. If one set of attributes in a table determines another set of
attributes in the table, then the second set of attributes is
said to be functionally dependent on the first set of
attributes.
Example 1
Example 3
AuID AuName AuPhone
1 Sleepy 321-321-1111
Table Scheme: {AuID, AuName, AuPhone}
2 Snoopy 232-234-1234 Functional Dependencies: {AuId} {AuPhone}
3 Grumpy 665-235-6532 {AuId} {AuName}
4 Jones 123-333-3333 {AuName, AuPhone} {AuID}
5 Smith 654-223-3455
6 Joyce 666-666-6666
7 Roman 444-444-4444
FD – Example
Database to track reviews of papers submitted to an academic
conference. Prospective authors submit papers for review and possible
acceptance in the published conference proceedings. Details of the
entities
– Author information includes a unique author number, a name, a mailing
address, and a unique (optional) email address.
– Paper information includes the primary author, the paper number, the
title, the abstract, and review status (pending, accepted,rejected)
– Reviewer information includes the reviewer number, the name, the
mailing address, and a unique (optional) email address
– A completed review includes the reviewer number, the date, the paper
number, comments to the authors, comments to the program chairperson,
and ratings (overall, originality, correctness, style, clarity)
FD – Example
Functional Dependencies
– AuthNo AuthName, AuthEmail, AuthAddress
– AuthEmail AuthNo
– PaperNo Primary-AuthNo, Title, Abstract, Status
– RevNo RevName, RevEmail, RevAddress
– RevEmail RevNo
– RevNo, PaperNo AuthComm, Prog-Comm, Date,
Rating1, Rating2, Rating3, Rating4, Rating5
Functional dependency
• Types of functional dependencies:
– Full Functional dependency
– Partial Functional dependency
– Transitive dependency
Full dependencies
Partial dependencies
Transitive dependencies
Trivial Functional Dependencies
• Functional dependencies are said to be trivial
because they satisfied by all relation.
• A functional dependency of the form
α β is trivial if β C α.
Functional Dependencies (2)
2. Each manager can have more than one child Mary NULL Adam
3. Each manager can supervise more than one employee
4. 4NF Violated