You are on page 1of 17

Database and Web Database

Systems
CT014-3-2

Normalization I

Topic & Structure of the Lesson • Purpose of normalization. • How functional dependencies can be used to group attributes into relations that are in a known normal form CT014-3-2 Database and Web Database Systems Normalization I Slide 2 (of 17) . • Problems associated with redundant data. • Identification of various types of update anomalies. • Identifying functional dependencies.

•Identify the various types of update anomalies. CT014-3-2 Database and Web Database Systems Normalization I Slide 3 (of 17) . •Demonstrate how functional dependencies can be used to group attributes into relations that are in a known normal form.Learning Outcomes By the end of this lesson YOU should be able to: •Explain the purpose of normalization. •Identify functional dependencies. •Discuss problems associated with redundant data.

Keywords • If you have mastered this topic. CT014-3-2 Database and Web Database Systems Normalization I Slide 4 (of 17) . given the data requirements of an enterprise. you should be able to use the following terms correctly in your assignments and exams: • Normalization – A technique for producing a set of relations with desirable properties. • Determinant – determines the value of other attributes in the tuples.

CT014-3-2 Database and Web Database Systems Normalization I Slide 5 (of 17) . its relationships.Normalization • Main objective in developing a logical data model for relational database systems is to create an accurate representation of the data. • To achieve this objective. must identify a suitable set of relations. and constraints.

• A relation can be normalized to a specific form to prevent possible occurrence of update anomalies. CT014-3-2 Database and Web Database Systems Normalization I Slide 6 (of 17) . second (2NF) and third (3NF) normal forms. • Based on functional dependencies among the attributes of a relation.Normalization • Three most commonly used normal forms are first (1NF).

CT014-3-2 Database and Web Database Systems Normalization I Slide 7 (of 17) . • Problems associated with data redundancy are illustrated by comparing the following Staff and Branch relations with the StaffBranch relation.Data Redundancy • Major aim of relational database design is to group attributes into relations to minimize data redundancy and reduce file storage space required by base relations.

Data Redundancy .Example CT014-3-2 Database and Web Database Systems Normalization I Slide 8 (of 17) .

Update Anomalies • Relations that contain redundant information may potentially suffer from update anomalies. • Types of update anomalies include: – Insertion. – Modification. CT014-3-2 Database and Web Database Systems Normalization I Slide 9 (of 17) . – Deletion.

Quick Review Question • Based on the StaffBranch relation.give one example for each of the following update anomalies: – Insertion – Update – Deletion CT014-3-2 Database and Web Database Systems Normalization I Slide 10 (of 17) .

• Functional Dependency – Describes relationship between attributes in a relation. CT014-3-2 Database and Web Database Systems Normalization I Slide 11 (of 17) . B is functionally dependent on A (denoted A B). – If A and B are attributes of relation R. if each value of A in R is associated with exactly one value of B in R.Functional Dependency • Main concept associated with normalization.

• Diagrammatic representation: • Determinant of a functional dependency refers to attribute or group of attributes on left-hand side of the arrow. CT014-3-2 Database and Web Database Systems Normalization I Slide 12 (of 17) .Functional Dependency • Property of the meaning (or semantics) of the attributes in a relation.

Quick Review Question •State the functional dependencies in the Brach and Staff relations. CT014-3-2 Database and Web Database Systems Normalization I Slide 13 (of 17) .

lowercase letters and numbers are values): A a1 a1 a2 a2 B b2 b2 b3 b4 C c2 c2 c2 c5 D d3 d1 d1 d1 E e2 e4 e5 e5 Circle the functional dependencies that seem to apply to Z.   I i) E  D ii) D  E B vv) E  A and Web Database vi) Systems BC CT014-3-2 Database iii) C  A vii) B  D Normalization I iv) E viii) B Slide 14 (of 17) .Exercise Consider the following relation (capitalized letters are attribute names.

• Identifying functional dependencies. • Identification of various types of update anomalies. • How functional dependencies can be used to group attributes into relations that are in a known normal form CT014-3-2 Database and Web Database Systems Normalization I Slide 15 (of 17) .Summary So far we discussed about the: • Problems associated with redundant data.

Question and Answer Session Q&A CT014-3-2 Database and Web Database Systems Normalization I Slide 16 (of 17) .

Next Session • Normalisation PART 2 CT014-3-2 Database and Web Database Systems Normalization I Slide 17 (of 17) .