Database Management System

Slides:



Advertisements
Similar presentations
Functional dependencies 1. 2 Outline motivation: update anomalies cause: not expressed constraints on data (FDs) functional dependencies (FDs) definitions.
Advertisements

Chapter 5 Normalization of Database Tables
Database Tables and Normalization
5 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Normalization of Database Tables
Chapter 5 Normalization of Database Tables
Chapter 5 Normalization of Database Tables
Relational Terminology. Normalization A method where data items are grouped together to better accommodate business changes Provides a method for representing.
Functional Dependencies and Normalization for Relational Databases
NORMALIZATION FIRST NORMAL FORM (1NF): A relation R is in 1NF if all attributes have atomic value = one value for an attribute = no repeating groups =
Ch 10, Functional Dependencies and Normal forms
Copyright © 2004 Pearson Education, Inc.. Chapter 10 Functional Dependencies and Normalization for Relational Databases.
Monash University Week 7 Data Modelling Relational Database Theory IMS1907 Database Systems.
Normalization of Database Tables
Need for Normalization
Normalization of Database Tables
1 NORMALISATION. 2 Introduction Overview Objectives Intro. to Subject Why we normalise 1, 2 & 3 NF Normalisation Process Example Summary.
Chapter 5 Normalization of Database Tables
Department of Computer Science and Engineering, HKUST Slide 1 Finding All the Keys Computationally, finding all the keys can be done by exhaustive search:
Daniel AdinugrohoDatabase Programming 1 DATABASE PROGRAMMING Lecture on 29 – 04 – 2005.
Week 6 Lecture Normalization
Database Design - Lecture 1
9/14/2012ISC329 Isabelle Bichindaritz1 Database System Life Cycle.
1 DATABASE SYSTEMS DESIGN IMPLEMENTATION AND MANAGEMENT INTERNATIONAL EDITION ROB CORONEL CROCKETT Chapter 7 Normalisation.
Normalization (Codd, 1972) Practical Information For Real World Database Design.
Database Normalization Lynne Weldon July 17, 2000.
M Taimoor Khan Course Objectives 1) Basic Concepts 2) Tools 3) Database architecture and design 4) Flow of data (DFDs)
Functional Dependencies and Normalization for Relational Databases.
Normalization Well structured relations and anomalies Normalization First normal form (1NF) Functional dependence Partial functional dependency Second.
Normalization Ioan Despi 2 The basic objective of logical modeling: to develop a “good” description of the data, its relationships and its constraints.
By Abdul Rashid Ahmad. E.F. Codd proposed three normal forms: The first, second, and third normal forms 1NF, 2NF and 3NF are based on the functional dependencies.
Database Management System. Normalization Normalization is the process of decomposing relations with anomalies to produce smaller, well structured relations.
ABSTRACT OF FIRST LECTURE then … the second lesson.
Chapter 4 Normalization of Database Tables. 2 Database Tables and Normalization Table is basic building block in database design Table is basic building.
Dr. Mohamed Osman Hegaz1 Logical data base design (2) Normalization.
9/23/2012ISC329 Isabelle Bichindaritz1 Normalization.
Normalization.
Chapter 10 Designing Databases. Objectives:  Define key database design terms.  Explain the role of database design in the IS development process. 
Ch 7: Normalization-Part 1
11/10/2009GAK1 Normalization. 11/10/2009GAK2 Learning Objectives Definition of normalization and its purpose in database design Types of normal forms.
1 Information System Analysis Topic-3. 2 Entity Relationship Diagram \ Definition An entity-relationship (ER) diagram is a specialized graphic that illustrates.
NormalisationNormalisation Normalization is the technique of organizing data elements into records. Normalization is the technique of organizing data elements.
Week 4 Lecture Part 1 of 3 Normalization of Database Tables Samuel ConnSamuel Conn, Asst. Professor.
5 1 Chapter 5 Normalization of Database Tables Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Practical Database Design and Tuning
Entity- Relationship (ER) Model
Chapter 5: Relational Database Design
Chapter 4: Relational Database Design
Database Management System
Chapter 15 Basics of Functional Dependencies and Normalization for Relational Databases.
Distributed Database Management Systems
Relational Database Design by Dr. S. Sridhar, Ph. D
From ER to Relational Model
Normalization of Database Tables PRESENTED BY TANVEERA AKHTER FOR BCA 2ND YEAR dated:15/09/2015 DEPT. OF COMPUTER SCIENCE.
Database Management System
Distributed Database Management System
Entity-Relationship Modeling "Extended"
Database Management Systems
Normalization of Database Tables Uploaded by: mysoftbooks.ml
Database Normalisation
Normalization of DB relations examples Fall 2015
Sampath Jayarathna Cal Poly Pomona
DATABASE DESIGN & DEVELOPMENT
NORMALIZATION FIRST NORMAL FORM (1NF):
Database Management System
Database Management System
Review of Week 3 Relation Transforming ERD into Relations
Entity-Relationship Modeling "Extended"
Chapter 7a: Overview of Database Design -- Normalization
Entity-Relationship Modeling "Extended"
Presentation transcript:

Database Management System Lecture - 21 © Virtual University of Pakistan

Normalization Summary A step by step process to make DB design more efficient and accurate A strongly recommended activity performed after the logical DB design phase © Virtual University of Pakistan

