Professional Documents
Culture Documents
QDUS Session 06
QDUS Session 06
Ver.
Ver. 1.0
1.0 Slide
Slide11of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Understanding Data Redundancy
Redundancy:
Increases the time involved in updating, adding, and deleting
data.
Increases the utilization of disk space and hence, disk I/O
increases.
Redundancy can, therefore, lead to:
Insertion, modification, and deletion of data, which may cause
inconsistencies.
Errors, which are more likely to occur when facts are repeated.
Unnecessary utilization of extra disk space.
Ver.
Ver. 1.0
1.0 Slide
Slide22of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Understanding Data Redundancy (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide33of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization
Normalization:
Is a method of breaking down complex table structures into
simple table structures by using certain rules.
Has the following benefits:
It helps in maintaining data integrity.
It helps in simplifying the structure of tables, therefore, making a
database more compact.
It helps in reducing the null values, which reduces the complexity
of data operations.
Ver.
Ver. 1.0
1.0 Slide
Slide44of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide55of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide66of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide77of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide88of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide99of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide10
10of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Understanding
the First Normal Form (1NF)
Ver.
Ver. 1.0
1.0 Slide
Slide11
11of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide12
12of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide13
13of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Functional dependency:
Attribute A is functionally dependent on B if and only if, for
each value of B, there is exactly one value of A.
Attribute B is called the determinant.
Ver.
Ver. 1.0
1.0 Slide
Slide14
14of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Primary key
Ver.
Ver. 1.0
1.0 Slide
Slide15
15of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide16
16of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide17
17of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide18
18of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide19
19of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide20
20of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide21
21of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
IfThe department
an employee
When is of
an employee acompletes
particular
transferred employee
to another a cannot
project,be
work on department, thethe
recorded
change willuntil
employee’s have thetoemployee
record be isThe
recorded
is deleted. assigned
in every a project.
row
information ofregarding
the
EMPLOYEE
the departmenttable.to Any
which omission will lead
the employee to
belongs will also be
inconsistencies.
lost.
Ver.
Ver. 1.0
1.0 Slide
Slide22
22of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide23
23of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Understanding
the Second Normal Form
Ver.
Ver. 1.0
1.0 Slide
Slide24
24of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide25
25of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide26
26of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide27
27of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Understanding
the Third Normal Form (3NF)
Ver.
Ver. 1.0
1.0 Slide
Slide28
28of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide29
29of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide30
30of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide31
31of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Normalization (Contd.)
Understanding
the Boyce-Codd Normal Form
Ver.
Ver. 1.0
1.0 Slide
Slide32
32of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Just a minute
Solution:
Normalization
Ver.
Ver. 1.0
1.0 Slide
Slide33
33of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Just a minute
Solution:
Third normal form
Ver.
Ver. 1.0
1.0 Slide
Slide34
34of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Understanding Denormalization
Ver.
Ver. 1.0
1.0 Slide
Slide35
35of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Denormalization
Ver.
Ver. 1.0
1.0 Slide
Slide36
36of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Definition of Denormalization (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide37
37of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Just a minute
Solution:
denormalization
Ver.
Ver. 1.0
1.0 Slide
Slide38
38of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Summary
Ver.
Ver. 1.0
1.0 Slide
Slide39
39of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Summary (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide40
40of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
Summary (Contd.)
Ver.
Ver. 1.0
1.0 Slide
Slide41
41of
of69
42
Querying Data
Introduction toUsing SQL Database
Relational Server Management Systems
What’s Next?
Ver.
Ver. 1.0
1.0 Slide
Slide42
42of
of69
42