NORMALIZATION IN DBMS, Slides of Database Management Systems (DBMS)

this document contains detailed explanation for beginners..it has covered each and every topic in details for those who are eager to learn data base management system.

Typology: Slides

2021/2022

Available from 08/19/2022

SamenKhan
SamenKhan ๐Ÿ‡ต๐Ÿ‡ฐ

231 documents

1 / 49

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Topic: Functional Dependencies and Normalization
Instructor: Lecturer Ayesha Naseer
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31

Partial preview of the text

Download NORMALIZATION IN DBMS and more Slides Database Management Systems (DBMS) in PDF only on Docsity!

Topic: Functional Dependencies and Normalization

Instructor: Lecturer Ayesha Naseer

Overview of Course Outcomes

Database System Design Process Normalization Normalization As refining tool As initial database design tool

Informal Design Guide Lines For Relational Schema

๏‚— Making sure that the semantics of the attributes is

clear in the schema

๏‚— Reducing the redundant information in tuples

๏‚— Reducing the NULL values in tuples

Semantics of the Relation Attributes

Redundant Information in Tuples and Update Anomalies ๏‚— Mixing attributes of multiple entities may cause problems ๏‚— Information is stored redundantly wasting storage ๏‚— Problems with update anomalies ๏‚— Insertion anomalies ๏‚— Deletion anomalies ๏‚— Modification/Update anomalies

Insertion Anomalies ๏‚— Insertion Anomalies. Insertion anomalies can be differentiated into two types, illustrated by the following examples based on the EMP_DEPT relation: โ–  To insert a new employee tuple into EMP_DEPT, we must include either the attribute values for the department that the employee works for, or NULLs (if the employee does not work for a department as yet). โ–  It is difficult to insert a new department that has no employees as yet in the EMP_DEPT relation. The only way to do this is to place NULL values in the attributes for employee. This violates the entity integrity for EMP_DEPT because Ssn is its primary key. Moreover, when the first employee is assigned to that department, we do not need this tuple with NULL values any more.

Deletion Anomalies

Guideline to Redundant Information in Tuples and Update Anomalies ๏‚— GUIDELINE 2: Design a schema that does not suffer from the insertion, deletion and update anomalies. If there are any present, then note them so that applications can be made to take them into account.

Null Values in Tuples

GUIDELINE 3: Relations should be designed such that their tuples will have as few NULL values as possible ๏‚— Attributes that are NULL frequently could be placed in separate relations (with the primary key) ๏‚— Reasons for nulls: ๏‚— attribute not applicable or invalid ๏‚— attribute value unknown (may exist) ๏‚— value known to exist, but unavailable

Functional Dependencies (1)

๏‚— Functional dependencies (FDs) are used to specify formal measures of the "goodness" of relational designs ๏‚— FDs and keys are used to define normal forms for relations ๏‚— FDs are constraints that are derived from the meaning and interrelationships of the data attributes ๏‚— A set of attributes X functionally determines a set of attributes Y if the value of X determines a unique value for Y

Examples of FD constraints (1) ๏‚— social security number determines employee name SSN - > ENAME ๏‚— project number determines project name and location PNUMBER - > {PNAME, PLOCATION} ๏‚— employee ssn and project number determines the hours per week that the employee works on the project {SSN, PNUMBER} - > HOURS

Practice Relation A๏ƒ B true B๏ƒ C false AB๏ƒ C false