SlideShare a Scribd company logo
INT306
Database Management Systems
RELATIONAL DATABASE DESIGN
Text book

Database System Concepts
A. Silberschatz, H. F. Korth, S. Sudarshan

Course Instructor

Mr. Sumit Mittu

Assistant Professor and Placement Coordinator, CSE/IT
Lovely Professional University, Punjab (India)

sumit.12735@lpu.co.in sumit.mittu@gmail.com
http://tinyurl.com/askSumit
01-03-2014 11:40:41
IN THIS CHAPTER
• e. f. codd rules for rdbms
• normalization of database

01-03-2014 11:40:42

Sumit Mittu, Assistant Professor, CSE/IT

2
E. F. CODD RULES
• Codd's Rules for RDBMS
• E.F Codd was a Computer Scientist who invented Relational
model for Database management.
• Based on relational model, Relation database was created.
• Codd proposed 13 rules popularly known as Codd's 12 rules to
test DBMS's concept against his relational model.
• Codd's rule actually define what quality a DBMS requires in
order to become a Relational Database Management
System(RDBMS).
• Till now, there is hardly any commercial product that follows all
the 13 Codd's rules.
• Even Oracle follows only eight and half out(8.5) of 13.
01-03-2014 11:40:42

Sumit Mittu, Assistant Professor, CSE/IT

3
E. F. CODD RULES
Rule zero

Rule 1 :
Information rule

Rule 2 :
Guaranteed Access
01-03-2014 11:40:42

• This rule states that for a system to qualify as an
RDBMS, it must be able to manage database
entirely through the relational capabilities.

• All information(including metadeta) is to be
represented as stored data in cells of tables. The
rows and columns have to be strictly unordered.

• Each unique piece of data(atomic value) should
be accesible by : Table Name + primary
key(Row) + Attribute(column).

Sumit Mittu, Assistant Professor, CSE/IT

4
E. F. CODD RULES
Rule 3 : Systemetic
treatment of NULL

•Null has several meanings, it can mean missing data, not
applicable or no value. It should be handled consistently.
Primary key must not be null. Expression on NULL must give
null.

Rule 4 : Active
Online Catalog

•Database dictionary(catalog) must have description of
Database. Catalog to be governed by same rule as rest
of the database. The same query language to be used
on catalog as on application database.

Rule 5 : Powerful
language

•One well defined language must be there to provide all
manners of access to data. Example: SQL. If a file
supporting table can be accessed by any manner
except SQL interface, then its a violation to this rule.

01-03-2014 11:40:42

Sumit Mittu, Assistant Professor, CSE/IT

5
E. F. CODD RULES
Rule 6 : View
Updation rule

Rule 7 : Relational
Level Operation
Rule 8 : Physical
Data
Independence
01-03-2014 11:40:43

•All view that are theoretically updatable should be
updatable by the system.

•There must be Insert, Delete, Update operations at each
level of relations. Set operation like Union, Intersection
and minus should also be supported.

•The physical storage of data should not matter to the
system. If say, some file supporting table were renamed or
moved from one disk to another, it should not effect the
application.

Sumit Mittu, Assistant Professor, CSE/IT

6
E. F. CODD RULES
Rule 9 :
Logical Data
Independence

•If there is change in the logical structure(table structures) of
the database the user view of data should not change. Say, if
a table is split into two tables, a new view should give result as
the join of the two tables. This rule is most difficult to satisfy.

Rule 10 : Integrity
Independence

•The database should be able to enforce its own integrity
rather than using other programs. Key and Check constraints,
trigger etc. should be stored in Data Dictionary. This also make
RDBMS independent of front-end.

Rule 11 : Distribution
Independence

•A database should work properly regardless of its distribution
across a network. This lays foundation of distributed database.

01-03-2014 11:40:43

Sumit Mittu, Assistant Professor, CSE/IT

7
E. F. CODD RULES

Rule 12 :
Nonsubversion
rule
01-03-2014 11:40:43

• If low level access is allowed
to a system it should not be
able to subvert or bypass
integrity rule to change data.
This can be achieved by some
sort of looking or encryption.

Sumit Mittu, Assistant Professor, CSE/IT

8
SCRATCH YOUR MIND!!!
•

01-03-2014 11:40:43

Sumit Mittu, Assistant Professor, CSE/IT

9
NORMALIZATION
•
•
•
•

Normalization
Need for Normalization
Anomalies in database
Decomposition
• Desirable Properties

• Attribute Dependency
• FD, FFD, PFD, TD, MVD, etc.

01-03-2014 11:40:43

Sumit Mittu, Assistant Professor, CSE/IT

10
NORMALIZATION
• Normal Forms
• Phases/Levels of Normalization
•
•
•
•
•
•
•
•

1 NF – First Normal Form
2 NF – Second Normal Form
3 NF – Third Normal Form
BCNF – Boyce Codd Normal Form
4 NF – Fourth Normal Form
5 NF – Fifth Normal Form
DKNF – Domain Key Normal Form
Etc.

01-03-2014 11:40:43

Sumit Mittu, Assistant Professor, CSE/IT

11
NORMALIZATION
• Normal Forms •
•
•
•

1 NF
2 NF
3 NF
BCNF

• 4 NF

– Eliminate groups
+ Preserve Functional Dependencies
– Eliminate Transitive Dependencies
+ Preserve FDs that determinants are irreducible
candidate key
– Eliminate Multi-valued Dependencies
• at most 1 multi-valued dependency can be allowed

• 5 NF

01-03-2014 11:40:43

+ Preserve Join Dependency

Sumit Mittu, Assistant Professor, CSE/IT

12
NORMALIZATION
• First Normal Form
•
•
•
•
•

The data must be represented as tables
Fields must be atomic domains
There should be no multivalued attributes
Data must be represented as non-repeating groups
Do not have null values against record fields

• Example…

01-03-2014 11:40:43

Sumit Mittu, Assistant Professor, CSE/IT

13
NORMALIZATION
• Second Normal Form
• Tables must be in 1NF
• There must be a candidate key in each table
• Preserve Fully-Functional Dependencies
• Partial FDs should not exist
• Determinant may be composite key

• All non-key attributes must be dependent on key attribute

• Example…
01-03-2014 11:40:43

Sumit Mittu, Assistant Professor, CSE/IT

14
NORMALIZATION
• Third Normal Form
• Tables must be in 2NF
• There must be a candidate key in each table
• Eliminate all Transitive Dependencies

• Example…

01-03-2014 11:40:43

Sumit Mittu, Assistant Professor, CSE/IT

15
NORMALIZATION
• Boyce-Codd Normal Form
•
•
•
•

Tables must be in 2NF
There must be a candidate key in each table
Every determinant must be non-composite (irreducible)
Every irreducible determinant must be a candidate key

• Example…

01-03-2014 11:40:42

Sumit Mittu, Assistant Professor, CSE/IT

16
NORMALIZATION
• Fourth Normal Form
• Tables must be in 3NF / BCNF
• Eliminate all multi-valued dependencies
• If not possible, decompose the relations such that each relation
after decomposition must not have more than one multi-valued
dependency

• Example…

01-03-2014 11:40:43

Sumit Mittu, Assistant Professor, CSE/IT

17
NORMALIZATION
• Fifth Normal Form
• Tables must be in 4NF
• Preserve Join Dependency
• There are certain conditions under which after decomposing a
relation, it cannot be reassembled losslessly back into its original
form.
• It is 5NF when this stage is reached

• This normal form is also known as Project-Join normal Form
(PJNF)

• Example…
01-03-2014 11:40:43

Sumit Mittu, Assistant Professor, CSE/IT

18
DE-NORMALIZATION
• De-normalization
• In order to improve performance, the designers sometimes
choose a schema that has redundant information
• De-normalization presents a trade-off between
performance and modification anomalies / data
redundancy.

• Example…

01-03-2014 11:40:43

Sumit Mittu, Assistant Professor, CSE/IT

19
DE-NORMALIZATION
• The relation CUSTOMER (CustomerID, Name, Address,
City, State, Zip) can be normalized as:
• CUSTOMER (CustomerID, Name, Address, Zip)
• ZIPCODES (Zip, City, State)

• This suffers with a performance penalty like:

• Each customer address lookup requires we look in two relations
(tables).
• More technically, obtaining a complete customer and address
record requires us to join CUSTOMER and ZIPCODES together.

• Hence, de-normalization is performed

• re-assemble the original CUSTOMER relation we started with
that will contain all of the attributes.

01-03-2014 11:40:43

Sumit Mittu, Assistant Professor, CSE/IT

20
SCRATCH YOUR MIND!!!
•

•

01-03-2014 11:40:43

Sumit Mittu, Assistant Professor, CSE/IT

21

More Related Content

Viewers also liked

Previous question papers of Database Management System (DBMS) By SHABEEB
Previous question papers of Database Management System (DBMS) By SHABEEBPrevious question papers of Database Management System (DBMS) By SHABEEB
Previous question papers of Database Management System (DBMS) By SHABEEB
Shabeeb Shabi
 
Database Management System And Design Questions
Database Management System And Design QuestionsDatabase Management System And Design Questions
Database Management System And Design QuestionsSamir Sabry
 
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAINFP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAIN
Syahriha Ruslan
 
FINAL PAPER FP304 DATABASE SYSTEM
FINAL PAPER FP304 DATABASE SYSTEMFINAL PAPER FP304 DATABASE SYSTEM
FINAL PAPER FP304 DATABASE SYSTEMAmira Dolce Farhana
 
Int306 03
Int306 03Int306 03
Int306 03
Sumit Mittu
 
Flow of accounting_entries_in_oracle_applications
Flow of accounting_entries_in_oracle_applicationsFlow of accounting_entries_in_oracle_applications
Flow of accounting_entries_in_oracle_applicationsSomasekhar Reddy
 
Aca2 01 new
Aca2 01 newAca2 01 new
Aca2 01 new
Sumit Mittu
 
Oracle installation
Oracle installationOracle installation
Oracle installation
United International University
 
Les 07 Rman Rec
Les 07 Rman RecLes 07 Rman Rec
Les 07 Rman Rec
vivaankumar
 
2009 Punjab Technical University B.C.A Database Management System Question paper
2009 Punjab Technical University B.C.A Database Management System Question paper2009 Punjab Technical University B.C.A Database Management System Question paper
2009 Punjab Technical University B.C.A Database Management System Question paperMonica Sabharwal
 
Dbms Final Examination Answer Key
Dbms Final Examination Answer KeyDbms Final Examination Answer Key
Dbms Final Examination Answer Key
Laguna State Polytechnic University
 
Paper review
Paper reviewPaper review
Paper review
Nadia Nahar
 
Fundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and AnswersFundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and Answers
Abdul Rahman Sherzad
 
Internship Final Report
Internship Final Report Internship Final Report
Internship Final Report
Nadia Nahar
 
Lec10 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part2
Lec10 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part2Lec10 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part2
Lec10 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part2
Hsien-Hsin Sean Lee, Ph.D.
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)tameemyousaf
 
Build Features, Not Apps
Build Features, Not AppsBuild Features, Not Apps
Build Features, Not Apps
Natasha Murashev
 

Viewers also liked (19)

Previous question papers of Database Management System (DBMS) By SHABEEB
Previous question papers of Database Management System (DBMS) By SHABEEBPrevious question papers of Database Management System (DBMS) By SHABEEB
Previous question papers of Database Management System (DBMS) By SHABEEB
 
Database Management System And Design Questions
Database Management System And Design QuestionsDatabase Management System And Design Questions
Database Management System And Design Questions
 
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAINFP304 DATABASE SYSTEM  PAPER FINAL EXAM AGAIN
FP304 DATABASE SYSTEM PAPER FINAL EXAM AGAIN
 
FINAL PAPER FP304 DATABASE SYSTEM
FINAL PAPER FP304 DATABASE SYSTEMFINAL PAPER FP304 DATABASE SYSTEM
FINAL PAPER FP304 DATABASE SYSTEM
 
Oracle Forms
Oracle FormsOracle Forms
Oracle Forms
 
Int306 03
Int306 03Int306 03
Int306 03
 
Flow of accounting_entries_in_oracle_applications
Flow of accounting_entries_in_oracle_applicationsFlow of accounting_entries_in_oracle_applications
Flow of accounting_entries_in_oracle_applications
 
Aca2 01 new
Aca2 01 newAca2 01 new
Aca2 01 new
 
Oracle installation
Oracle installationOracle installation
Oracle installation
 
Les 07 Rman Rec
Les 07 Rman RecLes 07 Rman Rec
Les 07 Rman Rec
 
2009 Punjab Technical University B.C.A Database Management System Question paper
2009 Punjab Technical University B.C.A Database Management System Question paper2009 Punjab Technical University B.C.A Database Management System Question paper
2009 Punjab Technical University B.C.A Database Management System Question paper
 
Dbms Final Examination Answer Key
Dbms Final Examination Answer KeyDbms Final Examination Answer Key
Dbms Final Examination Answer Key
 
Paper review
Paper reviewPaper review
Paper review
 
Fundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and AnswersFundamentals of Database Systems Questions and Answers
Fundamentals of Database Systems Questions and Answers
 
Erd chapter 3
Erd chapter 3Erd chapter 3
Erd chapter 3
 
Internship Final Report
Internship Final Report Internship Final Report
Internship Final Report
 
Lec10 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part2
Lec10 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part2Lec10 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part2
Lec10 Computer Architecture by Hsien-Hsin Sean Lee Georgia Tech -- Memory part2
 
Entity relationship diagram (erd)
Entity relationship diagram (erd)Entity relationship diagram (erd)
Entity relationship diagram (erd)
 
Build Features, Not Apps
Build Features, Not AppsBuild Features, Not Apps
Build Features, Not Apps
 

Similar to Int306 04

Week 2 - Database System Development Lifecycle-old.pptx
Week 2 - Database System Development Lifecycle-old.pptxWeek 2 - Database System Development Lifecycle-old.pptx
Week 2 - Database System Development Lifecycle-old.pptx
NurulIzrin
 
1_DBMS_Introduction.pdf
1_DBMS_Introduction.pdf1_DBMS_Introduction.pdf
1_DBMS_Introduction.pdf
JubairAhmedNabin
 
Unit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptxUnit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptx
MaryJoseph79
 
Unit ii
Unit ii  Unit ii
normalization-1.pptx
normalization-1.pptxnormalization-1.pptx
normalization-1.pptx
AbhishekJohnCharan1
 
PPT-UEU-Basis-Data-Pertemuan-1.pptx
PPT-UEU-Basis-Data-Pertemuan-1.pptxPPT-UEU-Basis-Data-Pertemuan-1.pptx
PPT-UEU-Basis-Data-Pertemuan-1.pptx
UbaidURRahman78
 
Uc14 chap14
Uc14 chap14Uc14 chap14
Uc14 chap14ayahye
 
Join 2017_Deep Dive_To Use or Not Use PDT's
Join 2017_Deep Dive_To Use or Not Use PDT'sJoin 2017_Deep Dive_To Use or Not Use PDT's
Join 2017_Deep Dive_To Use or Not Use PDT's
Looker
 
Introduction to Database Management Systems (DBMS)
Introduction to Database Management Systems (DBMS)Introduction to Database Management Systems (DBMS)
Introduction to Database Management Systems (DBMS)
Vijayananda Ratnam Ch
 
Database normalisation by D.Lukachuk
Database normalisation by D.LukachukDatabase normalisation by D.Lukachuk
Database normalisation by D.Lukachuk
Dmytro Lukachuk
 
Enabling the Future of Healthcare Through Integration and Interoperability: V...
Enabling the Future of Healthcare Through Integration and Interoperability: V...Enabling the Future of Healthcare Through Integration and Interoperability: V...
Enabling the Future of Healthcare Through Integration and Interoperability: V...
Rahul Neel Mani
 
Relational database design
Relational database designRelational database design
Relational database design
SURBHI SAROHA
 
DBMS ppts unit1.pptx
DBMS ppts  unit1.pptxDBMS ppts  unit1.pptx
DBMS ppts unit1.pptx
VaibhavSaluja1
 
database1.pdf
database1.pdfdatabase1.pdf
database1.pdf
prashanna13
 
MS ACCESS.pptx
MS ACCESS.pptxMS ACCESS.pptx
MS ACCESS.pptx
MattMarino13
 
Software Engineering - chp2- requirements specification
Software Engineering - chp2- requirements specificationSoftware Engineering - chp2- requirements specification
Software Engineering - chp2- requirements specification
Lilia Sfaxi
 
Advance database system (part 2)
Advance database system (part 2)Advance database system (part 2)
Advance database system (part 2)
Abdullah Khosa
 
Csld phan tan va song song
Csld phan tan va song songCsld phan tan va song song
Csld phan tan va song songLê Anh Trung
 

Similar to Int306 04 (20)

Week 2 - Database System Development Lifecycle-old.pptx
Week 2 - Database System Development Lifecycle-old.pptxWeek 2 - Database System Development Lifecycle-old.pptx
Week 2 - Database System Development Lifecycle-old.pptx
 
1_DBMS_Introduction.pdf
1_DBMS_Introduction.pdf1_DBMS_Introduction.pdf
1_DBMS_Introduction.pdf
 
Unit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptxUnit 2_DBMS_10.2.22.pptx
Unit 2_DBMS_10.2.22.pptx
 
Unit ii
Unit ii  Unit ii
Unit ii
 
normalization-1.pptx
normalization-1.pptxnormalization-1.pptx
normalization-1.pptx
 
PPT-UEU-Basis-Data-Pertemuan-1.pptx
PPT-UEU-Basis-Data-Pertemuan-1.pptxPPT-UEU-Basis-Data-Pertemuan-1.pptx
PPT-UEU-Basis-Data-Pertemuan-1.pptx
 
Uc14 chap14
Uc14 chap14Uc14 chap14
Uc14 chap14
 
Uc14 chap14
Uc14 chap14Uc14 chap14
Uc14 chap14
 
RDBMS Model
RDBMS ModelRDBMS Model
RDBMS Model
 
Join 2017_Deep Dive_To Use or Not Use PDT's
Join 2017_Deep Dive_To Use or Not Use PDT'sJoin 2017_Deep Dive_To Use or Not Use PDT's
Join 2017_Deep Dive_To Use or Not Use PDT's
 
Introduction to Database Management Systems (DBMS)
Introduction to Database Management Systems (DBMS)Introduction to Database Management Systems (DBMS)
Introduction to Database Management Systems (DBMS)
 
Database normalisation by D.Lukachuk
Database normalisation by D.LukachukDatabase normalisation by D.Lukachuk
Database normalisation by D.Lukachuk
 
Enabling the Future of Healthcare Through Integration and Interoperability: V...
Enabling the Future of Healthcare Through Integration and Interoperability: V...Enabling the Future of Healthcare Through Integration and Interoperability: V...
Enabling the Future of Healthcare Through Integration and Interoperability: V...
 
Relational database design
Relational database designRelational database design
Relational database design
 
DBMS ppts unit1.pptx
DBMS ppts  unit1.pptxDBMS ppts  unit1.pptx
DBMS ppts unit1.pptx
 
database1.pdf
database1.pdfdatabase1.pdf
database1.pdf
 
MS ACCESS.pptx
MS ACCESS.pptxMS ACCESS.pptx
MS ACCESS.pptx
 
Software Engineering - chp2- requirements specification
Software Engineering - chp2- requirements specificationSoftware Engineering - chp2- requirements specification
Software Engineering - chp2- requirements specification
 
Advance database system (part 2)
Advance database system (part 2)Advance database system (part 2)
Advance database system (part 2)
 
Csld phan tan va song song
Csld phan tan va song songCsld phan tan va song song
Csld phan tan va song song
 

More from Sumit Mittu

Aca2 10 11
Aca2 10 11Aca2 10 11
Aca2 10 11
Sumit Mittu
 
Aca2 09 new
Aca2 09 newAca2 09 new
Aca2 09 new
Sumit Mittu
 
Aca2 08 new
Aca2 08 newAca2 08 new
Aca2 08 new
Sumit Mittu
 
Aca2 07 new
Aca2 07 newAca2 07 new
Aca2 07 new
Sumit Mittu
 
Aca2 06 new
Aca2 06 newAca2 06 new
Aca2 06 new
Sumit Mittu
 
Aca11 bk2 ch9
Aca11 bk2 ch9Aca11 bk2 ch9
Aca11 bk2 ch9
Sumit Mittu
 

More from Sumit Mittu (6)

Aca2 10 11
Aca2 10 11Aca2 10 11
Aca2 10 11
 
Aca2 09 new
Aca2 09 newAca2 09 new
Aca2 09 new
 
Aca2 08 new
Aca2 08 newAca2 08 new
Aca2 08 new
 
Aca2 07 new
Aca2 07 newAca2 07 new
Aca2 07 new
 
Aca2 06 new
Aca2 06 newAca2 06 new
Aca2 06 new
 
Aca11 bk2 ch9
Aca11 bk2 ch9Aca11 bk2 ch9
Aca11 bk2 ch9
 

Recently uploaded

Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
heathfieldcps1
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
Dr. Shivangi Singh Parihar
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
Celine George
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
ArianaBusciglio
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
Celine George
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
NelTorrente
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
ak6969907
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
Celine George
 

Recently uploaded (20)

Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
The basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptxThe basics of sentences session 6pptx.pptx
The basics of sentences session 6pptx.pptx
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.PCOS corelations and management through Ayurveda.
PCOS corelations and management through Ayurveda.
 
How to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRMHow to Manage Your Lost Opportunities in Odoo 17 CRM
How to Manage Your Lost Opportunities in Odoo 17 CRM
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Assignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docxAssignment_4_ArianaBusciglio Marvel(1).docx
Assignment_4_ArianaBusciglio Marvel(1).docx
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17How to Fix the Import Error in the Odoo 17
How to Fix the Import Error in the Odoo 17
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
MATATAG CURRICULUM: ASSESSING THE READINESS OF ELEM. PUBLIC SCHOOL TEACHERS I...
 
World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024World environment day ppt For 5 June 2024
World environment day ppt For 5 June 2024
 
Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
How to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP ModuleHow to Add Chatter in the odoo 17 ERP Module
How to Add Chatter in the odoo 17 ERP Module
 