Normalization Summary Un-normalized relations are more prone to errors or inconsistencies Normalization is based on the FDs FDs are not created rather identified by the designer/analyst © Virtual University of Pakistan

Normalization Summary Normalization forms exist up to 6NF, however, for most of the situations 3NF is sufficient Performed through Analysis or Synthesis process © Virtual University of Pakistan

Normalization Example Identify FDs Apply on the relevant tables; see if any normalization requirement is being violated, that is, causing some anomaly © Virtual University of Pakistan

Normalization Example PROJNAME PROJMGR EMPID HOURS EMPNAME BUDGET STARTDATE SALARY EMPMGR EMPDEPT RATING Different Data as mentioned in the book… © Virtual University of Pakistan

© Virtual University of Pakistan Some Facts 1.Each project has a unique name, but names of employees and managers are not unique 2.Each project has one manager, whose name is stored in PROJMGR PROJNAME PROJMGR © Virtual University of Pakistan

© Virtual University of Pakistan 3. Many employees may be assigned to work on each project, and an employee may be assigned to more than one project. HOURS tells the number of hours per week that a particular employee is assigned to work on a particular project PROJNAME, EMPID HOURS © Virtual University of Pakistan

© Virtual University of Pakistan 4. Budget stores the amount budgeted for a project, and STARTDATE gives the starting date for a project PROJNAME PROJMGR, BUDGET, STARTDATE © Virtual University of Pakistan

© Virtual University of Pakistan 5. Salary gives the annual salary of an employee EMPID SALARY © Virtual University of Pakistan

© Virtual University of Pakistan 6. EMPMGR gives the name of the employee’s manager, who is not the same as the project manager EMPID EMPMGR © Virtual University of Pakistan

© Virtual University of Pakistan 7. EMPDEPT gives the employee’s department. Department names are unique. The employee’s manager is the manager of the employee’s department EMPDEPT EMPMGR © Virtual University of Pakistan

© Virtual University of Pakistan 8. RATING gives the employee’s rating for a particular project. The project manager assigns the rating at the end of the employee’s work on that project PROJNAME, EMPID RATING © Virtual University of Pakistan

© Virtual University of Pakistan 2 4 4 PROJNAME PROJMGR, BUDGET, STARTDATE 5 6 6,7 EMPID EMPNAME, SALARY, EMPMGR, EMPDEPT 3 8 PROJNAME, EMPID HOURS, RATING 7 EMPDEPT EMPMGR © Virtual University of Pakistan

© Virtual University of Pakistan Original relation: WORK (PROJNAME, PROJMGR, EMPID, HOURS, EMPNAME, BUDGET, STARTDATE, SALARY, EMPMGR, EMPDEPT, RATING) New relations: PROJ ( PROJNAME, PROJMGR, BUDGET, STARTDATE) EMP ( EMPID, EMPNAME, SALARY, EMPMGR, EMPDEPT) WORK ( PROJNAME, EMPID, HOURS, RATING) © Virtual University of Pakistan

© Virtual University of Pakistan PROJ ( PROJNAME, PROJMGR, BUDGET, STARTDATE) EMP ( EMPID, EMPNAME, SALARY, EMPMGR, EMPDEPT) WORK ( PROJNAME, EMPID, HOURS, RATING) © Virtual University of Pakistan

© Virtual University of Pakistan PROJ ( PROJNAME, PROJMGR, BUDGET, STARTDATE) EMP ( EMPID, EMPNAME, SALARY, EMPDEPT) DEPT ( EMPDEPT, EMPMGR) WORK ( PROJNAME, EMPID, HOURS, RATING) © Virtual University of Pakistan

© Virtual University of Pakistan Checking for BCNF © Virtual University of Pakistan

© Virtual University of Pakistan PROJ ( PROJNAME, PROJMGR, BUDGET, STARTDATE) PROJNAME PROJMGR, BUDGET, STARTDATE © Virtual University of Pakistan

© Virtual University of Pakistan EMP ( EMPID, EMPNAME, SALARY, EMPDEPT) EMPID EMPNAME, SALARY, EMPMGR, EMPDEPT © Virtual University of Pakistan

© Virtual University of Pakistan WORK ( PROJNAME, EMPID, HOURS, RATING) PROJNAME, EMPID HOURS, RATING © Virtual University of Pakistan

© Virtual University of Pakistan DEPT ( EMPDEPT, EMPMGR) EMPDEPT EMPMGR © Virtual University of Pakistan

Physical Database Design © Virtual University of Pakistan

© Virtual University of Pakistan Objective Basic goal is data processing efficiency Transforms logical DB design into technical specifications for storing and retrieving data Does not include practically implementing the design however tool specific decisions are involved © Virtual University of Pakistan

© Virtual University of Pakistan Inputs Required Normalized relations Definitions of each attribute Descriptions of data usage Requirements for response time, data security, backup etc. Tool to be used © Virtual University of Pakistan

© Virtual University of Pakistan Decisions Involved Choosing data types Grouping attributes (although normalized) Deciding file organizations Selecting structures Preparing strategies for efficient access © Virtual University of Pakistan

Database Management System Lecture - 21 © Virtual University of Pakistan