0% found this document useful (0 votes)
198 views35 pages

Database Management System: Course Outcome

The document discusses normalization of database tables. It provides information on: 1) The goals of normalization which are to eliminate redundant data and ensure logical data storage. 2) An overview of normal forms from 1NF to BCNF and the relationships between them. 3) The reasons for normalization which are to minimize data redundancy, make the database structure flexible, ensure consistent data, and make complex queries easier. 4) Explanations and examples of first, second, and third normal forms. It defines the rules for tables to be in each normal form and provides illustrations.

Uploaded by

Vishal Tesla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
198 views35 pages

Database Management System: Course Outcome

The document discusses normalization of database tables. It provides information on: 1) The goals of normalization which are to eliminate redundant data and ensure logical data storage. 2) An overview of normal forms from 1NF to BCNF and the relationships between them. 3) The reasons for normalization which are to minimize data redundancy, make the database structure flexible, ensure consistent data, and make complex queries easier. 4) Explanations and examples of first, second, and third normal forms. It defines the rules for tables to be in each normal form and provides illustrations.

Uploaded by

Vishal Tesla
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 35

Department of Computer Science and Engineering (CSE)

Database
Management
System

Course Outcome Will be covered in


CO Title Level this lecture
Number
CO1 To perceive the significance and Remember
implementation of a commercial  
relational database system (Oracle)
by writing SQL using the system.
CO2 To understand the relational database Understand
theory, and be able to write  
relational algebra expressions for
queries
CO3 To identify the basic issues of Analysis and
transaction processing and application
concurrency control and find out its
solutions.

2
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Contents of the Syllabus

UNIT-I [10h]
Overview of Databases: Database concepts, DBMS, Data Base System Architecture (Three
Level ANSI-SPARC Architecture), Advantages and Disadvantages of DBMS, Data Independence,
DBA and Responsibilities of DBA, Relational Data Structure, Keys, Relations, Attributes, Schema and
Instances, Referential integrity, Entity integrity.
Data Models: Relational Model, Network Model, Hierarchical Model, ER Model: Design,
issues, Mapping constraints, ER diagram, Comparison of Models.
Relational Algebra & Relational Calculus: Introduction, Syntax, Semantics, Additional
operators, Grouping and Ungrouping, Relational comparisons, Tuple Calculus, Domain Calculus,
Calculus Vs Algebra, Computational capabilities.

UNIT-II [10h]
Functional dependencies and Normalization: Functional dependencies, Decomposition, Full
Functional Dependency (FFD), Transitive Dependency (TD), Join Dependency (JD), Multi-valued
Dependency (MVD), Normal Forms (1NF, 2NF, 3NF, BCNF), De-normalization.
Database Security: Introduction, Threats, Counter Measures.
Control Structures: Introduction to conditional control, Iterative control and sequential control
statements, Cursors, Views.

3
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
Contents of the Syllabus

UNIT-III [10h]
Package, Procedures and Triggers: Parts of procedures, Parameter modes, Advantages of
procedures, Syntax for creating triggers, Types of triggers, package specification and package body,
developing a package, Bodiless package, Advantages of packages.
Transaction Management and Concurrency Control: Introduction to Transaction Processing,
Properties of Transactions, Serializability and Recoverability, Need for Concurrency Control, Locking
Techniques, Time Stamping Methods, Optimistic Techniques and Granularity of Data items.

Database Recovery of database: Introduction, Need for Recovery, Types of errors, Recovery
Techniques.

4
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)

Introduction to Normalization
• Normalization: Process of decomposing unsatisfactory "bad" relations
by breaking up their attributes into smaller relations
• Normalization is the process of removing redundant data from your
tables in order to improve storage efficiency, data integrity and
scalability.
• This improvement is balanced against an increase in complexity and
potential performance losses from the joining of the normalized tables at
query-time.
• There are two goals of the normalization process: eliminating redundant
data (for example, storing the same data in more than one table) and
ensuring data dependencies make sense (only storing related data in a
table). Both of these are worthy goals as they reduce the amount of space
a database consumes and ensure that data is logically stored.

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

Introduction to Normalization
Normal form: Condition using keys and FDs of a relation to certify whether a relation
schema is in a particular normal form
– 2NF, 3NF, BCNF based on keys and FDs of a relation schema
– 4NF based on keys, multi-valued dependencies
There is a sequence to normal forms:
– 1NF is considered the weakest,
– 2NF is stronger than 1NF,
– 3NF is stronger than 2NF, and
– BCNF is considered the strongest

Also,
– any relation that is in BCNF, is in 3NF;
– any relation in 3NF is in 2NF; and
– any relation in 2NF is in 1NF.

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

WHY WE NEED
NORMALIZATION?
Normalization is the aim of well design Relational Database Management
System (RDBMS). It is step by step set of rules by which data is put in its
simplest forms. We normalize the relational database management
system because of the following reasons: 
– Minimize data redundancy i.e. no unnecessarily duplication of data.
– To make database structure flexible i.e. it should be possible to add new data values and
rows without reorganizing the database structure.
– Data should be consistent throughout the database i.e. it should not suffer from following
anomalies.
– Complex queries required by the user should be easy to handle.

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

Normalization
Systematic process of reducing the redundancy and avoiding the existing anomalies in
the relation.

Objectives of Normalization

 Develop a good description of the data, its relationships and constraints


 Produce a stable set of relations that
 Is a faithful model of the enterprise
 Is highly flexible
 Reduces redundancy-saves space and reduces inconsistency in data
 Is free of update, insertion and deletion anomalies

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

Types of Normalization

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

1 Normal Form
As per the rule of first normal form, an attribute (column) of a table cannot hold
multiple values. It should hold only atomic values.

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

First Normal Form


• 1NF (First Normal Form) Rules

• Each table cell should contain a single value.


• Each record needs to be unique

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

Normalization for refinement of Data

Approach: Decomposition of table

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

Second Normal Form

• For a table to be in the Second Normal Form, it must satisfy


two conditions:
1. The table should be in the First Normal Form.
2. There should be no Partial Dependency.

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

What is Partial Dependency?

Together, student_id + subject_id forms a Candidate Key(learn about for this table, which can be the Primary
key.
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

Third Normal Form


• For a table to be in the third normal form,
1. It should be in the Second Normal form.
2. And it should not have Transitive Dependency.

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

4th Normal Form


• For a table to satisfy the Fourth Normal Form, it should
satisfy the following two conditions:
1. It should be in the Boyce-Codd Normal Form.
2. And, the table should not have any Multi-valued
Dependency.

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

What is Multi-valued Dependency?

• A table is said to have multi-valued dependency, if the


following conditions are true,
• For a dependency A → B, if for a single value of A,
multiple value of B exists, then the table may have multi-
valued dependency.
• Also, a table should have at-least 3 columns for it to have
a multi-valued dependency.
• And, for a relation R(A,B,C), if there is a multi-valued
dependency between, A and B, then B and C should be
independent of each other.

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

And, in the table above, there is no relationship between the columns course and hobby. They are
independent of each other.
So there is multi-value dependency, which leads to un-necessary repetition of data and other anomalies as
well.

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

Denormalization
- Causes redundancy, but fast performance & no referential integrity
- Denormalize when
• specific queries occur frequently,
• a strict performance is required and
• it is not heavily updated
-So, denormalize only when there is a very clear advantage to doing so and
document carefully the reason for doing so

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)
(1) F
l
a
t
t
e
Typical denormalization techniques
n

r
e
p
e
a
t
i
n
g

g
r
o
u University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)
• M
ak
es
ro
w Problems of Denormalization
lo
n
ge
r
• M
ak
es
da
ta
tr
an
sf
er
lo
n
ge
University Institute of Engineering (UIE)
Department of Computer Science and Engineering (CSE)

FAQ
• What do you understand by functional dependency?
• Explain all normal forms with example.
• How 3rd normal form is differ from BCNF?
• Mention differences between transitive dependency and
multi- valued dependency?

University Institute of Engineering (UIE)


Department of Computer Science and Engineering (CSE)

HOME WORK

1. Functional dependencies are a generalization of :


a. Key dependencies
b. Relation dependencies
c. Database dependencies
d. None of these
2. There are two functional dependencies with the same set of
attributes on the left side of the arrow:
A->BC
A->B
This can be combined as
e. A->BC
f. A->B
g. B->C
h. None of the above

Answers:1.A, 2.A

University Institute of Engineering (UIE) 35


Department of Computer Science and Engineering (CSE)

References
Other References
• Introduction to Database Normalization (softwaretesttips.com
)
• DBMS - Normalization - Tutorialspoint
• Normalization in DBMS: 1NF, 2NF, 3NF and BCNF with Ex
amples (hackr.io)
Suggested Book References
• J. Date, “An Introduction to Database Systems”,Addison
Wesley.
• Navathe,“Fundamentals of Database System”, The
Benjamin / Cummings Publishing Co.

University Institute of Engineering (UIE)

You might also like