Documente Academic
Documente Profesional
Documente Cultură
DESIGN
NORMALIZATION
PRE REQUISITES
Domain knowledge
Functional Dependencies
Keys
GOAL
3. No spurious tuples
4. No Redundancy
5. No modification anomaly
4
1. RELATION FOR EVERY ENTITY
5
Attributes of different entities (EMPLOYEEs,
DEPARTMENTs, PROJECTs) should not be
mixed in the same relation
6
2. LESSER NUMBER OF NULL
VALUES:
Relations should be designed such that their
tuples will have as few NULL values as
possible
7
Attributes that are NULL frequently
could
placed in separate relations (with the
be
primary key)
Attribute not applicable or invalid
Attribute value unknown (may exist)
Value known to exist, but unavailable
8
3. DECOMPOSITION (SPURIOUS TUPLES):
a) Non-additive or of the
corresponding join losslessness
b) Preservation of the functional
dependencies.
sacrificed.
LOSSLESS DECOMPOSITION.
It is a process of splitting a relation into
multiple relations and joins back the relations
to get the original relation; This process is
called as lossless decomposition.
11
EXAMPLE
12
13
4. DATA REDUNDANCY
14
A redundancy creates several problems
like the following:
database.
5. MODIFICATION ANOMALY:
Types of anomaly:
1. Update anomalies
2. Deletion anomalies
3. Insert anomalies 16
5.1 Update anomalies
18
5.3 Insert anomalies
19
EXAMPLE1 :
20
Update:
If user changes the name of the project
name, will affect all the tuples which matches
the project name.
Insertion:
Until a employee assigned with a
project,
Project_id, project_name fields will be
empty.
will empty.
Deletion:
22
EXAMPLE 2
23
CLASS WORK
Identify various anomalies for the below relation
24
SOLUTION
25
CLASS WORK
26
SOLUTION
Update anomaly:
Clearly, Name and Address are redundant
(larger relation + you have to update 3 rows
to update the Address)
Insertion anomaly:
Cannot make a record Jones’address
because he is not taking any classes.
Delete anomaly:
Cannot delete Smith’s enrolment
without losing his address as well. 27