Int306 04

  • 1. INT306 Database Management Systems RELATIONAL DATABASE DESIGN Text book Database System Concepts A. Silberschatz, H. F. Korth, S. Sudarshan Course Instructor Mr. Sumit Mittu Assistant Professor and Placement Coordinator, CSE/IT Lovely Professional University, Punjab (India) sumit.12735@lpu.co.in sumit.mittu@gmail.com http://tinyurl.com/askSumit 01-03-2014 11:40:41
  • 2. IN THIS CHAPTER • e. f. codd rules for rdbms • normalization of database 01-03-2014 11:40:42 Sumit Mittu, Assistant Professor, CSE/IT 2
  • 3. E. F. CODD RULES • Codd's Rules for RDBMS • E.F Codd was a Computer Scientist who invented Relational model for Database management. • Based on relational model, Relation database was created. • Codd proposed 13 rules popularly known as Codd's 12 rules to test DBMS's concept against his relational model. • Codd's rule actually define what quality a DBMS requires in order to become a Relational Database Management System(RDBMS). • Till now, there is hardly any commercial product that follows all the 13 Codd's rules. • Even Oracle follows only eight and half out(8.5) of 13. 01-03-2014 11:40:42 Sumit Mittu, Assistant Professor, CSE/IT 3
  • 4. E. F. CODD RULES Rule zero Rule 1 : Information rule Rule 2 : Guaranteed Access 01-03-2014 11:40:42 • This rule states that for a system to qualify as an RDBMS, it must be able to manage database entirely through the relational capabilities. • All information(including metadeta) is to be represented as stored data in cells of tables. The rows and columns have to be strictly unordered. • Each unique piece of data(atomic value) should be accesible by : Table Name + primary key(Row) + Attribute(column). Sumit Mittu, Assistant Professor, CSE/IT 4
  • 5. E. F. CODD RULES Rule 3 : Systemetic treatment of NULL •Null has several meanings, it can mean missing data, not applicable or no value. It should be handled consistently. Primary key must not be null. Expression on NULL must give null. Rule 4 : Active Online Catalog •Database dictionary(catalog) must have description of Database. Catalog to be governed by same rule as rest of the database. The same query language to be used on catalog as on application database. Rule 5 : Powerful language •One well defined language must be there to provide all manners of access to data. Example: SQL. If a file supporting table can be accessed by any manner except SQL interface, then its a violation to this rule. 01-03-2014 11:40:42 Sumit Mittu, Assistant Professor, CSE/IT 5
  • 6. E. F. CODD RULES Rule 6 : View Updation rule Rule 7 : Relational Level Operation Rule 8 : Physical Data Independence 01-03-2014 11:40:43 •All view that are theoretically updatable should be updatable by the system. •There must be Insert, Delete, Update operations at each level of relations. Set operation like Union, Intersection and minus should also be supported. •The physical storage of data should not matter to the system. If say, some file supporting table were renamed or moved from one disk to another, it should not effect the application. Sumit Mittu, Assistant Professor, CSE/IT 6
  • 7. E. F. CODD RULES Rule 9 : Logical Data Independence •If there is change in the logical structure(table structures) of the database the user view of data should not change. Say, if a table is split into two tables, a new view should give result as the join of the two tables. This rule is most difficult to satisfy. Rule 10 : Integrity Independence •The database should be able to enforce its own integrity rather than using other programs. Key and Check constraints, trigger etc. should be stored in Data Dictionary. This also make RDBMS independent of front-end. Rule 11 : Distribution Independence •A database should work properly regardless of its distribution across a network. This lays foundation of distributed database. 01-03-2014 11:40:43 Sumit Mittu, Assistant Professor, CSE/IT 7
  • 8. E. F. CODD RULES Rule 12 : Nonsubversion rule 01-03-2014 11:40:43 • If low level access is allowed to a system it should not be able to subvert or bypass integrity rule to change data. This can be achieved by some sort of looking or encryption. Sumit Mittu, Assistant Professor, CSE/IT 8
  • 9. SCRATCH YOUR MIND!!! • 01-03-2014 11:40:43 Sumit Mittu, Assistant Professor, CSE/IT 9
  • 10. NORMALIZATION • • • • Normalization Need for Normalization Anomalies in database Decomposition • Desirable Properties • Attribute Dependency • FD, FFD, PFD, TD, MVD, etc. 01-03-2014 11:40:43 Sumit Mittu, Assistant Professor, CSE/IT 10
  • 11. NORMALIZATION • Normal Forms • Phases/Levels of Normalization • • • • • • • • 1 NF – First Normal Form 2 NF – Second Normal Form 3 NF – Third Normal Form BCNF – Boyce Codd Normal Form 4 NF – Fourth Normal Form 5 NF – Fifth Normal Form DKNF – Domain Key Normal Form Etc. 01-03-2014 11:40:43 Sumit Mittu, Assistant Professor, CSE/IT 11
  • 12. NORMALIZATION • Normal Forms • • • • 1 NF 2 NF 3 NF BCNF • 4 NF – Eliminate groups + Preserve Functional Dependencies – Eliminate Transitive Dependencies + Preserve FDs that determinants are irreducible candidate key – Eliminate Multi-valued Dependencies • at most 1 multi-valued dependency can be allowed • 5 NF 01-03-2014 11:40:43 + Preserve Join Dependency Sumit Mittu, Assistant Professor, CSE/IT 12
  • 13. NORMALIZATION • First Normal Form • • • • • The data must be represented as tables Fields must be atomic domains There should be no multivalued attributes Data must be represented as non-repeating groups Do not have null values against record fields • Example… 01-03-2014 11:40:43 Sumit Mittu, Assistant Professor, CSE/IT 13
  • 14. NORMALIZATION • Second Normal Form • Tables must be in 1NF • There must be a candidate key in each table • Preserve Fully-Functional Dependencies • Partial FDs should not exist • Determinant may be composite key • All non-key attributes must be dependent on key attribute • Example… 01-03-2014 11:40:43 Sumit Mittu, Assistant Professor, CSE/IT 14
  • 15. NORMALIZATION • Third Normal Form • Tables must be in 2NF • There must be a candidate key in each table • Eliminate all Transitive Dependencies • Example… 01-03-2014 11:40:43 Sumit Mittu, Assistant Professor, CSE/IT 15
  • 16. NORMALIZATION • Boyce-Codd Normal Form • • • • Tables must be in 2NF There must be a candidate key in each table Every determinant must be non-composite (irreducible) Every irreducible determinant must be a candidate key • Example… 01-03-2014 11:40:42 Sumit Mittu, Assistant Professor, CSE/IT 16
  • 17. NORMALIZATION • Fourth Normal Form • Tables must be in 3NF / BCNF • Eliminate all multi-valued dependencies • If not possible, decompose the relations such that each relation after decomposition must not have more than one multi-valued dependency • Example… 01-03-2014 11:40:43 Sumit Mittu, Assistant Professor, CSE/IT 17
  • 18. NORMALIZATION • Fifth Normal Form • Tables must be in 4NF • Preserve Join Dependency • There are certain conditions under which after decomposing a relation, it cannot be reassembled losslessly back into its original form. • It is 5NF when this stage is reached • This normal form is also known as Project-Join normal Form (PJNF) • Example… 01-03-2014 11:40:43 Sumit Mittu, Assistant Professor, CSE/IT 18
  • 19. DE-NORMALIZATION • De-normalization • In order to improve performance, the designers sometimes choose a schema that has redundant information • De-normalization presents a trade-off between performance and modification anomalies / data redundancy. • Example… 01-03-2014 11:40:43 Sumit Mittu, Assistant Professor, CSE/IT 19
  • 20. DE-NORMALIZATION • The relation CUSTOMER (CustomerID, Name, Address, City, State, Zip) can be normalized as: • CUSTOMER (CustomerID, Name, Address, Zip) • ZIPCODES (Zip, City, State) • This suffers with a performance penalty like: • Each customer address lookup requires we look in two relations (tables). • More technically, obtaining a complete customer and address record requires us to join CUSTOMER and ZIPCODES together. • Hence, de-normalization is performed • re-assemble the original CUSTOMER relation we started with that will contain all of the attributes. 01-03-2014 11:40:43 Sumit Mittu, Assistant Professor, CSE/IT 20
  • 21. SCRATCH YOUR MIND!!! • • 01-03-2014 11:40:43 Sumit Mittu, Assistant Professor, CSE/IT 21