0% found this document useful (0 votes)
83 views5 pages

Narrative of Database Requirements ER Modelling and Logical Design List of Attributes To Be Stored

This document provides an introduction and overview of database normalization. It begins with a brief introduction and then defines key concepts related to normalization including functional dependency and the three normal forms (1NF, 2NF, 3NF). For each normal form, the document provides a definition and examples to illustrate situations that violate the normal form and how to normalize the data to satisfy the given normal form. The examples include employee qualifications, parts in warehouses, and invoices. Overall, the document serves to explain database normalization at a high level through definitions, examples, and references to further reading materials.

Uploaded by

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

Narrative of Database Requirements ER Modelling and Logical Design List of Attributes To Be Stored

This document provides an introduction and overview of database normalization. It begins with a brief introduction and then defines key concepts related to normalization including functional dependency and the three normal forms (1NF, 2NF, 3NF). For each normal form, the document provides a definition and examples to illustrate situations that violate the normal form and how to normalize the data to satisfy the given normal form. The examples include employee qualifications, parts in warehouses, and invoices. Overall, the document serves to explain database normalization at a high level through definitions, examples, and references to further reading materials.

Uploaded by

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

Motivating Example

INTRODUCTION TO NORMALIZATION
FILM

Introduction
Functional dependency
First normal form
Second normal form

Reference:

Connolly & Begg, Database Systems,


Fifth Edition pp 365-387.
Fourth Edition pp 388-411.

Introduction

List of attributes to Narrative of


be stored database
requirements FUNCTIONAL DEPENDENCY
Normalisation
ER modelling and
logical design For attributes X and Y in a table, if it is invalid to have two
identical values of X with different values of Y
Logical structure then Y is functionally dependent on X.

X (The Determinant) - Key Field(s)


Technique used to eliminate redundancy
Save on space
Y ...... - Non-Key Field(s)
Reduce Maintenance Problems.
Useful for other models e.g. Network, Heirarchical as well as relational.
Five levels of normalisation
A relation in (e.g.) 3rd Normal Form is also in first and second normal
forms.
PUGH COMPUTERS LTD
INVOICE NO
TEL: 99999999999999
IDENTIFYING FUNCTIONAL DEPENDENCIES FAX: 8888888888888 EA200106
ACCOUNT NO
INVOICE TO: ZZZ002
(1) Examining Data ADVICE NOTE INVOICE DATE
Order Number S-Name S-Address Date Total VISA SALES 07.02.09
6288885 Micro-Focus Newbury 17/11/17 1980.00
7392103 RS Glasgow 17/11/17 1980.00 QUANTITY DESCRIPTION UNIT OF SALE COST
7439601 Grey Matter Glasgow 18/11/17 3520.00
7832019 RS Leeds 19/11/17 305.60 3 AutoCAD 3 599.00
1 Vectorworks EACH 149.00

(2) Examine the Enterprise Policy 1 POST & PACKAGE


(PARCELINE)
EACH 10.00

Each order is placed with one supplier and has a unique serial
number... ZZZ002

DELIVERY ADDRESS: GOODS 748.00


J.N.WILSON VAT 130.90
DEPARTMENT OF CIS
UNIVERSITY OF STRATHCLYDE INVOICE TOTAL 878.90

FIRST NORMAL FORM

Definition

Invoice Invoice , Invoice no, Delivery address, A table is in first normal form (1NF) if the intersection of each
no date Goods, VAT,Total, Invoice to row with each column contains exactly one value.
Description Cost All occurrences of a record type must contain the same
number of facts
Invoice no, Description Quantity
Methods for bringing a table into 1NF:

1.‘flattening the table’: create new rows for the repeating data,
filling in the created blank spaces by copying the non repeating
data

2. place repeating data with a copy of key attributes into new table
QUALIFICATION
FIRST NORMAL FORM
All occurrences of a record type must contain the same number of facts Emp_id Qualification Date

EMPLOYEE_QUALIFICATIONS
Emp_id Emp name Qualification Date 090123 B.Sc. 27-Jun-09
123211 M.A. 23-Apr-00
090123 Green B.Sc. 27-Jun-09
123211 James M.A.,M.Sc. 23-Apr-00,27-Jun-09 123211 M.Sc. 27-Jun-09
343242 Smith B.Sc. 03-Oct-05 343242 B.Sc. 03-Oct-05

NORMALISATION: EMPLOYEE
Either make sure each record contains the same number of facts by adding Emp_id Emp name
new records-
EMPLOYEE_QUALIFICATIONS 090123 Green
Emp_id Emp name Qualification Date 123211 James
343242 Smith
090123 Green B.Sc. 27-Jun-09
123211 James M.A. 23-Apr-00
123211 James M.Sc. 27-Jun-09
343242 Smith B.Sc. 03-Oct-05

SECOND AND THIRD NORMAL FORMS


Second Normal Form
A non-key field must provide a fact about the key, the whole
key and nothing but the key. Violated when a non-key Field is a fact about a subset of a key.

“non-key attribute”
PART_WAREHOUSE
An attribute not contained in any candidate key.
Part Warehouse Quantity Warehouse Address
P1 GLA NTH 300 Saracen Street, Glasgow
“candidate key” P2 GLA STH 20 Saracen Street, Glasgow
Any key of the relation (including the primary key). P1 GLA STH 300 Saracen Street Glasgow
P1 EDI 500 Baltic Street, Edinburgh
P3 EDI 500 Baltic Street, Edinburgh
P1 LEE 500 Carlisle Street, Leeds
SECOND NORMAL FORM
Warehouse address is repeated
Definition Change of address of Glasgow Warehouse requires all addresses to be changed
Possible inconsistencies after change of address
A table is in 2NF if it is in 1NF and every non-key attribute is
Warehouse has to store parts in order to preserve its address.
fully functionally dependant on any candidate key.
Part, Warehouse Quantity

Warehouse Warehouse_address

In second normal form


PQW
Part Warehouse Quantity

P1 GLA NTH 300


P2 GLA STH 20
P1 GLA STH 300
P1 EDI 500
P3 EDI 500
P1 LEE 500
WA
Warehouse Warehouse_address

GLA NHT Saracen Street, Glasgow


GLA STH Saracen Street, Glasgow
EDI Baltic Street, Edinburgh
LEE Carlisle Street, Leeds
Normalisation is used to produce a database deign
From a list of attributes

1NF – No non-atomic values

Functional dependency

2NF – Non key attributes fully functionally dependent


on key

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy