Vous êtes sur la page 1sur 111

DBMS in Hindi

Bc c F a l n a . c o m
0 9 7 9 9 4 - 5 5 5 0 5
Kuldeep Chand

This EBook is basically useful if you want to learn to develop
Professional Application Level Database, so that you can
understand the various theoratical processes related to
Database Designing like Requirement Identification,
Database Normalization, Entity Relationship (ER) Diagram
Creation, Data Flow Diagram (DFD), etc

This eBook is based on various kinds of Database Related
Problems and then Identifying its Solutions, so that you can
create a Database Schema on the basis of the requirement.

Relationship of a Relation Database is the main fundamental
concept and in this eBook, I have tried my best to explain
Various Relationship Concepts like One-to-One, One-to-
Many and Many-to-Many with easy to understand Examples.

Database Normalization is another the most important
concept for developing a well performing Database, so I have
included it with easy to understand Detailed Examples too.


1

www.BccFalna.com
DBMS-RDBMS in HinDi





Kuldeep Chand




Betalab Computer Center
Falna

2

www.BccFalna.com
DBMS-RDBMS in HinDi
DBMS-RDBMS in Hindi
Copyright 2009 by Kuldeep Chand
All rights reserved. No part of this work may be reproduced or transmitted in any form
or by any means, electronic or mechanical, including photocopying, recording, or by
any information storage or retrieval system, without the prior written permission of the
copyright owner and the publisher.

Trademarked names may appear in this book. Rather than use a trademark symbol
with every occurrence of a trademarked name, we use the names only in an editorial
fashion and to the benefit of the trademark owner, with no intention of infringement of
the trademark.

Lead Editors: Kuldeep Chand

Distributed to the book trade worldwide by Betalab Computer Center, Behind of
Vidhya Jyoti School, Falna Station Dist. Pali (Raj.) Pin 306116

e-mail bccfalna@gmail.com

or

visit http://www.bccfalna.com

For information on translations, please contact BetaLab Computer Center, Behind of
Vidhya Jyoti School, Falna Station Dist. Pali (Raj.) Pin 306116

Phone 97994-55505

The information in this book is distributed on an as is basis, without warranty.
Although every precaution has been taken in the preparation of this work, the author
shall not have any liability to any person or entity with respect to any loss or damage
caused or alleged to be caused directly or indirectly by the information contained in
this book.




3

www.BccFalna.com
DBMS-RDBMS in HinDi
















This book is dedicated to those

who really wants to be

a

PRofeSSionAl DeveloPeR




4

www.BccFalna.com
DBMS-RDBMS in HinDi







5

www.BccFalna.com
DBMS-RDBMS in HinDi
Table of Contents

Database Management System .................................................................... 8
Introduction ............................................................................................................ 8
Problem Doing Something ................................................................................ 12
System Interrelated Group of Units to Solve a Problem .................................... 13


Database Management System DBMS ................................................... 14
Requirement of Good Database Design ............................................................... 20
Effects of Poor Database Design ......................................................................... 21
Unnecessary Duplicated Data and Data Consistency ....................................... 22
Data Insertion Problems ................................................................................... 24
Data Deletion Problems .................................................................................... 26
Meaningful Identifiers ........................................................................................... 27
Entities and Data Relationships ........................................................................... 28
Entities and Their Attributes ................................................................................. 28
Entity Identifiers ................................................................................................... 29
Single-Valued and Multi-Valued Attributes ........................................................... 31
Identifying Problem Related Entities .................................................................... 34
Documenting Logical Data Relationships ............................................................. 35
Entities and Attributes for Music Store Application ............................................... 37
Domains .............................................................................................................. 38
Documenting Domains ..................................................................................... 38
Practical Domain Choices ................................................................................ 38


Basic Data Relationships ............................................................................ 42
One To One Relationships ................................................................................... 43
One To Many Relationships ................................................................................. 45
Many To Many Relationships ............................................................................... 46
Weak Entities and Mandatory Relationships ........................................................ 47
Documenting Relationships ................................................................................. 48
Dealing with Many To Many Relationships ........................................................... 52
Composite Entities ............................................................................................... 53
Relationships and Business Rules ....................................................................... 57
Data Modeling and Data Flow .............................................................................. 58


Schema ......................................................................................................... 63
Tables .................................................................................................................. 67
Primary Keys .................................................................................................... 68
Composite Keys ............................................................................................... 70
Representing Data Relationships ..................................................................... 72

6

www.BccFalna.com
DBMS-RDBMS in HinDi
Referential Integrity .......................................................................................... 75
Views ................................................................................................................... 76
Data Dictionary .................................................................................................... 78


Normalization ............................................................................................... 80
Translating an ER Diagram into Relations............................................................ 81
Normal Forms ...................................................................................................... 82
First Normal Form ............................................................................................ 84
Second Normal Form ....................................................................................... 90
Third Normal Form ........................................................................................... 93
Boyce-Codd Normal Form ................................................................................ 95
Forth Normal Form ........................................................................................... 97
Equi Join ......................................................................................................... 100


Database Structure and Performance Tuning ......................................... 103
Indexing ............................................................................................................. 104
Clustering .......................................................................................................... 106
Partitioning ......................................................................................................... 107


Last but not Least. There is more ......................................................... 110


7

www.BccFalna.com
DBMS-RDBMS in HinDi




8

www.BccFalna.com
DBMS-RDBMS in HinDi
Database Management System
; r l r- Oracle i -n, r- r Database lli Concepts i
rn n| -ni rini, nil r- -n l | i| --i r, l
Solution - Oracle i DBMS Software Develop li ni r| ni r r-
Relational Database Relational Database i Design Process i -
in|

l Relational Database Designing rn r| l- li r i r- Designing
Implementation ii i i n i - i n r| ;l ; -n i i| r- i
iini - liiln li r| r iin nnn r- Relational Database Designing
lin lli ini i s| nr -n | ilii n, l Section - r-
in l r Section iii Designing l n l| Database i Oracle -
ii l nr Implement li ini r|

l Designing Implementation i - n Subjects rin r i|
nri; ii i - r r, ;l ; -n - ; iri -i in ii
ii i i l- n| r| r- ; irii ni i ii ;l
Repeat li r, nil -n Contents i Flow i r|

Introduction
ni | iin r| -i i Information | n r| r| ;|l r --
ii i ln ii iii r| ln li
lln n| iini ri r| i | ini -r- ii ri ili
in - i ri|

-i i li rini ni ir, i i i i ii
| ii ili ii lli -i i i ii ili r| r|
l~ | | nin r i i Internet -i- ; ii | ii i ri
ri r| li iln iiiln iln i i r- i iln n - | r r|

r ii i l---| ni li-- - ii - lii ini ii| l
in - li ; lli ii i Store ii i ni i i
r- ;r| ii i Computer Manage n r|

lli i ii (Data) i (Collection) i i l ii i
lli i n|n (Classify) i lii (Analyze ) i nii ln -

9

www.BccFalna.com
DBMS-RDBMS in HinDi
ln li | i-ni in i, ; | li i Computer | iiii - Data
Processing i ri ini r|

i r- i n r l Computer i in lli i Business -lin
ii i Store, Manage Process l li ini r| Business i si-i ri
i i, Computer | | s liinii ii i| i Businesses - ;ii
iiii Computer i liili in li i ni r|

r- Computer l| --i i -iii in i irn r, n --i i r-
Computer - Software Application - Represent i rini r| Computer
r-ii l| i l| Software Application iii r| i- ni r i l l|
--i i -iii in l Develop li ni Software Application | nr
r| ri, ni Computer i| i| nn Result i r| ni r| r| Computer |
r| | liini r, l r r-ii Software Application iii r| i- ni
r, ;l in ri ii Result i| i| nn r| rini| i| Computer r-ii
Accurate Result Provide ni r|

l l --i i -iii in l Develop l n Software Application
Design - i; n ri, ni Computer - nn| i r| li - i-
r| rini r| ; l-iln - Computer nn Result i| ni r, l i - r-ii
Software Application Develop i Programmer i iii ri rini r|

Computer | | liini r l Computer Calculations -lin i- rn r|
ni n| ni r, lr - ;ii i i| - nni r i lii
iii| n| n| r| Computer Calculation -lin nlni i| i| r| ni r,
n l Computer l Software Application iii Calculation ri r,
Application i r| nn nr | Calculations i Perform l Design i li
ni ri|

l Computer Calculations i Fastly Accurately Perform ni r, ;l
Computer ii Business Man i Calculation ln lii iii r | n
r| r in| r| ; l-iln - Business Man ii i i -lin lii
i ~| ii| - i- ri ini r|

Computer | n|| liini r l i- ;ii | nr r| Computer i| ii i
i i ni r| l l ;ii | -| i| r l l l| Information i
- - n in - i , ni ini i i in r, l Computer Stored
ii i Computer i| i| r| ini r|


10

www.BccFalna.com
DBMS-RDBMS in HinDi
Computer Stored ii i Business Man ii i i| i i -i in
ni r, l Business Man i ;i| nlni ri i| iili i i| i-i
r| i ni r| | r| i i| rn | liinii ii r| i r Business Man
ir r si-i Business ri ri i i, Computer r| Business -lin
ii i Manage ni r|

r Business Man Computer Business -lin | Data i Maintain
ni r, nil r Business -lin iili i s| nr n| in
Business -lin li |


Data Value or a Set of Values
l, n (Facts) (Figures) il| (Statics) i r -r l li
(Processing) ii (Meaningful) i (Information) in (Generate) ri,
Data rini r| Data -i i -ii i -r (Value or a Set of Values) rini r,
l iii (After Processing) r- li (Decision) n r|

; iri ,ii -n | ilii n r| i (0 9 n) r| rin| r|
l l ;r l-in - - i li i, ni i Generate rin| r| ;l
i Data r|

n| iiii - Small Capital Letters 52 Characters r| rin r, l l ;r
l-in - - ii i, ni rii -n n| r| ;l Characters Data
r|

Computer - r- ;r| i i - i-nl | | lli ini i Store n r i
Processing inii Information Generate n r| l| School
lli Students | ii| i| ri l l| Class - ii Students r,
i Serial Number i r i l Address rn r, ni i| n l, -
Computer l Data r il l| Student Serial Number i 0 9 s
i -r - Express li ini r i Student i i- ni Characters
l-in -r - Express li ini r|

0 9 n s i i -r - l-in li ini r n l| Student
i Serial Number ini r i lli Characters i -r - l-in
li ini r, n l| Student i i- Address ini r| i- Address r|
l| Student | s Information i n r|


11

www.BccFalna.com
DBMS-RDBMS in HinDi

Processing Generating Results
Data l i, , i| Statics i l| l i l-in i i |
Calculation i, Processing rini r| l| i| Processing - l-i i- rin r

Calculation l| -i i ii, i-ii, nii i, iin i il|
Comparison i; -i i, si-i, i, Positive, Negative, i r il|
Decision Masking l| Condition iii li i|
Logic i lii- i in l ii i ii Steps
i -|

i | nii i r| Processing r| rini r| l~ l| i| i -i i
l l| Document - nlni i ii | li i s i-i -r i iir|
(Ascending) i ir| (Descending) - - l-in | li i i|
Processing r| rn r|

Computer - Keyboard i i| Data Input li ini r, Data i n n i;
i r| rini r , n l Computer ,ii Data l| i | i; Processing
i | i|

iri l Computer - R, a, d, h, a i i nn Input l in
r| ;l i| i Row Data -i r| Computer ; ii ii Processing
;r - - l-in ni r i r- Radha i- i ni r i l
ii i (Information) r|


Information Processed Data
l Data Processing ri | rin| r, Processed Data i Information rn
r| ii - r ni l| Data Processing ri i i ii lii- (Result)
in rini r, r| i (Information) rn r| Processing Generate ri i|
l| Information i r- l| | Processing - l Data - in -
; Information Generate n r i - in i| i| ii i ni r|

iri l R, a, m, K, i, l, l, e, d, R, a, v, a, n Characters r- nn Input
n r| Computer r ; Processing Ram, Killed, Ravan n| i ini
r, i l r-i l n| n ii i Represent ni r| il Ram. Ravan
Killed n|i r| i i - li r, ;l n|i r| i i | i r
l l Ram Killed Ravan lii i ni ; i l n|i r| i Data

12

www.BccFalna.com
DBMS-RDBMS in HinDi
-i r, i Processing ii i - l-in - - Arrange ri i
i n r|

iii - r ni Computer - r- i| i | ii i Data iii Store n
r| ; Data Processing n r, l i Generate rin| r i ; ii
iii r- li n r| Data i-n - i; , i i l ri ni r| Computer
- ;r| i, ii i li i -ii - Manage li ini r| i| Computer
i - Data i-n - i; -i i -ii i -r rini r|


What is a Computer
Computer |Electronic Machine r, i lii -r (l Program rn r)
li - Data i ni Processing Information Generate ni r|

Computer - Data i Accept i Data Required Processing
l l| Program i Execute | i-ni rin| r| l| Data Mathematical
Logical li - i- rini r| Computer - Data i Accept l Input
Devices rin| r, l Processed Data i| Information i -nn l Output
Devices rin| r| Data Processing i i- l Device ,ii - rini r,
Central Processing Unit i CPU rn r| Microprocessor rini r, l
Computer i l-in i| rn r| l| i| Computer l-llin i-ni rin| r

1 User ,ii Supplied Data i Accept ni r|
2 Input l n Data i Computer | Memory - Store Required lii-
in l l| Instructions -r i| l| Program i Execute
ni r, i l Input l n Data Processing ni r|
3 Data Mathematical Logical lii (Operations) i liln (Perform)
ni r|
4 User | inii Output i ni r |

Problem Doing Something
Computer ,ii r- l| i l| i | --i i -iii in l r| lli
i Programs lin r| ;l r r- r| n i rini l ili r-
Computer i - l in i --i - i n r `


13

www.BccFalna.com
DBMS-RDBMS in HinDi
l l~ r| ii - l| --i i liilin , ni Computer r- l l|
i| i- i Perform l| i i i; Result in i irn r, r- i- i
--i - i n r|

iri l i ii i in i, l| lii- i Computer Monitor
Display i, l| i| i | i; Calculation i Comparison i il ; i|
i-i i r- --i - i n r| i| r- i s i| i irn r, r s
Computer l --i r| r|

System Interrelated Group of Units to Solve a Problem
Computer System rini r| l| i li --ii i ni i
l| i in l ; -n ;i;i (Individual Units) l- i- r
rin r, ni ;i;i -r i System ri ini r|

i; Hospital System rini r l Hospital System ri ini r| Doctors,
Nurses, ll-i -lin lli i, Operation Theater, Patient il l|
Hospital System | lli ;i;i r| l ; - l| | i| -| ri ni Hospital
ii rini r| ;| nr Computer i| System r, l lli l
Monitor, Mouse, Keyboard, CPU --i i -iii in -lin Application
Software il rin r i i| i - l- l| --i i ln -iii i
n r|



14

www.BccFalna.com
DBMS-RDBMS in HinDi
DBMS
tHe funDAMentAlS


15

www.BccFalna.com
DBMS-RDBMS in HinDi
DBMS The Fundamentals
Computer - lli i Data i Store Manage l s Standard n|i
i in - ii ini r , nil Computer ,ii l| i| - Accurate Up-To-Date
Information i in li i | l Standard n|i i in - l| --i
-lin Data i Manage li ini r, n|i -r i r| Database
Management System ri ini r|


l| -r -lin ii i - - nr - Store Manipulate
i si n|i r| rini r l Group Of Information i ii| -
Define li i| ii| l| Group -lin ii i - - nr -
rn n| Store i si n|i rini r|

iri l -ii l r- l| School lli Students | Information i
Computer Manage i ri, ni r- ii| i - lli Students |
iili i si-si- - i - l-ii Store n r

//=================================================================
Sr_No Name Age Sex Class
123 Amit Sharma 15 Male 10
234 Rahul Varma 16 Male 10
121 Salini Bohra 15 Female 9
544 Silpa Roy 14 Female 8
534 Prince Mishra 13 Male 6
532 Devendra Bhati 14 Male 9
//================================================================

l r- ; ii| - Represent l n i| Data i ii Group - i,
ni r- r n r l l Student i Serial Number 123 r, i i- Amit Sharma
r i | - 15 i r| ii r| r Class 10
th
- ni r|

;| nr r- ; ii| - Represent l n Students | i| lli i |
iili i in n r| Database Management System - ;| n| i in
- li ini r --i -lin ;i; | l iili i Computer ,ii Manage
i rini r, iili i si-si- -i - Divide , r Logical Tables -
Data - Store li ini r|

r- Computer ,ii l| --i i Solve i irn r, n r r- --i
-lin - Entities i Identify i rini r, lr r- Computer Mange
i irn r| iri l l r- l| Student -lin lli i |

16

www.BccFalna.com
DBMS-RDBMS in HinDi
Information i Computer ,ii Manage i irn r, ni ; --i l Student r
Entity rini r, i l r-i| --i -lin rini r|

l| --i - r-ii r| Entity ri, i i| i| | r| rini r| lli i
| ll-ilni - l| --i -lin ii i Entities ri n r| li
i i; i| ln, -n i i-i l| lii ll-iln - Entity - Identify ri
ni r|

Programmer l| Business -lin Data i Computer Manage i
irni r, n r l Organization l Application Develop ri rini r,
Organization iii n rini r l Application -lin - Entities
ii r|

l lli i Organizations lli i i- n r, ;l l|
Organization l i ln, -n i i-i Entity - Represent rini r, r|
ln, -n i i-i l| Organization l i| - Entity ri, i | r|
rini r|

iri l l| School - Teaching i ii Teacher School Database
Application l Employee Entity rini r, l r| Teacher l| Bank -
i Account Open ini r, n Bank l r| Teacher Customer
Entity ri ini r|

r- Computer - l| Entity i Represent i irn r, n r- Entity |
Characteristics i Identify i rini r, lr r- Computer Manage i irn r|
Characteristics r| Entity i Computer - Represent -i- rin r|

li r Object | | s lli-ni i iilini (Characteristics) rin| r,
l ii r- Object i l| Object n ri in r| l l|
--i -lin Entity i| ;| Real World i i; i i; Object rini r, ;l
Entity | i| | s Special Characteristics rin| r, l Entity i Identify
li i ni r| Entity | ; Characteristics i i-ini Attributes ri ini r
i Attributes r| -i- rin r, l ,ii r- --i -lin Entity i
Computer - Represent n r|

l| i| Entity i Attribute. Information i r si-i lr-i rini r, l
Computer Store Manage li ii rini r| ; Attribute i i-ini Field ri
ini r| ; Fields - r-ii l| i l| i i -i i| Data Store li ini r|


17

www.BccFalna.com
DBMS-RDBMS in HinDi
l| --i -lin l| Entity l Attributes i Computer Mange i
rini r, | --i - | i rn i Entities l i| r| Attributes i
Computer Manage i rini r| ; l-iln - -i Group i Entities -i
Attributes i Share n r, lr Computer - Field ,ii Represent li ini r| l|
-i Field i Share i i| Entities Group i Entity Set ri ini r|

r- iri ,ii ; | li i -n | ilii n r| -ii l l|
School i Principal School - i i| Students | iili i
Computer Maintain i irni r, nil i| l| Particular Student
-lin iili | n ri, r Student i Serial Number Student
Database Application Software Input i Computer Student -lin i|
Information i Screen Display |

l| i| Database System Application i Develop r r- r --i
i s| nr Analyze ni nii rini r l ili System | -
ini i r i ini i i -lin ln Entities r
Entities ii r ` l r-i| ; --i i l r- i i ni ; --i |
- Requirement School Students | Information r| r i --i -lin -
Entity i| Student r| r|

--i -lin Entity i ni i i r- ni nii rini r, l Entity
-lin l ini i Computer Maintain i r| in r| Entity i
Attributes rin r, lr Fields - Define li ini r|

l r-i| ; --i - - Entity Student r i Student -lin iili
li in School - li ini r, --i -lin iili r| l| Student
| -n l- iili ri n| r, lr Computer Maintain i School
Principal l in| ri ni r

//==================================================================
1 Student i i-
2 Student lni i i-
3 Student i Address
4 Student | City
5 Student i li
6 Student | Class
7 Student | Date of Birth
8 Student | School - Join | Date of Admission
9 Student | Age

18

www.BccFalna.com
DBMS-RDBMS in HinDi
10 Student i Serial Number
//==================================================================

Description l| i| Student | Information si-si- -i (Attributes) i
Represent n r, l| School Principal i n ri n| r| ; Descriptions
iii r- l-ii lli Fields in ri n r

//==================================================================
1 SerialNumber
2 Name
3 FName
4 Address
5 City
6 District
7 Class
8 DateOfBirth
9 DateOfAdmissiona
10 Age
//==================================================================

l r- ; iili -i i Combined - i, ni i| Files i - l-
l| Student -lin iili i Represent n r, l| School
Principal i n ri n| r| i| Fields r-i| --i -lin Entity
Attributes i Represent n r, lr Computer Store Mange li ii r| l
r- ; Fields i Title - Specify ; | ;- Store l i i -ii
(Data) i Specify , ni r- l-ii Format in ri ni r, i l i |
ii| r



; iili ii i| Student | lli i | iili i i| Store
Manage li i ni r| r- i n r l lli Students -i Attributes i
Share r r, ;l Students ; -r i Entity Set rn r| r-i Entity Set -
6 Students r| ; ii| i r Column l| Student l| Attribute -i
i Represent ri r|


19

www.BccFalna.com
DBMS-RDBMS in HinDi
iri l Name Column r Student i i- Specify ni r, ;| nr
DOB Column r Student i Date Of Birth Specify ri r| lli Columns l|
Student Entity lli Attributes i Fields i Specify r r|

; ii| iii l r- SrNo 001 i Student | ii| in i ir, ni r-
Left To Right n r ; Serial Number i Student i i- Rahul in rini r,
l lni i i- Mohan Lal r i r Falna i- | City - rni r| ; City i
District Pali r i r Class 10
th
- ni r| Rahul | Date Of Birth 10 Feb 1982 r
i ; School - 15 July 1987 i Admission li r| i| r- ; ii|
iii r n r l ; ii| i| Fields i - Logically Related r, ;|
ii i| Fields i - l- l| Student -lin i| iili i
r r|

rn i Fields i l i - Logically Related ri, l- l| Entity
Related lli i | iili Provide n r, ni Logically Related Fields ;
Group i Record ri ini r| i| l r- ls| ii| iii r ni ;
ii| i r Row Unique Student Record i Specify ri r| l| Record
i Database Management System | iiii - Tuple ri ini r|

l| --i - li Entities Involved rin r, n i| Entities
Attributes i ;| i in li ini r i ;| i Table ,ii r Entity
i Represent li ini r|

iii - r ni r- r n r l l| --i -lin lli Entities | l
liinii i Computer - Store i rini r, liinii i Entity i Attribute ri
ini r , l Database Management System | iiii - Field ri ini r| l| Entity
Attributes (Data Fields) i r -r i l i - Logically Related rin r, l|
Entity -lin lli ii i Specify n r| ; Logically Related Fields
-r i Record ri ini r, i l| Entity Data i Specify ni r, lr
Computer Store Manage li ni rini r|

r| i rn i Entities i| Entity Set Data i Computer Store
Manage li ini r, n ; Entity Set -r i Table i Entity i Database
Mange System | iiii - Relation ri ini r| i| ii - r ni Fields -r
i Record rn r| Records -r i Table rn r i Tables -r i
Database rn r|


20

www.BccFalna.com
DBMS-RDBMS in HinDi
Requirement of Good Database Design
i ln i| Businesses Database System li r, i| Business -lin
iili i Computer ,ii Manage n r, i| Accurate Up-To-Date
Information in l r| Computer i in n r| ln i| Business
Corporations Computer Business -lin Data i Maintain n r, i|
i i| i i| l| i l| - Data Report | n rin| r, l iii
Business i Operate ii Authorizer i -lin | li
ni r|

;l | ri ini r l l| i| Database - Store l i i Data Accurate,
Complete ; nr Well Organized ri ilr, nil i| l| i
Information | n ri i l Format - Information | n ri, Information
-lin Data i | Format - Fastly Accurately in li i |

l| i| Database System i Develop n - iiiin n - ;| in
i i ii ii rini r, l Develop li i ii Application ir Local Area
Network Use li ii ri i l| Web Site Data i Access li ii ri,
ii r| l-ilni - Database in ri ii Data Accurate Fast rii ilr| i|
Database ir si-i ri i i, l r- Database System i li l| ii|
- - n l in| ii irn r, ni r- Database i rn r| iii|
s n| Design i | rini r|

l Database i Design -i ri, ni ir lni i| si Program Develop li
i, Database System i ri i| iili i r| i ni r| l|
Database Management System -lin Application - ln| i| iili i rin|
r, - iin iili i ii Database i ii Design r| rini r|

l| Database System Application i Develop n - Database Design
iii| ii i r| li ini r, n il - Application -lin lli
i | iili i i-i i ni r|

s Database Design i -n r l r- Database System i Develop n -
in - iii| Database i ; nr Design , i l il - -
- ii| i |

; i i Database Design n - r- ; in Focus ii rini r, l r-
l Organization -lin Database System Develop r r, Organization -
lli i i-i i l i i li ini r|

21

www.BccFalna.com
DBMS-RDBMS in HinDi

l Organization l n| i- ni r, n| Organization i il -
l| nr | ii| i i-i r| i ni r, ni lln Organization
i- n| iii Develop li ni Database System i| il - l|
i | i; ii| i r| ni|


Effects of Poor Database Design
Database i Design l i l| Database System Application - rn
r| -r-i Roll i ni r, ; in i r- i-i Business Example ,ii r|
-n n r| r- i Business Example r r, - rn r| Poor Design i
Use li ni r i ;| Poor Design ii lli i | iili Generate rin|
r, lr -nii ni r|

; Business Example i r- Music Store i- li r| ; Business - Music
Store lli Titles CDs DVDs | Selling i i- ni r| Music Store Mail
i i Orders iii Titles Selling i i- ni r| ; Business Example -
i| i; Customer l| Single Item i Purchase l Order ni r, Music
Store i Employee l- Form i Fill Customer Order i Computer
Data - Store i Record ni r|



l r- -i r r l Music Store i i Orders Mail ,ii in r, ;l r|
City ; Customers Orders i n r| ; Music Store Software - r Customer
i Uniquely Identify l Unique Number Assign li ni r| r
Customer i Unique Customer Number Create l r Customer Pincode

22

www.BccFalna.com
DBMS-RDBMS in HinDi
Number ii i- r n| Character i Use li ini r i i- i
n| Digit i Sequence Number Specify li ini r|

i| l Krishna i- i i; Customer l| Item l ; Music Store i;
Order ni r i r Customer 123456 Pincode Number i ir - rni r, ni
Customer i Identify l ii Customer Code 123456KRI001 rini|
Sequence Number ; in | l- ni r l r| ir - r i r| i- i
Customer i i| Music Store ,ii Uniquely Identify li i ni r|

Music Store - Titles Distributor i; i Title ini r, ni Music Store i
Employee i| Customers i Search ni r, lri Title l r r|
Order ii ii| l r Employee Customers | Computer - Stored Order
Data iii List Create ni r i Form l-in Item shipped? Check Box
- X Place ni r, i ; in i Signal rini r l r i r Order i
i li ni r|

r| - i Music Store i Management i| i ii nni
r| ii - n Software i- i| -| nr ni r| l i i i ;
Software Serious Problems i ri nn| r|

Unnecessary Duplicated Data and Data Consistency
Music Store Database - rn ii Data ii i Duplicated Form -
Input i ni r i r| i Data i ii l| Database - Store
lli i | --i i rin| r, l Database i Manage i l- ri
ini r| l| Database - r| i Data i ii Store | li i
Data Redundancy ri ini r|

i| i; Customer Music Store i; Title Order ni r, in Form -
Customer Order i Record li ini r| l Customer ii Order
Place li r, ; in | ii| i l Order i Customer i i-,
Address Phone Number i| Order | Information ii r| Database - Store
li ini r|

l r| Customer ii i Order ni r, ;l i; r|
Customer ln| i i| l| Title l Music Store Order ni r, r i
Customer i-, Address Phone Number i Form Fill Order |
Information ii Database - Store li ini r| l Customer |
Information i ii Duplication rini r|

23

www.BccFalna.com
DBMS-RDBMS in HinDi

r-i Database - ; nr Duplicated Form - Data Store ri r rin r, n r-
; in i i ii | ri ini r l Duplication Form - Store ri i i|
Data r i -i - r| Database - Store ri|

ii - r, ni l| Customer ,ii l i i r Order i Music Store
Application - Store n - r- ; in i i ii | rini r l
Customer r Order - i i-, Address Phone Number r| Store
l i|

;| nr Single Title l ln i| Order Place l in r, i| Orders
- Title i i| Character r li i Type i | rini r| ;|
| li ii Input li i ii Duplicated Data Consistent (l|) ri
ini r|

Database i Data ni ini r, ; i | Constancy i Maintain i
i| -l ri ini r| iin Business Oriented Database Software Case
Sensitive rin r, l- Uppercase Letters Lowercase Letters nn Behave
n r|

r- -i n r l Music Store Form - Order | Entry ii i; i| Operator
;ni Perfect Typist r| ri ni, i r-ii ; in i i i l l
Customer i- n - ii Character Capital Letter - lii ii i ii
Character Small Letters -|

; l-iln - l| r| Customer Orders | Entry n - l i|
Character Typing i Difference ri ni, ni Database Software r| Customer
i n Unique Record Create ni r|

iri l -ii l Rahul Rohit i- i Customers UMI 10 i-
Title | DVD i Order Music Store Place n r| Typist ; ii Orders i
Music Store Application Form ,ii Database - Store ni r, n r Rahul i
Order Specify n - Title -ii UMI 10 Character Combination i in
ni r , l Rohit i Order Specify n - Title -ii UMI10
Character Combination i in ni r|

-ii l Music Store i Customers | ii| in | n n| r,
lri UMI 10 i- Album i Order li r| Music Store Software ; in |
ii| in l l Typist UMI10 Character Combination i in ni

24

www.BccFalna.com
DBMS-RDBMS in HinDi
r, ni Application ,ii Generate ri i| Pending Orders | List - Rahul i
Order Display r| rini i l Typist UMI 10 Character Combination i in
ni r, ni Rohit i Order Display r| rini|

; l-iln - r- -n n r l Rahul Rohit ii - l| Pending
Order | r| ii| Music Store Application ni r| l l| i l|
Customer Order | Request ni i| r| rn||

r-i Current Music Store Application - ; in i Ensure | i; -ii r|
r l Database - Data i r| Duplicated Form - Store ri, l Duplicated Data
i| Consisted Form i| l| Database - Enter rin i in i |
--i Generate r| rin|| ; i | --ii i Solve l i n|
in - l i n r

ri n|i r l Data Duplication i lni ri ni ii i| ; Solution
i - r- in i s| nr -nn| l ri i i | rini l l| i|
Database Application - Data | Redundancy i| Duplication i | nr
Eliminate i i ni -i r i i r| ;| n rin| r| i| r Database -
iii rn Data Duplication ni rini r| r, i l l| i| Database i -| Manage
l | i| rini r|

i n|i r l i| l| Order | Entry Database - ri, ni i; i n|i
rii ilr, i Verify l Data Duplicate Form - Enter ri, n Data
r-ii r| i Database - Store ri|

Well Design Database - ; ii Solutions i Use li ini r| Duplication
i ri i| | --i r l r| Information i ii Store
Database | Size in| r, il r| i Data, Store ri l Memory
- ii Storage Space n r|

l l i Disk Space n| -rn| r| r, ln| r ri n| i|, ;l i
Storage Space | n l Redundant Data i Eliminate i ni i ii
r| r , lni Database i ni Maintain i|

Data Insertion Problems
Music Store ln i| Database rin r, l Publication il, ;- ln i|
Titles rin r, | List n| r, l ,ii ni ni r l Music Store i
Publication ll Titles Items i r| iri l i| l|

25

www.BccFalna.com
DBMS-RDBMS in HinDi
Title | CD/DVD Market - i i| rin| r, ; Music Store Title i
Catalog - Add i rini r|

-| ;| nr l| Publication - i| i; ; Book Publish rin| r,
Publication i i| Catalog i Update i ni r| i ;l li ini r
nil Music Store i Book Store Customers ; Title i Advance - Order
|

Catalog | List rin| r, l- i; Music Store i Publication Items |
List i Store ni r, nil r Customers i ; in | ii| l
i ii Title Item i r|

l r- l Music Store Application i iri - in - r r, -
lli Titles Catalog i Maintain | i; -ii r| r, ;l i| Market
- l| Title i | i l-n| r, ; Music Store - Employee -
Catalog i Update ni r i Titles Updated Booklet i r
Customer i i ni r, nil i Customer n l ii Title
Order r| ; Catalog Booklet - rn i Pages ri n r i r Page i
Music Store i i; Employee - Copy Paste | li ,ii ni ni r|

-ii l r- irn r l Catalog Booklet Database iii - r| ni
ri i| l lli i Titles Database - Stored rin r, ;l r- Catalog
Booklet i Database iii n i n r| l l i| r- Current
Database iii i- r| n r| ; i ii r

l| i| Catalog - l| i| Title -lin lli i | Additional iili rin|
r| iri l l| Title Singer, Music Director, Financer il | iili
ri n| r i Title -lin s Extra Description ri n| r|

l r-i Music Store Database - ; iili i Store | -ii r| r,
;l ; --i -iii - r- r-i Music Store Database i Modify
- Fields Create n r| l n|i i| | nr Catalog Create
- i- r| ri ni| il r| Title i rn i Customers Order n
r|

; l-iln - r Order ii Title | lli Descriptions i Computer - Store
Data | Redundancy in| i l r| Customer Order - l|
Title | Information i Store li i ni r-ii ; in i i ii rini l l
Title | Extra iili i l Customer Order - Specify li ni r, i l

26

www.BccFalna.com
DBMS-RDBMS in HinDi
i--l i- r|

| --i r l r-i Music Store Application Database Management System
- | i; -ii r| r , l l| Title i Advance - r| Database - Enter li
i | n i; Customer Title i Order Place r| ni r, n n
Title i Database - Store r| li i ni r i n Title Database - Store
r| rini, n n Updated Catalog Booklet Create r| li i ni|

ii r| Customer n n Title i Order Place r| ni n l
Updated Catalog Booklet in i ri, il Title | ii| Updated Catalog
Booklet r| in rin| r| ; --i i Database Management | iiii -
Insertion Anomaly ri ini r|

Data Deletion Problems
r-i ; Music Store Database Program l| Data i Delete li ini r,
n i| s --i i- in| r| -ii l Customer Item i Order ni
r| Order i Process i i| Order | Entry Music Store Form ,ii
Database - i ni ni r l Item i Manufacture i
Manufacturer Item i Create i li r| ; l-iln - Music Store
l| i| Customer i r Item r| i ni, l ; Out Of Stock Item
l Order li r|

l Orders | Entry Database - r rin| r, ;l i| Customers
Order | List - ; Item i Reference Database Delete i rini, lri
Particular Item l Order li r, i l Available r| r|

l l ini rn i Items Order l r, Order | List - ;
Unavailable Item Reference i Delete i rini, l l ini ;|
Item i Order li ii, Database Order | List - ; Item i
Reference Delete Order - i; Item r| ni, l Customer i
ii i | ; l-iln - Customers i Order i| Delete li ini|

l lli Customers | Information i| Order ii r| Database -
Store rin| r, ;l l l| Customer Unavailable Item l Music Store
i First Time Order li ri, ni Customer i Order Delete rini, Order
ii r| Customer | Information i| Delete ri in||

; l-iln - Music Store Customer i il - i; Catalog Booklet r| i

27

www.BccFalna.com
DBMS-RDBMS in HinDi
ni i Music Store i Customer Link r| -- ini, il Customer
i Address Un-Fulfilled Order ii r| Delete ri i r| Database | ;
Problem i Database | iiii - Deletion Anomaly rn r|


Meaningful Identifiers
r-i Database - i | --i r i l Customer i Uniquely Identify
l Create l i i Customer Number | r| ; Database - l| i|
Customer i Uniquely Identify l lii n| i Use li ni r, l-
Customer i- City Pincode Number i Use li ini r|

-ii l Customer l City - rni r, City i si l| ir -
i ini r| ; l-iln - | Customer i Identify l l i
Customer Number Create li ini, i l | City -lin rini| l
r-i ; Database - r| Customer i ID ri in i r| Customer i
Refer n|

-ii l Customer Music Store Order Place ni r i i r
| City Change ni r| l r Customer | City Change
i ii irni r l ln Order Music Store Pending r, l Items
i Music Store Customer i Serve r| li r| Customer Pending
Orders | ii| in l Music Store i r Operator i l Music Store
Software i Operate ni r, Customer i Customer Number sni, nil
r Customer Number i Customer | Transactions | List in |

l Customer ir - rni r, ;l i Customer Number Change ri
ni r| ; l-iln - r Current Customer Number | ii| Operator i
ni| li -n r l ; ir - i r Music Store ln i|
Order Place l r, | ii| Current Customer Number ,ii in r|
rin|, il Orders i ir l i i ir - r ii i
Customer Number i ii| ; l-iln - r Customer -i ni r l i
Order Music Store i in r| ri| ;l r Customer | Order i l
Music Store Place ni|

; l-iln - r| Customer r| Order | i Entry Music Store Database -
ri in| i ii Orders i Music Store ,ii i li ini, n r|
Customer i -i Items | i Copies in ri in|, l| | Copy i -ini

28

www.BccFalna.com
DBMS-RDBMS in HinDi
r Customer l Music Store i Return ni i Music Store i
Transportation Charges - r rin|

Entities and Data Relationships
Database r -ii rini r, l- Data i i Store li ini r, l~ Store
ri i Data | | i| Relationship | Information i i| Store li ini
r| Database Concept i - iii r l l| --i -lin iili i
ir rn i User Access r ri i l ir User Access ri ri, User i
; in | lni | n r| rin| r l --i -lin lli i Data
Computer - l i Store ri r r| User Database lli i
Data i | Relationship iii Access lli i | Database
Related Information Generate ni r|

riil User Data i Logically Access ni r l Data i-n - Physically
Store rin r| ;l User Database | i| Conversation i
Form - Translate i Available i i i- Software ni r,
l Database Management System Software (DBMS) ri ini r|

r- l Formal Way i Use lli i Data Relationship l| DBMS
Software i Express n r, Formal n| i Data Model ri ini r| r- l
Relational Data Model i ; -n - n, r Formal Structure r| rini r|

; r l r- l| Database i Design , r- Store l i i lli i
Data | | i| Relationships i Identify i rini r| i-ini lli
i DBMS Softwares r| Data Model i Support n r| ;l r-
l| DBMS Software i Choose r rin r, n r- i-n - Data Model i
i| Choose r rin r|


Entities and Their Attributes
r | l| iili i r- Data - l| Database - Store n r,
Entity rini r| r-i Music Store Application -i - Customer i i
Entity r il r- Customer Related Data i Database - Store n r| Entity
r-ii i; Physical -n r| ri, i | r| rini r|

li | l| i| -n i i| r- Entity -i n r, i l l| Physical Entity

29

www.BccFalna.com
DBMS-RDBMS in HinDi
Related ri| iri l l| Bank i Account i| Entity ri ni r, il
r Physical Person r| -lin rini r|

r Entity s Data rin r, i Entity i Describe n r| Entity ; Data
i Entity i Attribute ri ini r| iri l r-i Music Store Application
-i - Customer i Customer Number, First Name, Last Name, Street,
City, State, Pincode Phone Number ,ii Describe li ini r| ;l i|
Data Customer Entity Attributes r|

r- l| Database - l| Entity i Represent r rin r, n i-n - r-
l| Entity Attributes i r| Computer - Store r rin r| Attributes i
r Group i l l| Single Real World Entity iri i Describe
ni r, r| Attributes i Group Entity li l l| i| Instance i
Represent ni r|

i| i Attributes l| Rahul i- Customer i Represent n r, r|
Attributes Rohit i- l| Customer i i| Represent n r| iri
l Students Entity | l- ii| - i Student Instance r i i| Instance -i
Attributes i Share r r|

//==================================================================
SrNo Name FName Add Dist. Class DOB DOA
//==================================================================
001 Rahul Mohan Lal Falna Pali 10 10-02-1982 15-7-1987
002 Rohit Sohan Lal Bali Pali 09 11-12-1983 05-7-1987
003 Krishna Gopal Desuri Pali 08 20-03-1981 10-7-1987
004 Madhav Ram Lal Falna Pali 10 30-2-1982 01-7-1987
//==================================================================

l r-i ; Database - 2000 Students rin, ni ; ii| ,ii 2000 Students
Attributes Collections rin|


Entity Identifiers
l| Entity i Describe i lli Data i Database - Store i -
Purpose r| r l ;r i - l| Information i Retrieve l Use li
ini|


30

www.BccFalna.com
DBMS-RDBMS in HinDi
;i -n ri l r- l| i l| n| l| Entity i l| Entity
n Represent i rini nil r- ; in l Ensure ri , l r- l
Entity Data i in i irn r, r- | Entity Data in rin|

iri l -ii l Music Store Database - Krishna i- i Customers
r| l Krishna i- Customer Order | ii| in l Music
Store - Searching | i, ni Music Store Application l Krishna Data Return
ni` l ii Customers i- -i r, ;l Music Store Application ii r|
Customers Orders | List i Display ni|

il r-i ; Application - i i; n|i Use r| li ni r , l Music Store
Application ilsn Customer Orders | r| List Display | ; l-iln - Music
Store ,ii Return li i ii Resultant Output Inaccurate rini|

Music Store Application - ; --i -iii - r Customer i Unique
Customer Number i li ni r i i| l| Customer Orders | ii|
in | rin| r, n Customer i- -ii Customer Number i
in li ini r| Entities Groups - l| Particular Entity i Identify i
rn r| Common n|i r, il l| i| Database - i Customers i r|
Customer Number i r| li ini r|

Particular Entity Instance i Identify l r- i n|i i| Use n
r, l- l| Customer First Name Last Name i Telephone Number
ii liilin n r| l| Entity ; Attributes Combination ,ii i|
Customer i Uniquely Identify li i ni r|

l ; n| - i| i --i r| r| l Identifier i Tricky rini r, n
; l| i| lr- i Database - Enter n - Mistakes ri n| r| |
--i r l l| i| Customer i Phone Number Change ri ni r, l
Customer i Identifier i| Change i rini i ; l-iln - r| Customer i
Identifier ri in nii r| Customer i Identifier ri | l-iln - i ri i|
--ii i - r- r r| r|

s Entities l Invoices il r-ii Natural Identifiers Represent rin r, l
Invoice Number ri ini r| ; Invoice - Invoice Number i i; lii i r|
rini r, l l i| ; Invoice Number ,ii l| i| Invoice i Uniquely Identify
li ini r| -| ;| nr r- l| i| Entity i Uniquely Identify l
Meaningless Number i in n r|


31

www.BccFalna.com
DBMS-RDBMS in HinDi
iri l l| Customer i Identify l r- l| Attribute i
Attribute Combination i Use | n r| r| r- l| Customer i
Meaningless Number ,ii i| Identify n r i r- i n r, n
Customer ir r| i| r, l| i| Attribute - ir i Changes i,
Customer i Identifier Change r| rini i l| Customer i Identifier Change
ri | l-iln - i ri i| iili i| Generate r| rin| r|

r- ln| i i| l| Entity Instance i Database - Store n r, r- r|
irn r l DBMS ; in i Ensure l r Instance i Unique Identifier
rini| Concept Database Constraint i iri r|

Constraint i l- i Rule rini r, l Database Follow ni r| Database -
lli i Constraints i in Database Constraints i l-i i
i ni r , l Database - Data Accurately Consistently Store ri |
Guarantee ri in| r|


Single-Valued and Multi-Valued Attributes
l r- Relational Database Design r r, ;l r-i Data Model - r
Attribute Single-Valued rii | rini r| ;i -n ri l l| Entity l|
Instance r Attribute - r| -i (Data) i Store li i ni r|

iri l i; Customer Entity l| i| Instance i Telephone
Number Store | lii ni r| i| r- l| i| Customer i r|
Telephone Number Customer Table - Store n r|

l l| Customer i ii Telephone ri n r| l Customer
i ii Phone r i r i| Numbers i Database - Include
ii irni r, ni Customer Entity i| Customer Table - l| Telephone
Attribute File - ii Telephone Numbers i Store r| li i ni r| ;
l-iln i Customer Entity Handle r| ni r |

riil l| Database i Entity-Relationship Model Database i Represent
i Formal i Logical Data Model n i Independent rini r, l i| r- Data
Entity-Relationship Model i Data Logical Model iii r| Develop n
r|


32

www.BccFalna.com
DBMS-RDBMS in HinDi
l r- Logical Model - l| Attribute - Multi-Valued -i i Store r| n r,
;|l r- Entity-Relationship Create n - i| l| Single Attribute Field -
ii Data i -ii i Store r| n r|

ii Phone Numbers | l-iln Customer Table i Customer Entity
Phone Number Attribute i Multi-Valued Attribute - liilin ni r|
il l| Relational Database - l| i| Attribute Multi-Valued r| rini r, ;l
r- ; Multivalued Attributes i i Entity Create Handle i rini r i
lli Multi-Valued -ii i Entity - Hold i rini r|

ii Phone Number ri | l-iln - r- Phone Number i- i Entity
Create n r| ; Entity r Instance - Attribute Customer Number
i rini, li Phone Number Store li ii r i i Attribute Customer
Phone Numbers i rini|

l l| Customer i Phone Numbers ri, ni ; Entity - Customer i
Instance rin, l- Customer Number ni -i rini l Phone Numbers
nn rin| ; Concept i r- l-ii Represent n r, ri ri
Entity Customer Entity r l- i Customer Instance r l i Entity
Phone Number Entity r, l- r Customer ii Phone Numbers
Customer Number ii Stored r|

Customer Entity
//==================================================================
CustID FName LName City Dist. State
//==================================================================
001 Rahul Sharma Falna Pali Rajasthan
002 Rohit Verma Bali Pali Rajasthan
003 Krishna Gopal Beawer Ajmer Rajasthan
004 Madhav Singh Bhyender Thana Maharastra
//==================================================================


Telephone Entity
//==================================================================
CustID PhoneNumber
//==================================================================
001 9896589360
001 02934223366
001 02934223654
002 02938222333

33

www.BccFalna.com
DBMS-RDBMS in HinDi
003 02937236598
003 9979455505
004 9357268933
//==================================================================

Telephone Number Entity - Telephone Numbers i Entity Identifier - Use
li i ni r| ; Database - l| i | i; ii| i r| rin| r| il
; Entity - r- Phone Numbers i r| Store r r i Phone Number
i - Unique rini r| i Phone Number l| Customer Number 001 i r
r| Phone Number l| Customer Number 003 i r| ri ni|

Multi-Valued Attributes ii --i rin| r l l r- l| Entity - Multi-Valued
Attributes i Store i ir, ni r- r Value l i Field Create i
rini| l r- Fields Create i| n r, n i| i| i| lln r| li i
ni l r- ln Fields Create ilr| il l| Customer i
ln Phone Numbers ri n r, r- ; in i i| i| lln r| n r|

iri l l r- r-i Database - l| Customer lin- 4 Phone
Numbers Store | lii in l l-ii Entity i Design n
r

Customer Entity
//==================================================================
CustID FName LName ... Phone01 Phone02 Phone03 Phone04
//==================================================================
001 Rahul Sharma ... 223355 445566 442255
002 Rohit Verma ... 121245 235689 214565 568996
003 Krishna Gopal ... 556688
004 Madhav Singh ... 558899 445566
//==================================================================

; Entity Representation - r- i n r l Customer Number 002 r| i
Customer r, l i i Phone r i ;| Customer ,ii Phone Numbers
l Reserve l n Storage Space i in li i ri r| ii Customers
i l i Phone r| r, ;l ; Attributes ,ii Reserve l n Space
i i; in r| ri ri r|

l r- -i l Customer Number 001 i Phone ni r, ni i
Phone Number i Store l Entity Database Representation i i|
Entity | Table i Modify i i Field Customer Table - Add i rini,
i l rn r| l- i- rini r i l| --i i Solve l r-ii

34

www.BccFalna.com
DBMS-RDBMS in HinDi
Database Structure i Change i i| -i r| rini r , il i
Database ii Connected Front-End Forms i i| | nr Change i ni
r| i| r- ; n| i ni l| i| nr Apply r| n r|

l r- -n n r l iin ini i i i r| Phone rin r, ; l-iln -
l r- ; n| i Use n i| r, n i| iin Customers i i i
Phone r| ri | r ; Attributes l Reserved Space i i; in r|
rini i iin Space li -n r| Reserved rni r|

i Database | Size i| in| r, l Database Searching
Operations i| i| - ni r| i| l| Entity - r| l| Multi-Valued
-i i Store l r- | Entity i Use r| n r| l r- i n r,
ni r- lli i | ; --ii - in r|

riil Theoretically -i r l r- i Database Create n r, i l|
Attribute - rn i Data Store ni r, l Practically ; i
Database i Implement i i| -l rini r|

ii r| l l| Database r| Field - ii Data i -ii i Store li
ini r, ni Database - Searching Operation Sequential Form - r| ri
ni r, i l Slowest Searching Process rini r|

l l Field - r| Single Value i Data i Store li ini r, ni
r- Database Binary Searching | Process i Apply n r, i l
rn r| Fast Searching Process rini r|

i-i l- - r- i| i| l| Multi-valued Attribute i Face r
rin r, ni r Attribute ; in i n rini r l r- Entity - i Fields Created
n r| ;l Same Attribute Multiple Values i Handle i
n|i r| r l r- i Entity Create i Same Attribute i|
Values i Instance | nr Entity - Store |


Identifying Problem Related Entities
l --i -lin i-nl Entity i Identify i ; i i| Confusing rini
r| l r- r-i Music Store r| iri iii -n, ni i r- Music Store
i Entity - Identify n r ` r|, r- i r| n|

35

www.BccFalna.com
DBMS-RDBMS in HinDi

il Music Store ni Entities i i Collection r, lr Music Store Handle
ni r| Entity ni i-n - Music Store Items r, lr Database ,ii Manage
i r|

; in i -| -n l r- iri n r| -ii l r- Music Store i
r| Entity - Identify n r| ; Entity i Represent l r-
; lli Attributes i ni i rini i l Music Store Items Numbers, Item
Titles, Item In Stock, Retail Price il rin|

l l r- Music Store i r| Single Entity - Describe r r,
;l r- ; r Attribute - Multiple Values i Store i rini i i l r-
r nii l l| i| Relational Database - i; i| Attribute Multi-Valued r| ri
ni, ;l r- Music Store i Single Entity - Identify r| n r,
l~ r- ; Entities Collection - Identify i rini r|

i iri in r, -ii l i; Doctor i| Patient | Medical History
i Maintain ni r| l| Music Store Inventory Program | nr r| Medical
History i| nr i ii Entities i Collection r| Medical History
Appointments Appointments ii ri i| i-ii ,ii ni r|

;l History i-n - Appointment Entities Medical Treatment Entities
Instances i Collection r, i l - Entity r| History ni r Output r l
Database Application Entities Instances (Records) Collection
- Generate ni r|


Documenting Logical Data Relationships
Entity-Relationship Diagram r- i n|i Provide ni r, li in r-
l| Entity i Describe i Attributes ii Logically Represent
n r| ER Diagrams ; n| ln r, l i n|i i ii Use li
ini r|

ri n|i Dr. Peter P. S. Chen Develop li ii| ;l ; Data Modeling
Diagram i ER Chen i- li ni r| i n|i James Martin Clive Finkelstein
Develop li r i ; Information Engineering (IE) - Use li ini r|


36

www.BccFalna.com
DBMS-RDBMS in HinDi
r- ; - l i| n| i Use Database i Entity Relationship Data
Model Diagram i n r| ii r| n|i - l Entity i Rectangle ,ii
Represent li ini r i r Entity i i- Rectangle lii ini r|
iri l r- Customer Entity i ER Diagram - l-ii Represent n
r

Customer

Original Chen ER Diagram Model - Entities ii Attributes i Show
| i; lii r| i|| l i| ini Chen ; ER Model i iii i Modify
l-ii Entity Attributes i i| Entity ii Include li r|











Entity Identifier Attribute i- r Asterisk ( * ) ni Identifier
Attribute i Represent li ini r| Information Engineering Model - Entity i
Attributes ii - l-ii l ,ii Represent li ini r

Customer
*CustID
FName
LName
Telephone


l, Information Engineering Model i - Space - ii s n| ii i
ni r, ;l r- ; -n - iin ;| Model Symbols i Use n| riil
n ri Chen ER Model i i| Use li ini|


Customer
FName LName
Telephone *CustID

37

www.BccFalna.com
DBMS-RDBMS in HinDi
Entities and Attributes for Music Store Application
r-i Music Store Database Order Entry Form r| r- - Entities i ni
ini r, lr r- Music Store Database - Manage i r|



riil r- Database Design Process i in in r, n Database Design -
Additional Entities | i| n n| r| r-i Music Store Database -lin
-- Entities Customer, Order, Distributor, Actor, Producer Item r i ;
Entities -lin Attributes lr Database - Store i r, r l-ii
Information Engineering Diagram ,ii iii ni r






38

www.BccFalna.com
DBMS-RDBMS in HinDi
Domains
r Attribute i Domain rini r, i Express ni r l Particular l
Attribute - l nr -i Store ri n| Domain rn si-i i| ri ni r|

iri l l Population -lin Database - Male/Female i Represent
l Gender Attribute - M/F Character i r| Store | n rin|
r| l l Customer i i- Store l Name Attribute - rn i
Characters i Store i ni r|

Database Management System (DBMS) Domain Constraint Through
Domain Enforce ni r| i i| Database - i; Data i -i Store li
ini r, r DBMS Software Domain Constraint iii n ni r l
Database - i ii -i | Domain i r l l Domain Constraint ,ii
Set li ni r ii r||

iri l l l Customer | Birth Date i Store l Database -
DOB Attribute i Date/Time Domain Constraint i Set li ni r, ni DBMS
Software Attribute - | Data i Store ni i Date/Time Format i
rini|

ii l i| Domain (Data Type) Data i r DBMS Software Database -
Store r| ni ri n l r- Date/Time Domain Constraint i l
Attribute ii Set n r, n r- Attribute - 30 February | l nn Date
i i| Store r| n r|

Documenting Domains
ER Diagram i i Common Format Use li ini r, - Domain i Specify
| i; lii r| rin| r, l~ Diagram Document Associated rni
r, l Data Dictionary rn r| Data Dictionary i - r- in l-ni n| r-
Chen ER Model - r Attribute | Attribute Domain i Specify
n r|

Practical Domain Choices
Music Store Entities Attributes l l Domains i Choose li ini r ,
Theoretically DBMS Softwares Independent ri ilr, lr r- Music
Store Database i Develop l Use n|

39

www.BccFalna.com
DBMS-RDBMS in HinDi

l i| iin Relational DBMS | Query Language - SQL i in n
r, l- l Attribute i l- Domain Assign l i n r

CHAR
Fixed-Length Domain rini r| ; Domain i l Attribute ii
Associate r- Attribute - lin- 256 Characters Store n r|

VARCHAR
Variable-Length Domain rini r| ; Domain i l Attribute ii
Associate r- Attribute - Variable Length lin- 256
Characters Store n r|

INT
r- l Attribute - Integer -i Store i rini r, n r- Attribute
ii ; Domain i Associate n r|

DECIMAL and NUMERIC
r- l Attribute - - i -i i Store i rini r, n r-
Attribute ii ; Domain i Associate n r| r- Real Number
Domain i l Attribute ii Associated n r, n r- i| Specify i
rini r l r- - i i lrn ln i n i -i Store i irn
r i - i ln i n i -i Store i irn r|

iri l Currency Values i r-ii - i i ii n Specify
i rini r, ;l l r- Currency i Computer - Store l l
Attribute ii ; Domain i Associate i ir, ni r- DECIMAL (6, 2)
Statement ,ii i- n r, ri 6 i n Currency -i i l
Attribute - Store li i ni r l -i - - i i ii n
i Store li i ni r|

DATE
r- l Attribute - Date Store i rini r, n r- Attribute ii ;
Domain i Associate n r|

40

www.BccFalna.com
DBMS-RDBMS in HinDi

TIME
r- l Attribute - Time Store i rini r, n r- Attribute ii ;
Domain i Associate n r|

DATETIME
r- l Attribute - Date Time Combination i ii Store i
rini r, n r- Attribute ii ; Domain i Associate n r|

BOOLEAN
r- l Attribute - True i False | l Logical Value i Store i
rini r, n r- Attribute ii ; Domain i Associate n r|

i DBMS Softwares BLOB i- Data Type i i| Support n r,
li in Binary Object l l Graphical Image i Store l
n r|

l Attribute l ln Domain i Choose Database | Accuracy
i | nr lln li i ni r|

iri l r-i i - Pincode Number 6 Digit i Number rini r| i
Pincode Number i INT Domain Associate i ilr| r|, Pincode i i
iii | r INT Domain Associate r| i ilr|

ri ii r l ; ii - Pincode Numbers | - Hyphen Symbol i in
li ini r i i ii r l l Pincode Number i INT Domain ii
Store li ini, ni ; Pincode Number r nii i ii Zero r| nii
i ni, il DBMS Preceding Zero i Remove ni|

ii r| Pincode i Number rini r, l ii r- i| i| ; i |
Arithmetical Calculations Perform r| n r, ;l Pincode Number i Integer
i Character Form - Store r- ; i | ii| i i-i r| i
ni|

;| nr r- l Data i ii l i | Calculation | n rin| r,
n r- Data i Character Form - Store r| n r|

41

www.BccFalna.com
DBMS-RDBMS in HinDi

iri l l r- l Employee | Salary i l Character Form - Store
li i, ni r- Employee i PF, DA, HRA il Calculate r| n r,
il Character Domain l i i Arithmetical Operation Perform r| li
i ni|

;| nr l r- l Attribute - Date i Time Store i ir, ni r- DATE i
TIME Domains i r| Use i ilr| l r- l Date i Store l
Character Format i in n r, ni r- Date -lin lli i | --ii -
in|

iri l -ii l r- i Dates 01/11/2009 10/11/2000 i Character
Domain i in Database - Store n r| l r- DBMS ni i
ir l i| Date r in| r ni ii r| Dates Character Format - Store ri
ii DBMS ; ii Dates - Alphabetical Order iii r i i| Date
i Calculate ni i r- Result - 01/11/2009 i ni, il
Alphabetical Order - 01, 10 r ini r i r- -n n r l nn
Result r|

l r- Character Form - r| Date i Store ii ir l i| Date r
in| r, ni r- ; Date i YYYY/MM/DD Format - Database - Store i rini i
; Format | Date i i| li - rn r| Rarely Use li ini r| l l r-
; Dates i Store l DATE Domain i in n r, ni r- Date
-lin ; i | l --i i i-i r| i ni r, ii r| r- DBMS ,ii
Date l Provide | i i| liii i i| in n r| i| r- i Dates
| Difference i ni ni n r i i Dates i i - Compare n r|



42

www.BccFalna.com
DBMS-RDBMS in HinDi

BASiC DAtA RelAtionSHiP


43

www.BccFalna.com
DBMS-RDBMS in HinDi
DBMS Basic Data Relationships
i Database -lin i| Basic Entities i ni n i i r-ii
ni i- Entities | | i| Relationship i Identify i rini r| l|
Database lli Entities | -n n| nr | Relationship ri n| r One
To One Relationship, One To Many Relationship Many To Many Relationship

; r l r- ; Relationships i -n r- in i - i| rin| r l l|
Database - ln| i| Relationships Stored rin| r, i| Relationships Entities
Instances | rin| r|

iri l r-i Music Store Example iii i; Customer Items
Related rini r, li Customer Order li r| i| Customer Entity i r
Instance Item Entity Order l n Item Instance Related rini r|

r- ri l Relationship i - i r r, r Relationship | nr l|
Database i Conceptual Representation r i ; Relationship i Data Actual
Physical Storage i; -i r| rini r|

r- Data Relationship i ER Diagram i IE Diagram ,ii Document n r, n
r- lli Entities | | Relationship i Show n r| ; Diagrams - r-
Possible Relationships i Show n r i Database - Allowable rin| r| r-
n l| Relationship i Compulsory Specify r| n r, n n | r|
rini r l Database Related r Entity i| Relationship - Involved ri|

iri l Music Store Database l| i| Customer | Information i
Database - Store ni r, i r| Customer Music Store i l| i| Item
l i; i| Order i li ri| ri | r| r l r| Customer Music Store
Database - Store ri ni r, l i; Music Store i l| Title l i;
Order li ri|


One To One Relationships
-ii l l| si- ir - r| Airport r i l| Database - r ir
Airport ii r| Entity - Involved r| ; l-iln - City Airport ii r|
Database - i n Entities Instance - Represent rin|


44

www.BccFalna.com
DBMS-RDBMS in HinDi
n City Airport | One To One | Relationship i ; nr Express li
i ni r l Airport City - r| Situated r i City - r|
Airport r|

iri One To One Relationship i ii iri r, il ; Database -
l| i| - City r| Airport Related rini i Airport
r| City Related rin|| riil l| ir - ii Airports ri n r, l
r- ri rn r| si- ir Airport Database i Manage r r i r- -i
r r l l| i| si- ir - ii Airport r| ri n r|

l r-i i i Entities A B i Instances Ai Bi ri, ni ; ii Entities
Instances | One To One | Relationship ni| -i r, l| i| -
Ai Entity B Zero i One Instance Related ri i Bi Entity A Zero i One
Instance Related ri|

l| i| Business Database Application - One To One | Relationship rn r|
Rare Case - n| r| iri l -ii l r-ii Music Store Distributor
Dealing i n ni r| Music Store Distributor i r| Special
Title i Order ni r|

l r- Distributor i Database - -ii , ni r- in r l
Distributor Entity i Instance Music Store Item Entity Instance
Related rini r| ;l ri Distributor Item | One To One |
Relationship n| r|

l Music Store Distributor i ; i Titles Order ni r, ni ri
l- Violate ri ini r l r i Distributor Music Store r| Item
Related r| ; l-iln - Distributor Entity Instance Item Entity
Instance | One To One -ii One To Many | Relationship in| r|
il r i Distributor Music Store ii Items Titles Related
ri ini r|

;| nr l r- Music Store Database - Credit Card i- i i Entity
Create n r, l- Credit Cards Data i Hold li ini r, li in
Customer | ii| i l n r, li s i Music Store - ii r|
l r Customer r| Credit Card i i ini r, ;l ri i|
Customer Entity Instance Credit Card Entity Instance | One To One
| Relationship Create rin| r|


45

www.BccFalna.com
DBMS-RDBMS in HinDi
Credit Card Entity l Credit Card i Number, Type Expiration Date Attributes
ri n r| l r- -i l r Customer i r| Credit Card rini r ,
ni l Credit Card l| i| Attribute i -i Multi-Valued i ri | r r-
Credit Card i n Entity - Represent | n r| r | r- Credit
Card lli Attributes i Customer | Information ii Store n r|

r- i| i| l| Database i - One To One Relationship i Identify n
r, ni r- i i i ilr, l r| r- One To Many | Relationship i ni
One To One | Relationship r| -i r r i r| r| Entity i ni i Entity
- Represent | ilii ni r| r r|


One To Many Relationships
l| Database lli Entities | | rn r| Common Relationship rin|
r| i-n - Maximum Database - ln| i| Relationships rin| r, - iin
One To Many | r| Relationship rin| r| One To One | Relationship ni Rare
Case - r| n| r|

Music Store Database i - i| Database lli Entities Instances
| r| Relationship Define ri r| r| iri l Music Store rn i Titles
l Distributors i Order ni r i Music Store Title i Item r|
Distributors in ni r|

;| nr Customer Music Store ; Orders Place ni r l
Order r| Customer ni r| Order Number 001 l| Rahul i-
Customer li ri, ni ;| Number i i; i Order l| Customer ,ii
Music Store i r| li i ni r|

l r-i i i Entities A B i Instances Ai Bi ri, ni ; ii Entities
Instances | One To Many | Relationship ni| -i r , l| i| -
Ai Entity B Zero, One i More Instances Related ri i Bi Entity A Zero
i One Instance Related ri|

One To Many | Relationship i Family Relationship - ii n|
Represent li i ni r| -i i | One To Many |
Relationship rin| r, l- -i ; ni ri n r, l l| i| |
r| -i ri n| r|

46

www.BccFalna.com
DBMS-RDBMS in HinDi

-| ;| nr l r- i iri i ni Computer CPU | i|
One To Many | Relationship i Represent li i ni r, ri CPU i
r| Computer - Install li i ni, l Computer - ii
CPU i Install li i ni r|

l ;| Concept i r- Music Store Database Apply , ni r- r n r
l Music Store Distributor | One To Many | Relationship rin| r, ri
Music Store Title l l| r| Distributor i Order ni r, l r|
Title Music Store i ii Distributor i n r|

in i i l r- Data Relationships i Specify r rin r, n r- i|
-i Relationships i Indicate r rin r i | r| rini r l i| Entities
i| Instances r Documented Relationship - iin | i| r-i Music Store
Database iii | r| r l i; Distributor Instance l| Item Entity
Zero, i ii Instances Related ri|

Many To Many Relationships
Relationships i| i| Common Relationships r| l r- Music Store Database
i - ; Relationship i liilin , ni Customer Entity Item Entity |
Many To Many | Relationship rin| r| il Customer ii Titles i
Order ni r i r| Title l ii Customer Order n r|

;| nr Distributor Item | i| Many To Many | Relationship ri
n| r, l- r| Distributor i ii Title l Order li i ni r
i r| Title i ii Orders - Place li i ni r|

l r-i i i Entities A B i Instances Ai Bi ri, ni ; ii Entities
Instances | Many To Many | Relationship ni| -i r, l| i|
- Ai Entity B Zero, One i More Instances Related i Bi Entity A
Zero, One i More Instances Related. Many To Many Relationship Database
Design - i | --i i ni r, lr in l-ni -nii ni r|


47

www.BccFalna.com
DBMS-RDBMS in HinDi
Weak Entities and Mandatory Relationships
r- lli Relationships i Discuss n - Relationship i Zero Instance
i| Related nii r, i ; in i Indicate ni r l i| Relationship - Specify
l n Entities l| Instances i Relationship - Participate i Optional r|

iri l l r- Music Store Database i - ; in i -n, ni
Customer | Information i - i| Database - Store li i ni r, l
l| Item l i; Order r| li rini r |

; l-iln - Customer Entity i i; Instance Item Entity l| i| Instance
Related r| rini r i ii - r ni Customer Entity i i; Instance Item
Entity Zero Instance Related rini r|

riil Customer i; Order Place r| ni r, n i| Customer |
Database - Entry | i n| r , l l r- ; Concept i Reverse Order -
, ni i -i r| ri ni| i| r Order i l| Customer Related rii
| rini r| li l| Customer Order l r, Music Store Database -
Order Place r| r| ri ni, il l| i| Order i Place l
Customer rii ilr|

l r- ; Discussion iii -n ni ri Order Weak Entity r, il
i Entity r , l Database - n n Store r| li i ni r, n l
Order Instance Related i; i Entity Instance Database - Present i ri
i Order Related i ri|

Customer Entity i Instance Zero, One i More Orders Related ri ni r|
l i| Order i i l r| Customer Entity Instance Related
rii | rini r| Weak Entity l Zero Option Available r| rini r| ; l-iln -
Customer Order | | Relationship | i| Mandatory i
Compulsory Relationship r, l Database i -| Manage l
Database - liilin i | rini r|

l| Database | Consistency Integrity i Maintain l i|
Weak Entities Weak Entity Associated Mandatory Relationship Entity i
Identify i i| -r-i rini r|

;i Database i| ii i l -ii l r- i Order Database -
Store n r, l Belonged Customer i ni r| r| ; l-iln - r- Order -

48

www.BccFalna.com
DBMS-RDBMS in HinDi
Specify l n Items i i| i| l| Customer n Ship r| n r, il
Order - Customer | ii| r| r| rin| r , l Order Items Ship
r|

;| Concept i r- Order Order Lines | | Relationship i i| One
To Many Relationship - Define n r, il r- r| irn r l li l|
Order Related r i; Order Line Database - Store ri| Order Line l| Order
l-in l| Specific Item i Refer ni r| i| Order Line n n
Meaningless rini r, n l r- r| in r l r Order Line l Order
Belong ni r|

; i r- Music Store i l| i| Item i Database - Store n
r, l r- i | n r| rin| r l Item i l Supplier ii r,
l r- ri -i r r l r Item l| Supplier ini r| ; l-iln -
Supplier Item | i-n - Zero To Many | Relationship ri in| r |

Documenting Relationships
Chen IE ii r| n|i ER Diagrams - Relationship i n n|i
Represent li ini r| ii r| n|i i l-i r| Chen Method -
Relationship i Represent l Diamond Symbol i in li ini r i
Entities | Relationship Type i Represent l Arrow Based Lines
i in li ini r| iri l l- ER Diagram i li



; Diagram - r- Customers Orders | | Relationship i i n r|
Customer | n i Single Arrow Point ri r r Arrow Indicate ni r l
Order r| Customer Belong ri r| l Orders Entity | n i
Double Arrow ; in i Indicate ni r l Customer ii Orders
Place ni r| Diamond | lii ni i Relationship -i - s
ii| i ni r|

Chen Model - i Alternative Styles r| r Style - Arrows i Numbers Letters
Replace li ini r| Number 1 Indication ni r l Order l|
Customer ini r| l M i N Character Indication ni r l Customer

49

www.BccFalna.com
DBMS-RDBMS in HinDi
ii Orders Place ni r| ; n| i Apply r- l-ii
Diagram in rini r



i Alternative Problem i Solution iini r, i n i rin| r r-
Relationship i ii Directions - Read n r| i| Customer Places Order ni
Meaningful Information r| l Order Places Customer l| nr | i;
Meaningful Information i r| ni r| ; --i i Solve l ER
Diagram - Diamond Relationship Represent i Arrows Relationship
i- i Remove li ini r i Diagram i l-ii Inverse li ini r



Diagram ii Meaningful Information Provide ni r, i l-ii r l

1 1 Customer M Orders Place ni r| i|
1 Customer Places Many Orders i

2 1 Order 1 Customer r| Place ni r| i|
1 Order is Placed by 1 Customer

Chen Model - rn r| | Limitation r i i r ER Diagram i Draw
|| Chen ER Diagram - l| Weak Entity Mandatory Relationship i
Represent i i; -- n|i r| r|

iri l Music Store Database l Order Weak Entity r i li l|
Customer Entity Database - Store r| li i ni i Customer Entity
ii ;| Relationship | i| Mandatory r|

s Database Designers Chen Method - i Symbol Add li r l- l|
Weak Entity i l-ii Double Bordered Rectangle ,ii iii ini r





50

www.BccFalna.com
DBMS-RDBMS in HinDi





i| i| l| ER Diagram - l| Weak Entity i Represent li ini r, n
Symbol ; in i Indicate ni r l Entity ; Parent Entity ii |
- Mandatory Relationship r| l l ; Entity ii ii Parent
Entities Related ri, ni ; in i i-i n| n i -l ri ini r l i
Entity ii ; Weak Entity | Relationship Mandatory r|

Chen Method ii r- Information Engineering Method i Use i| ER
Relationship Model i Create n r| IE Method - Line End iii r|
lli i | Relationships i Represent li ini r, i l Chen Method |
ni - ER Diagram i ii i ni r|

iri l l- l - | One To Many Relationship i iii ni r, l r-
Chen Method ,ii iii r| ; l - Line End iii r- ; in i ni
ni n r l i| Relationship Mandatory r i ii Entity Weak Entity
r|



Customer Entity in i i i| Lines (||) r, i -n rini r l r Order
l i l Customer Related r| l 0 Optional r| r, ;l ;
Entities | | Relationship Mandatory r|

;| nr Order Entity ii Connect l n 0 n| Legs i -n r l
Customer Zero, One i More Orders Related ri ni r| IE Diagram - Line
n - -n i Symbols i Use li i ni r

Order

51

www.BccFalna.com
DBMS-RDBMS in HinDi
1 || : One and Only One (Mandatory Relationship)
2 0| : Zero or One
3 >| : One or More (Mandatory Relationship)
>0 : Zero, One or More

l r- Music Store Database lli Entities | | Relationships i IE
Diagram ,ii Represent , ni ii Diagram l-ii ni



; IE Diagram ,ii l- Relationships Model ri r r

Customer Zero, One i More Orders Place ni r l Order
i l Customer ,ii Place li i ni r|

z Order - i ii Items ri n r l Item Zero, One i
More Orders - Appear ri ni r|

s Actor Zero, One i More Items - Appear ri ni r i ;| nr
Item - Zero, One i More Actors ri n r| ( ; i | Films i| n| r,
l- Human Actors -ii Animal Actors rin r| ;l r-ii |
r| rini r l r Item - - Actor Related ri| )

r Item Zero, One i More Producers ri n r i r Producer Zero,
One i More Items l Responsible rini r| riil r- Practically n

52

www.BccFalna.com
DBMS-RDBMS in HinDi
n l| Producer i Database - Store r| n r, n l r
Producer l| Item Related i ri| Producer Items | |
Relationship i Optional Means - Specify r- li Item |
Information Store l r i| Producer | Information i Database - Store
n r|

; Design - Notice i| i | | r i r l ; Design - n|
Many To Many Relationships r, i l Order To Item, Actor To Item Producer To
Item Entity | r| ; r l r- ; Data Model i l| Relational
Database Map , ;r l| n| Handle i rini, il l| i|
Relational Database - r- Many To Many Relationship i Directly Map r|
n r|


Dealing with Many To Many Relationships
il r- r nii r l Many To Many Relationship ii s n i |
--i r| r| --i ni r| r l i; i| Relational Data Model Many To
Many Relationship i Directly Handle r| ni r| l| Relational Data Model
- r- One To One i One To Many Relationship i r| Handle n r|

;i -n ri l r- Music Store Database - l Many To Many
Relationship i Identify li r, r One To Many Relationships Collections
- Convert Relational Data Model - Use i rini, nil r- ;r
Relational DBMS - Use |

| --i ii| ii l- r| ; -n l -ii l Music Store l|
Distributor i i; Order ni r i Music Store i; Customer Order Place
ni r| ;l Order Item | Many To Many | Relationship n| r, il
r Order - ii Items Appear ri n r i i - r Item ; Orders
Appear ri ni r| i| Music Store l| Item l i; Order Place ni r,
n Item Copies | i Music Store i in ri i| Copies | i li
ri n| r| i| ri ni r l Music Store l| Item i Copy in i irni
ri l Stock | -| ii r Item n| r| in ri|

i r l Order l n Item | Quantity i ri Store i ilr` il
Quantity Order Entity i lr-i (Attribute) ni ri r| ni il Quantity Item
Depend n| r, l Music Store Order ri r| ;| nr Quantity Item

53

www.BccFalna.com
DBMS-RDBMS in HinDi
Entity i i| lr-i (Attribute) r| ri ni il Quantity l| Specific Order
Depend ni r|

; i Attribute - Store ri i Data i Relationship Data ri ini r, ri
i; Data lr| Entities Relationship i lr-i rini r i l r Data Relationship
- iin i l| Entity i lr-i (Attribute) rini r|

l l| Relationship - Attributes r| rin r| ;l r- Relationship Data i
Represent l l| Entity | n rin| r , i i Entities | |
Relationship i Represent i ; Entity - r- Relationship Data i
Attribute - Store n r|

i| lr| i Entities | i; i Data ri i l| i| Entity - -n
Represent r| ri ni, l ii Related Entities Group iiiln rini r, n
r- ; i Relationship Data i Store l Entity | n
n| r i ; i Data i Entity - Store li ini r|


Composite Entities
Entities, i i Entities | | Relationship i Represent l
Describe l in r, Composite Entities rin r| Composite Entities l i
i- n r, ; in i r- iri ,ii -n | ilii n r|

r- -n n r l Music Store Customers Orders Music Store Items
| Many To Many | Relationship r il Order - ; Items Appear ri n
r i -i Item i ii Order - Appear li i ni r|

r- Entity | n rin| r, i r- ni l Specific Title l|
Specific Order Appear ri ri r| ; Concept i l- l ,ii -nii i ri r


54

www.BccFalna.com
DBMS-RDBMS in HinDi


; l - n| Order Instances r i n| r| Item Instances r| ri Order (Order
#1) Customer Number #0985 li r i ; Order - r| Item ( item
#09244) i Order li r|

Order (Order #2) Customer #0985 li r i ; Order - l i Items
i ~i li r, i Number #02944 #10101 r| i| Order - Item
Number #02944 ni l Appear ri r| ri r ii r| Item Number #10101 i|
Appear ri ri r|

n|i Order i l Order #3 r, r Customer Number #1212 Place li r i
;- i| i Items Item Number #10101 Item Number #00250 i Order li ni r|

; l - r- i n r l n| Customers n| Orders Place l r i n|i
Orders - i Items i Order li ni r| ;i -n r l l n|i Orders
i l i, ni Item Number #02944 | i Copies, Item Number #10101 | i
Copies Item Number #00250 | Copy i| i Copies Sell rin||

; Diagram | i lr-i r| r Composite Entity r, i l r Order i l|
Specific Item Connect ri r| r-i ; Example Diagram - i
Instances r, lr r- Line Items rn| Line Item Entities, Order Item |
| Relationship i Represent l Create l n r|


55

www.BccFalna.com
DBMS-RDBMS in HinDi
; Diagram - r- i n r l r Order - Item l Line Item
Instance Related r| n| i ni - Item r Order Appear ri
l l| Line Item Instance Related r|

; Diagram iii - Line Item Instance i l Order
Related r ii r| r| Line Item i l Item Related r| lii--
Order Line Items | One To Many | Relationship r, il Order
; Line Items Related r i Item r Order, l r Item Appeared r,
| One To Many | Relationship r il Item ii Line Items
Appear r|

; nr ; Diagram - r- i n r l Composite Entity | l-iln
Original Many To Many | Relationship i One To Many | Relationship -
Convert ri r| r| l r-i Database -lin i; Relationship Data r, ni
Data i Store l r- ; Composite Entity - r| Data l
Appropriate Attribute Create n r|

iri l Order l n Item | Quantity i Store l ; Composite
Entity - Quantity i- i Field i Attribute Create n r| ; ii r| r- ;
Composite Entity - ; in | ii| i l Flag Attribute Create
n r, i ; in | ii| l Order l n Items i Ship li i i r i
r| i l Ship li i i r, ni Shipping Date i Store l Shipping
Date Attribute i i| ;| Composite Entity - Field - Specify li i
ni r|

Chen ER Method - Composite Entity i ER Diagram - Draw l
l-ii Symbol i in li ini r, l Information Engineering Method -
Composite Entity i ER Diagram - Represent i i; n|i r| r|



Music Store Database i| Many To Many Relationships i Eliminate l
r- r Many To Many Relationship i Composite Entity ,ii i One To Many
Relationships - Convert i rini|


56

www.BccFalna.com
DBMS-RDBMS in HinDi
il r- r-i Music Store Database ls IE ER Diagram - i n r, -
n| Many To Many Relationships r, ;l ; n|i Many To Many Relationships
i Remove l r- n| Composite Entities i l-ii Create i rini

1 Order Lines
Order Lines Entity Item i Order Represent ni r| r Order
| ; Order Lines ri n| r i l nn Items Connect ri,
l Order Line i l Order Appear ri ni r| ;| nr
Order Line - i l Item Appear ri ni r l r| Item
ii Order Lines - Appear ri ni r i - Item l| Different
Order Connected rini r il r| Item l ii Orders
Place l i n r|

2 Performance
Performance Entity Represent ni r l Actor Film - Appear
rini r| r Performance i l Film l rin| r, l Film
- ii Performance ri n| r, il Film - ii Actor
ri n r| ;| nr Actor - Film - Performance Related
rini r, l Film - i l Performance Related rini
r|

3 Production
Production Entity Represent ni r l Producer Film i-
ni r| Producer ; Productions - Involved ri ni r l r
Production i l Producer Related rini r| Item ii
| Relationship Indicate ni r l r Film i ii Producers
Produce n r l - Production l| Item Related rini
r|

l Composite Entities i -n i Entities | | Relationships i Indicate
l Create li ini r, ;l Composite Entity i ii Child Entities
Related rii | rini r| i ;l rini r il r Child Entity i
Parent Entity Related rii Compulsory i Mandatory rini r| ii i ii
Modified IE Design l-ii rini


57

www.BccFalna.com
DBMS-RDBMS in HinDi



Relationships and Business Rules
Database Design ; n|i Science iiii Art i| r| l| Business
l l| Database i ii Design | nr Correct rini, Organization
Business Rules li rini r| nn Organizations nn
Business Rules iii i- n r, ;l Organization l Design li
ni Database i| i| | nr l| Organization Database | nr
Apply r| li i ni r|

iri l -ii l r- l| Retail Establishment l Database Create
i irn r, l rn i Stores r| ; Database - i - in Handle |
in|, r Employees i Schedule rini, i Retail Establishment lli
Stores i- n r|


58

www.BccFalna.com
DBMS-RDBMS in HinDi
; r l r- i Database Design , r- Employee Store | |
Relationship i Identify i rini| Employee Store | i| Relationship
rin|` One To One | i One To Many ||

il Retail Establishment i Chairman i| i| l| i| Employee i l| i|
Store i ni r| i | r| r l i Employee l Store l ln
li ini, r r-ii | Store ln rni| r Employee r-ii r| Store
l ln li ini r, ni Employee Store | One To Many | Relationship
Identify rin| r i l r Employee - Store iiiiii - n|n ni r,
ni Employee Store | Many To Many | Relationship Identify rini r|

; l-iln - -i-i r| rini r l ii Design r| r i ii nn l~ ;
l-iln - ii Design r| r, in Organization i- n| li
ni r, l r Organization Business i l nr Operate ni r|

i| ; in i; r| ni r l r- Database Design -i - lni ii
in r, l~ r- n n si Database Create r| n r, n r-ii
Database l| Business Environment | lli Relationships i Accurate n|
Reflect r| ni r|

Data Modeling and Data Flow
Data Model Design n - i ii Common Mistakes | in| r, i Data
Model Data Flows | Confusion | Mistake rin| r| Data Flow ; in i
Show ni r l l| Organization - Data i l i Handle li ini r,
Data i ri Store li ini r i Data ii i Processing | in| r|

l Data Medal Data | Internal ini i nii Data | | i| Relationships
i li ; in | ir l Represent i i- ni r, l Data i i
Handle ri r i Data ii l i | Processing i Apply li i ri
r|

Data Flows i i-ini Data Flow Diagrams(DFD) - Document li ini r|
iri l n l - r- Music Store Organization Top Level Data Flow
Diagram i i n r|


59

www.BccFalna.com
DBMS-RDBMS in HinDi


; l i Sequence ini i lin ri r l i Data i Handle r r|
; l Circles Processes i Represent r r, lr Data Apply li
ini r| l nr Data i Store li ini r, i Parallel Lines -
iii ni r| r-i ; iri - - Storage i Main Database i
Represent li ni r| ; l - ii n Arrows ; in i Indicate n r l
Data l| -ii l -ii | nr Flow i Pass l i r r|

Data Flow Diagrams i in i-ini Design l i r System | i li
Details Provide l li ini r| ls l Order | li i n
l - iii i i Modify Take Order | Process i Represent li ni
r|


60

www.BccFalna.com
DBMS-RDBMS in HinDi

; l - r- i n r l Order | li - i | in Involved r| r|
Customer | Information i | Order l i i Items | Information
i| ; l r Process i i Explore r- Data Flow | i li Deep
Details in n r, il n i li - iii ni r|

; l-iln - Diagrams l| System | ;n| Detailed Information n r, l
Application Designer Application i Design i Plan i ni r| Data
Flow Data Model ii i Separate i l r- s Guide Lines i in
n r| Guide Lines l-ii r

Data Flow Diagram Show ni r l Data i i Use i Handle
ri r, l Data Model i r| ni r|

z Data Flow Diagram Show ni r l Business Related Data i l
nr l -i-i (People Inquiry etc.) Collect li ni r, l Data
Model ; in | ii| r| ni r|

s Data Flow Diagram Data Perform ri i Operations i Show
ni r, i Data i - Transform n r, l Data
Model ; in i Show r| ni r|


61

www.BccFalna.com
DBMS-RDBMS in HinDi
Data Model Show ni r l l| Database lli Entities l
i i - Internally Related r, l Data Flow Diagram ; in |
i; ii| r| ni r|

r Data Model Attributes i Show ni r, i l| Data Entity i
Describe n r, l Data Flow Diagram l| Entity Attributes | i;
ii| r| ni r|



Data Model - l| Database - Store ri i Data l Entities, Attributes
Entity Relationships | ii| rin| r| l l| Entity Data i l|
Database - Store r| li i ri ri, ni r Entity Database i lr-i r| rini
r|

iri l riil Music Store i Data Flow Diagram Music Store
Employee i Show ni r, i Music Store lli i Data i Handle ni
r, l Employee -lin l| i Data i Database - Store r| li
i ri r| ;l Music Store Database ER Diagram - Employee i- i i;
Entity r| r|






62

www.BccFalna.com
DBMS-RDBMS in HinDi




63

www.BccFalna.com
DBMS-RDBMS in HinDi

tHe SCHeMA


64

www.BccFalna.com
DBMS-RDBMS in HinDi
DMBS The Schema
Completed Entity-Relationship Diagram l| Database Overall Logical Plan
i Represent ni r| Database Management System | iiii - ; Overall Plan
i Schema ri ini r | r| r n|i i Design rini r , l- l| Database i
Maintain i in l| Business System i in r|

Users i ; Schema iiiln Database Application i Use n r i
Users i ; Database Schema iii Application Develop n r, ii r|
; Design Logical Schema n r| lln rin r| Data Physically l
i Store rin r, ; in | ii| ; ii i r| r| rin| r, i ni ; Logical
Schema i i r| ; Logical Schema i Use i Users i|

Logical Schema | Layer | Data i Physical Storage rini r, l DBMS
Manage ni r| ; Physical Schema ri ini r| Physical Schema i DBMS r|
Handle ni r| i; rn r| i DBMS r- lii ni r l r- Physical
Schema i Control |

; n| i i ii r l Database Design i Use i,
ii i r| i | n r| rin| r l Data Physically l i Store ri ri
r| ; n| ii Database i Access i i| ri ini r il r- rn
r| ii| Logical Physical Schemas i Change n r|

l r- Database i n| n|i i n r, ri Logical Schema -,
i User - n|i Physical Schema -, ;l i s
Database i Three-Schema Architecture i| ri i ni r| System Programmers
in i l Physical Storage i Manage n r, i-n - Physical Schema
ii Deal n r| i r-i i- ln i| DBMS Softwares r, r- DBMS -
Store ri i Data File Structure i Control | i; lii i r| n
r|

Database Designers, Database Administrators s Application Programmers
Logical Schema i Use n r| End User Interactively i- n r, i| r
r Database System i Application -i- Use n r l Application
Programmers Database i User View iii in r i End User l
Database Applications Create n r|

r- i ER Diagram Complete n r, i Create ri i
Conceptual Logical Schema i Use l i i DBMS iii Formal Data

65

www.BccFalna.com
DBMS-RDBMS in HinDi
Model - Translate i rini r| i ln i| DBMS Softwares Available r, i|
Relational Data Model iiiln r| Relational Database i Database rini r,
li Logical Structure Relations Collections ii s r| rini r|

Relational Database Model i Edgar (E. F.) Codd Develop li ii| 1960
i - Dr. Codd Existing Data Models i- r i| i iii
ri ii l ln i| Data Models - ln i, i| i| l-
iln n|i Data i Model n i| l nlinn i, ;l ri lli
i Relations i Set Theory iii Mathematical Form - Develop i
i li i Concept i i Extend ri Relational Database Model
Develop li i 1970 - ini i- ii|

Mathematical Set Theory - Rows (Tuple) Columns (Attributes) | Table
i Relation - Define li ini r| Relation i ii - r- Table i|
r n r| Definition ; in i Specify ni r l l| Table r
Column - i Store li ini, l - Actual Data i Specify r| li ini
r| r- ; Table - Data Rows Include n r, n r- Relation i
Instance in rini r| iri l r- l| Student Relation i l-ii
Represent n r



r| - Relation Flat File i l| Spreadsheet Rectangular Portion
| nr r| lii; ni r| l r- ; Table i Set Theory iii
Relation - in r, n ; Relation s rn r| Specific Characteristics r-
lii; n r| Set Theory iii i ; Relation i r Column DBMS -
Store l i i Constraints i Represent ni r|

r- Set Theory iii l| Relation Column | Characteristics i
in r, n r- Column | l- Characteristics rin| r

1 Table - r Column i Unique i- rini r|
l| r| Relation Schema - i i i li Tables - r| i-
Columns ri n r, l l| r| Table - r| i- i Column r|
ri n r|

66

www.BccFalna.com
DBMS-RDBMS in HinDi

-i i- i i; Column ii Tables - Appear rini r i -i
i- Columns i Hold i Tables -i Data Manipulation
Operation l Use l in r, n r- -i i- Columns i
Particular Table Access l Tables i- i n
- Columns i- r Use i ni r i Columns i- i Table
i- Dot i Period ,ii ii ni r|

Customers.CustID
Students.StudID

2 Column r-ii l r| Domain -i i Store ni r|
l| Table - l Column i l Type i -i Store l Define
li ini r, r Column | -i i Store ni r|

iri l l| Student Table - Student i i- Store l l
Column i Define li ni r, r Column i- Store l r|
Use li i ni r, l i Column Roll Number Store l
Define li ni r, - Roll Number r| Store li i ni r| i|
r Column - l| lln Domain -i i r| Store li i ni r|

lii-- Relations i Column Homogeneous ri ini r| ii r| Table
i r Column l| i l| Domain Constraint Associated rini r| r-i
DBMS iii Domain Constraint Data Type | nr r| Simple rini r,
l Integers, Characters, Date il|

; ii r-ii DBMS ; in | i| lii ni r l r- r-i| n
iii i Domain i| Create n r i | Table l|
Column ii Attach n r|

Columns | nr r| Rows | i| l| Relation - | s Special Properties i
Characteristics rin| r| Characteristics l-ii r

1 Row lli Column - r- l i l r| -i i Store n
r| i| l| Row i r Column Single-Valued rini r| i

2 Relation - r Record Unique rini r| i| Relation - Row
i ii Duplication r| ri ni| l| Relation r Record i Unique

67

www.BccFalna.com
DBMS-RDBMS in HinDi
i l DBMS - r| r ROW ii Unique Constraint i Enforce
r| ni r , l~ ; lii i r- Primary Key ,ii in n r|

3 Primary Key l| Table l| Column i Columns i Combination rini
r, l Table i Relation l| Record i Row i Uniquely Identify
l Define li ini r| r| l| Relation - i; Unique
Primary Key i l| lli- Column i Columns Combination ii
Set li ini r, r| lln ri ini r, l Table i r Record
i Row Unique rini|

Tables
Relational Database i nr Tables ii li ni r, lr Base Table
Relation rn r| ii r| Database - Store rin r| r| Tables rin r, i r-i
Database i Conceptual Logical Schema in r|

; ii Tables l Relational Operations i Perform li ini r,
lii-- s Additional Tables Produce rin r| Tables l RAM i Main
Memory - Exist ri i i- i n r i l Destroy ri in r, ;l ;r
Virtual Tables ri ini r| Virtual Tables Legal Relation r| rin r, il ;-
Primary Keys i Define r| li i ni r| l l Virtual Tables Database -
Store r| rin r, ;l Database Design - l| nr | i; --i i r| n
r|

Virtual Tables DBMS i ; n|i ii rin r| r ni Tables DBMS
i Application | Processing ii Generate ri i Intermediate Query Result
i Database - Store i ; Virtual Tables - Store Main Memory -
Store | lii n r, l Query | Performance s| ri in| r, il
Main Memory | Speed r-ii r| Disk | Speed ii rin| r|

DBMS i i ii rini r l i Tables Relational Data Model Rules i
Violate n r, DBMS r Virtual Tables - Main Memory - Store
Manage ni r , l Actual Database - Stored Data | ii i l| i i
i; ini r| rni|

n|i i ln- ii rini r l DBMS ,ii Virtual Tables in ii
ii Disk Write/Read/Delete Operations i Perform r| i ni r, l
Disk Data Fragments i ; -i - Store r| rini r| ; - | i| n rin|

68

www.BccFalna.com
DBMS-RDBMS in HinDi
r i Database i Performance i| si ri ini r| Virtual Tables i i-ini
Temporary Tables i Temporary Base Tables i| ri ini r|

l| Relation i Represent n - - Data i Store r| li ini r| ;
l-iln - l| Relation i Represent i Common n|i l-ii rini r

RelationName ( PrimaryKeyColumn, NonPrimaryKeyColumn1, ... , NonPrimaryKeyColumnN)

iri l l r- l| Customer Relation i Represent i ir, ni l-ii
n r

Customers (CustID, FName, LName, Phone)

;| nr l r- l| Student Relation i Represent i ir, ni i|
l-ii Represent n r

Students (SrNo, Name, FName, Add, City, State, DOB, DOJ)

ii Expressions l| Relation Structure i Represent Ideal
Expressions r, l- i; Data r| r| l l| Relation - Data Included ri, ni
i Relation r Expression Relation i Instance rini r|

Primary Keys
il r- r i| nii l Primary Key l| Table l - Record i Row i
Uniquely Identify i -i ini r| l| Relation - Primary Key | r| il-i
rin| r, i l| Entity Identifier | rin| r| Primary Key i Define r- n
n r l r- l si- si- Data i Database - Store li r, r- si-
si- Data - i i| l in n|

r- Relational Database | in n r, n l| Database l| Data si-
si- - i i| in l r- l n| ini | ii| ri| ilr
Table i- |, l- Data Stored r, Column i- |, l r- Data i
in i irn r i Row Primary Key |, l Column Data i r-
in i irn r|

l r Row l Primary Key Unique ri, ni r- ; in l Sure ri n r l
r- Exact Row Data i Retrieve n| l l r Row Unique i ri, ni

69

www.BccFalna.com
DBMS-RDBMS in HinDi
r- ii Rows i Retrieve n, ri n i -l ri ini, l r-ii
Required Data l Row - r|

l Primary Key r-ii l| Record i Row i Uniquely Identify l
Define li ini r, ;l l| i| Primary Key Column i Empty r| sii i
ni i l| Primary Key Field - NULL Store r| li i ni r| Null
Special Database -i rini r, li -n Unknown rini r|

l r-i Relation - r| Record ri i r- Primary Key Filed i Null ,
ni i; Problem Generate r| rin| r, l r| r- Relation - i Record
Enter n, r- Primary Key Fields Uniqueness | Property i ii n| ;l r-
i| i| l| Table Primary Key Field i Null Assign r| n r|

; Constraint i Entity Integrity ri ini r i Database - ln| i i| Data
Enter i Modify li ini r, DBMS Primary Key i Enforce Database
Apply ni r, l r Record r-ii Unique i rni r|

r- l| Primary Key Field - Duplicate Data Store r| n r| l r- i
| ilii n r, ni i| DBMS r- i r| ni r, il r Primary Key
Constraint i Follow ni r, l nrn Column - i| i| Duplicate Values
Store r| ri n| r|

l| Relation l ln Primary Key Select i Challenging i- rini
r| s Entities - Natural Primary Keys rin| r, l Purchase Order i Invoice
i Identify l r-ii Meaningless Unique Number rini r , l i;
Particular Purchase Order i Invoice Identify rini r| ; r| Natural Primary Key
ri ini r i r| Ideal Primary Key i iri rini r|

r- l| i| Entity | Attribute i l| Relation - Primary Key - Identify
n r, l| l-i i i liini ri

Primary Key | Value i| i| Change r| rin| r | (Uniqueness)
Primary Key Column i Null r| ii i ni r | (Not Null)

r- l| Entity l| Field i Primary Key Set r| n r, li
Repetition -i ri| iri l l r- l| Customer Relations - Customer
Name Filed i Primary Key Set , ni DBMS - Enter l i- r|

70

www.BccFalna.com
DBMS-RDBMS in HinDi
ln i Database - Store ri ni| il DBMS Primary Key Field - r| Value
i Repetition r| ni r, l r| i- i Customer ri n r|

;| nr r- Attribute i i| Primary Key Set r| n r, i ii
Change rini r| ; l-iln - l| r| Entity r| Instance i r| Relation
- ii i Enter li i ni r, l Database | Consistency
Accuracy iiln rin| r| ; -i - r- r i| i r|

Appropriate Primary Key i Choose l r- r-ii l| Entity
Meaningful Attributes i Avoid i ilr| l| Meaningful Information i Code
- Specify l| Relation - Primary Key - Use r| i
ilr, il r- Music Store Database - li ii|

; nr Code i Decode - --i i ri n| r i ; nr Codes i
i - i| nlni | -iii rn| r| ii r| Meaningful Information Change ri |
i| -iii rn| r, il Music Store Database i - nii ni r| l|
Primary Key in i nii ii Primary Key i n|i ni rini r l

Primary Key - Meaningful Data i Avoid i ilr|

riil n iii s| nr ili i l r- nni r, l
l| Meaningful Data i Primary Key ii i ni r, ni r- l| Meaningful
Data i i| Primary Key - Specify n r|

; i l-ilni i| | r| rin| r, ri l| lii i i Meaningful Data i r|
Primary Key ii | rini r| iri l l r- l| i-i i Time i Date
ii Specify i ri, ni r- Date i Time Meaningful Data i Primary Key
- Use i | ri ini|

Composite Keys
; Tables rin r, l- i; i| i Single Column r| rini r, l- Values i
Duplication i ri| iri l l r- Order Lines Table i i, ni l
Order - ii Items Appear ri n r, ;l Order Numbers i| ii
i Repeat rini r, ;| nr r| Item ii Order Appear ri ni r,
;l Item Number i| ii i Repeat rini r, il r- l- Table - i
n r| ;l ; Table i i; i| Single Column Primary Key | nr Use
r| li i ni|

71

www.BccFalna.com
DBMS-RDBMS in HinDi


OrderID ItemID Quantity
10999 1122 1
10999 2211 3
10999 1002 1
10990 1122 2
10990 2211 4
10993 1122 1
10993 1100 2
10995 1100 1

l i| l r- Order Number Item Number i Combined Form - Use , ni
l| Row i Record i Uniquely Identify n r| l| Table - i i i
ii Columns i Combined Primary Key - Use l| Record i
Row i Uniquely Identify n r, ni ; Columns Group i Composite Key
ri ini r|

riil l r- ir ni ; Table n|i r| Columns i Combined Form - Use
l| Record i Row i Uniquely Identify n r, l ; Table - l|
Record i Uniquely Identify l Order Number Item Number i
Combination r| in r, ;l ; Composite Key - Quantity Column i Add
| n r| r|

r- Composite Key i in l| Record i Uniquely Identify i irn
r, n r- ni l s ini i i - ii ilr, l Database Design -
l| nr | i; ii| i i ri| in l-ii r

Composite Primary Key - ri n -i ri, - - Columns i in
i ilr| i| l i Columns Group Table r Record i
Uniquely Identify li i ni r , ni n| Columns i l-i Primary Key
r| ii ilr|

z ri n -i ri, Composite Primary Keys i Meaningless ii ilr|

r- Relations i| Create n r, l i| Columns i l-i Key i
li ni ri| iri l r- Library Card Catalog i n r| l| Library -
ln| i| Books rin| r, i| Books i Unique ISBN (International Standard
Book Number) rini r|

72

www.BccFalna.com
DBMS-RDBMS in HinDi

l| Library Catalog - i| ISBN Number | Book ii Subject Heading i
li i Associate li ni rini r i r Book ii Subject Heading i
li i Associate li ni rini r| ; nr Book Subject Heading
| Many To Many | Relationship Create ri in| r| ; Relationship i r-
l-ii Represent n r

SubjectCatalog ( ISBN, SubjectHeading)

; Relationship i Create l r- r Subject Heading i Book
Identifier ii Pair - Specify i rini r| ; l-iln - ; Table
ii Columns Primary Key lr- in r| r- i n r l ; Table i|
Fields i Composite Primary Key - Use li ni r| ; nr |
Relationship Database Design - i; Problem r| rin| r| i-n - i|
l| Database - i; Composite Entity rini r , l- i; Relationship Data r|
rini, n ; i | Relationships i Define Design -lin l| i |
i; --i i r| rin| r| ; i Composite Entity i i-ini Many To
Many | Relationship i Represent l ii ini r|

Representing Data Relationships
ls ; irii - r- lli i Primary Key Identifiers i Use li r| ;
Keys iii r| Relational Database lli Entities | | Relationships i
Represent ni r| ; Concept i Clear l l- n| Tables i li,
l- Data i Fill li ni r

Items Table
ItemID Title DistID Price
2001 C in Hindi 200 200.0
2002 C++ in Hindi 200 225.0
2003 Java in Hindi 300 300.0
2004 DBMS in Hindi 400 150.0


Orders Table
OrderID CustID OrderDate
600000 00001 12/02/2006
600001 01000 15/06/2007
600002 00100 20/12/2008


73

www.BccFalna.com
DBMS-RDBMS in HinDi
Orders Lines Table
OrderID ItemID Quantity Shipped?
600000 2001 1 Y
600000 2002 1 Y
600001 2002 2 Y
600002 2002 1 N
600002 2003 2 N
600002 2001 1 N

ri Describe | n; i| Tables Music Store Database ER Diagram -i
r| r| ri Orders Table (Orders Entity) r Unique Instance i OrderID i-
Primary Key ,ii Identify li ni r, i l Meaningless Data r| Items
Table (Items Entity) - r Item i Unique Item Number ,ii Identify li ini
r, l ItemID i- li r i ri i| Meaningless Data r| n|| Table Order
Lines (Order Lines Entity) r, i Music Store i nini r l ii Item l
Order i lr-i r|

il r- Composite Entity i - nii, Composite Entity r i ;
Table i Composite Primary Key | n rin| r , il Multiple Orders
Multiple Items Appear ri n r|

; Composite Primary Key i Primary Keys | ni - li -r- r, lr
l| Table r Instance i Row i Record i Uniquely Identify l
Define li ini r| ; Table - Composite Key r Row i Uniquely Identify
ii r| Order Lines, Orders Items | | Relationship i i|
Represent ni r|

Order Lines Relation - ItemID Column | nr i Primary Key r, l nr i
Item Table r| Primary Key i Tables | One To Many | Relationship
i Represent ni r|

;| nr Orders Order Lines | i| One To Many | Relationship r,
il Order Lines Table i OrderID | nr i Primary Key r, l nr i
Orders Table - r|

l| Table - i r| Primary Key rini r, i l| | Table - rini r, ni ;
i Key i Foreign Key ri ini r| l| Relational Database - l|
Foreign Key i l| Primary Key ii Connect i Match rii, Relationship
i Represent ni r| l| Relational Database - Columns i Keys | Matching

74

www.BccFalna.com
DBMS-RDBMS in HinDi
ii i i; Structure r| rini r, l Relationship i Represent li i
|

i| l| Relational Database - Columns i Keys | Matching r| lli
Entities | | i| Relationship i Represent li ini r| l| Relational
Database - lli Tables | | Relationship Logical -n r| rin| r, ; i
| Relationship i Physical -n i; l-n- r| rini r|

Foreign Keys l| Composite Primary Key i lr-i ri n r i Table
Primary Key i lr-i r| i| ri n r| i| -ii l Music Store Customers
Orders | l- Relation r

Customers ( CustID, FName, LName, Telephone)
Orders ( OrderID, CustID, OrderDate)

; Relationship - Orders Table - i CustID Column r, r Foreign Key r , l
Customer Table Primary Key CustID Match li ni r| ri Customers
Orders | One To Many | Relationship Represent ri r| r| l i| Orders
Table i CustID Column Orders Table Primary Key i lr-i r| r, l~
Non-Key Attribute r, ;l Foreign Key r|

n|| Foreign Keys - n n l| -i i Store r| li i ni r,
n l l| Composite Primary Key i lr-i r| rin r| ;r Null Assign li i
ni r|

l r-i Music Store Database - l r- CustID Foreign Key i Null Assign n
r, ni n-i| --i i ri n| r, il l Orders Table - CustID Foreign Key
i Null Assign li ini r, ni ni ni i i; n|i r| ni r, l Order
i l Customer Place li r|

Primary Keys Foreign Keys | Matching iii r| Relational DBMS
lli i | Relationships i Represent ni r| iri l -ii l Music
Store i i; Employee ii irni r l Order Number #600000 l Title
i Order li ni r|

; l-iln - DBMS Line Items Table - r Rows i Identify ni r,
l- Order Number #600000 Stored r| l DBMS Identified Rows - Item
Numbers i Select ni r i r Items Table Item Numbers Match ni

75

www.BccFalna.com
DBMS-RDBMS in HinDi
r| l Row - ii Item Numbers Match rin r, DBMS Row Associated
Title i Retrieve ni r|

Referential Integrity
ls Paragraph - Data Access ri i i n|i nii ni r, r n|i n n
s n| i- ni r , n l| iii i; i Record Orders Table - r|
rini r, l- OrderID Filed - Null ri| il l Order Table - OrderID Field -
Null Stored ri, ni Row Match ri ii i; Record Order Lines Table - in
r| rini|

rn r| ilsn l-iln rin| r, il ; l-iln - Order l n Items i Ship
r| li i ni r, il ; l-iln - i i; n|i r| rini r, l ni nii
i , l Order i l Customer Place li r|

;l ; i | l-ilni l Relational Data Model Referential
Integrity i- Constraint i Enforce ni r, i n ni r l r Non-Null
Foreign Key Value l| Existing Primary Key Value Match ri| l|
Relational Database - Use l i i i| Constraint | ni - ii
-r-i Constraint rini r, il Database lli Entities | Cross-
Reference | l|ni i Constancy i lln i Ensure ni r|

Referential Integrity Constraints Database - Stored rin r i ;r DBMS ,ii
Enforce li ini r| Constraints | nr r|, User i| Database - Stored
l| Data i Modify | ilii ni r i Database - i Data Enter ni r,
DBMS ; Constraint i Check ni r i ; in i Verification ni r l
Data -lin i| Entities i - | nr Compatible r| i| r Foreign Key
Primary Key Matched r|

l ; Input l i i i Modify l i i Data ,ii ; Constraint i
Violet li ini r, ni DBMS Data Modification i Insertion i Allow r| ni
i Database - l-in l| i| Entity l| i| Data i l| i| i Change
r| ni r|

r-ii | r| rini r l l| Table | Foreign Key r-ii l| | Table
Primary Key r| Refer ri, l~ Foreign Key i Primary Key
Reference | r| n rin| r, ;l r- Foreign Key ii | Table |
Primary Key i Reference i| Set n r, l- r Foreign Key Stored r|
iri l l- Employee Relation i li

76

www.BccFalna.com
DBMS-RDBMS in HinDi

Employee ( EmpID, FName, LName, Dept, MngrID)

l Manager i| Employee r| rini r, ;l riil ; Relation - MngrID i
EmpID n i- li ni r , l l i| i-n - MngrID Foreign Key r, i
l | r| Table Primary Key i Refer ri r| ;l ln| i i| User
MngrID Input ni r, DBMS r i ; in i Ensure ni r l r Manager
Employee | nr Table - r r| Exist r|

Views
in i l l| Database Schema i Develop l l--i rin r, i
in i i-i Users l Application Programs Develop n r, i-ini
Database Schema Database | Base Tables ii Directly i- n r|

l i End Users rin r, r Application Programs i Database Schema i -
| ii| r| rin| r, ;l i-ini ;r Database | Base Tables i Directly
Use ii ini r|

l End User i i| i| Database Schema Application Program i - |
ii| r| rin| r, ;l l Database | Base Tables ii Directly i-
n r, ni ri ni r l Database | Tables - Stored Data i nn|
Corrupt | ;l Data | ii l End Users i Database | Base
Tables ii Directly i- i lii Database Developer ,ii r| rini r|

;l Relational Data Model i n|i Provide ni r, l- r User i
Database - i - i Window l-ni r i r End User | Window -
i i- ni r| Window Database Design | i| Details i User l Hide
ni r, l End User i| i| Database | Base Tables i Direct Access
r| ini r i Database i Data End User | nn| Damage ri r-ii
i rni r|

View i| nr i Table r| rini r, l Data ii Database - Store r|
rini r| l~ i- ii Data Dictionary - Store rini r| ;- r-ii i;
Database Query rin| r, l iii i; View Database i Data Retrieve
ni r| View - ii Tables, Rows Columns Data ri n r|


77

www.BccFalna.com
DBMS-RDBMS in HinDi
riil View i l| i| Database Query iii Create li i ni r,
l ; Views i Data Display l r| Create li ini r| l| i|
Database Data i Modify l Views i Create r| li ini r|

Views i ; n| Store i i ii r l i| User l| Data
Manipulation Language (SQL Statement) - View i i- Include ni r, n DBMS
View Name Associated Query i Execute ni r i View Table i l
Recreate ni r| ;i -n r l View - r-ii Current Data r| rini r|

View Table Main Memory - ni| n i rni r , n i; Data
Manipulation Language (SQL Statement) Execute rini r| r| User i SQL
Statement Use | Query Create ni r, ls| Query | View Table Main
Memory Remove ri in| r i Generate ri ii i Result View - Stored
ls| Query Result i Replace ni r | ;l View Table r-ii
Virtual Table rin| r|

s DBMS lii n r l View Table Contents i Base Table | nr Store
li i ni r| l l| View Table i Base Table i i i; lii Views
i ; n| Store i i ii r l i| User l| Data
Manipulation Language (SQL Statement) - View i i- Include ni r, n DBMS
View Name Associated Query i Execute ni r i View Table i l
Recreate ni r| ;i -n r l View - r-ii Current Data r| rini r|

il- r| rini r, il DBMS Softwares - i| l| View Table Create
| n; Base Table i l-iln - Automatically Update | lii r| rin| r,
Table - Change li ini r, l iii View Table i ii ni ii|

i| l l| Table X View Table Y i Create li ini r i ; View
Table i Base Table - Database - Store li ini r i i
Table X - i; ln li ini r , ni ; View Table Y Create ri i| Base
Table Y - i; Automatic Updation r| rini r|

;l r| r- Base Table X - i; ln n r, Base Table Y Data r-i
Database l Out Of Date ri in r, li r-i Database l i; Meaning
r| r ini r|

i l-in - i ni r l Data i Store l Base Table
Create li r| ini r, ni Views i Use | i n r| ni Views i Use
n| s ii r

78

www.BccFalna.com
DBMS-RDBMS in HinDi

il r nii ni l Views i in Data | Security i
Feature in rini r , il Views i in End User i| i| Database
Schema ii l| i | i; li r| ni r|

z Views ini l Database i Design -ni i ni r, i l|
Database Schema iii Application Programs Develop n r|

s l Views | Query rin| r, li i- rini r , ;l ;i in
| Complex Queries i Store l li i ni r, lr ii
Use i rini r| l Complex Queries i Use l r-
View i- i r| Use i rini r|

Relational Database Structural Elements | nr r| Views i i| l| i|
- Create Destroy li i ni r| l Views - l| i i Stored Data
r| rini r, l~ l| | Query i Specification rini r , l iii Virtual
Table Create rin| r, ;l Views i Add i Delete ;i Database
| Base Tables Tables - Stored Data i; ii r| ni r|

l| View i Remove ni| --i i ri n| r, View i
l| Application Program - Use li ni ri i Program i ; i Modify i
li ni ri l r View li i| l| View i Base Table iii
-| n| i- |

Data Dictionary
r DBMS - Data Dictionary i Catalog rini r| Relational Database i
Structure ;| Catalog i Data Dictionary - Store rini r| Data Dictionary Relations
-r | rin| r i r-i Database i| Elements ; Data Dictionary
Relation - | nr Store rin r, l nr Entity Relation - lli Data
Store rin r| i| Data Dictionary Relation - Database i| Relations Data |
nr Store rin r|

r- Data Dictionary Relation | i| r| Tools i in Query n r, l
Tools i in l| i-i Relation | Query n r| i; i| User Data
Dictionary Tables i Directly Modify r| ni r|


79

www.BccFalna.com
DBMS-RDBMS in HinDi
l i| l Data Manipulation Language Commands (SQL Commands) i in r-
Database Elements i Create Destroy l n r, r| Commands
i in r- Data Dictionary Tables Rows i Modify l i| n r|
r- Data Dictionary - l- i | Information in rin| r

1 r Table i Create i Columns | Definitions | Information
2 Relations Apply l n Integrity Constraints | Information
3 Security Information i nin| r l ii User l Table l i
Operations i Perform ni r|
Database Structure Elements l View User Defined Domains |
Information

User i| l| i| n| Data i Access | ilii ni r , Relational
DBMS r Data Dictionary - n l ini r l User l
Database Elements | Request | r, i i-n - Elements Database Schema
i lr-i r ii r|| ii r| DBMS i| Verify ni r l i User i ii|
i in i lii r , l l Request li r|

User Database l| Data i Modify i irni r , n i| DBMS Data
Dictionary - ini r i Integrity Constraints i Check ni r, lr
Relation Place li ni ri ni r| l DBMS i Data ii Constraint
Match ri ini r, i DBMS i nni r l User Legal Operation ri r, ni
DBMS User | Request i i ni r i Database l| Relation Data
i Modify | Permission ni r|

l l User Data ii Apply l n Constraint | n i i r| ni r,
ni DBMS User i Error Message ni r i Database l| i| Relation
l| i| Data - i; Change r| ni r|

il Relational Database - i| i Data Accesses Data Dictionary
Through rin r, ;l Relational DBMS i Data Dictionary Driven i| ri ini
r| i| Relations i Data Dictionary i Create n r, s r n DBMS
li rin r| ;l lli i DBMS lli n|i ; Data Dictionary i
Manage n r|



80

www.BccFalna.com
DBMS-RDBMS in HinDi

tHe noRMAlizAtion


81

www.BccFalna.com
DBMS-RDBMS in HinDi
DBMS The Normalization
lli i Entities Attributes i ; n|i l| Relation -
Represent li i ni r| ; i - r- Normalization Process i -nn|
r- ; Process iii lli Relations Create n r, n ii
Database Design i ri i| lli i | --i Avoid ri in| r|

Database Normalization i n| ln r| r n| - ER Diagram
iii Normalization li ini r| ; n| - l ER Diagram i Correctly Draw
li ni r, ni r- s Simple Rules i Follow n r ER Diagram i
Relations - Translate n r, i iin Relational Design Problems i Avoid
ri ini r|

; Normalization Process | --i r l ; n| iii i Database
Design ni r , r Design r| r i r|, ; in i lln i i; n|i r|
rini r| n| - r- lli Relations Create l Theoretical Concept i
Use n r| n|i r n| | ni - iii li l- r , l ; ii
Design Better Design rini r|

Practically ; ii n|i Combination i Use , ii ii| si
Design Create n r| r r- ER Diagram Create n r i ;i in
Relations Create n r| i n| Theoretical Rules i
Relations Apply Design i Check n r|

Translating an ER Diagram into Relations
i ER Diagram, l i| Many To Many Relationships i Composite
Entities i in One To Many Relationships - Convert li ni ri, ni
Directly Database Relations - Translate n r| i l r- l- Steps
i Follow rin r

r Entity l Table Create n r|
z r r Entity i l| i ii Relationships One End |
n ri i Many End | n i ri, Entity | Table -
Single-Column Primary Key i Define i rini r|
s r r Entity i l| i li Relationship Many End | n
ri, Entity | Table - Parent Table, i l One End | n rini
r, | Primary Key i | Table - Foreign Key | nr Use i ilr|

82

www.BccFalna.com
DBMS-RDBMS in HinDi
l Entity i l| i ii Relationships Many End |
n ri i - i; Natural Primary Key ri, l Invoice Number i
Order Number, ni ; Single-Column Primary Key i Use i ilr| l
l i i ri, ni ; Table | Parent Table Primary Key i l|
Column i Columns Group ii Composite Primary Key - Use
i ilr|

; Guidelines i Follow r- Music Store Database Design i l-ii
Theoretically Represent n r

Customer (CustID, FName, LName, Street, City, State, Pincode, Telephone, CreditCardNo,
CardExpiryDate)

Item (ItemID, Title, DistID, RetailPrice, ReleaseDate, Genre)

Order (OrderID, CustID, OrderDate, OrderFilled)

OrderLines (OrderID, ItemID, Quantity, DiscountApplied, SellingPrice, LineCost, Shipped)

Distributor (DistID, Name, Street, City, State, Pincode, Telephone, ContactPerson,
ContactPersonExt)

Actor (ActorID, Name)

Performance (ActorID, ItemID, Role)

Producer (ProducerID, Studio)

Production (ProductionID, ItemID)

; Relations i iii i Modify li ni r, l ; Modifications i ER Diagram
i Database i- n| i; n r| i r|

Normal Forms
Theoretical Rules li l| i| Relational Database Design Compatible rii
| rini r, Normal Forms rin r| r Normal Forms s Strict Rules i -r
rini r| Theoretically Database ln Higher Form - rini r, Relations | i
Design ni r| si rini r|

83

www.BccFalna.com
DBMS-RDBMS in HinDi



il r- ls l - i -n n r, l| i| Design | 6 Normal Forms ri
n| r| l ; in i iini r l l i; Design l| Higher Form - r ni r
Design | i| Inner Normal Form - rini r| i| l i; Design Inner
Normal Form - r| ri ni Higher Normal Form - Define r| li i ni r|

iin Cases - l r- r-i Relations i Tables Third Normal Form (3NF) n i|
Normalize n r, ni r- ii Database Design iin Problems i Solve
rin r| i| l| Database | i| Tables i 3
rd
Normal Form n
Normalize Database | Design -lin iin iili -in ri
in| r|

Boyce-Codd (BCNF) 4
th
Normal Form i lii Situations i Handle l
i|ii r| Database Apply li ini r| riil ; ii Normalization
Processes i i| Conceptually -ni rini r i n ;r Practice -
i| li i ni r|

Fifth Normal Form l- rn r| Complex rin r i ;r Practically Use i
i| -l rini r| i; Relation 5
th
Normal Form - r i r|, ; in i Verify
i i| -l rini r| iin Database Designers 5
th
Normal Form n l| i|
Relation i Normalize r| n r| l r nni r l i Relation 3
rd
Normal
Form i n iii 4
th
Normal Form - r, ni -i n r l i Design
Generally Problem Free r|


84

www.BccFalna.com
DBMS-RDBMS in HinDi
l - ii n 6 Normal Forms ii i Normal Form rini r, l
Domain/Key Normal Form ri ini r| | nr Theoretical Concept rini
r i i - - ; Normal Form i l| i| Practical Design - Use r| li
ini r|

First Normal Form
l l| Table i Data 2-Dimensional Table - r i - l| i|
Data Group i Repetition r| ri ri r, ni Table i 1
st
Normal Form - -ii
n r|

1
st
Normal Form i -n i - iii r l r- Data Repeating Group |
ln i -n| l| Relation i i Attribute, l- ii Data Store ri
n ri, i Repeating Group Data ri ini r| r- l| Repeating Group
Data i ER Diagram - Represent i irn r, n r- Repeating Group Data
i Multi-Valued Attribute - Represent n r|

iri l -ii l r- l| Employee Relation ii li r r i
r- l| Employee i i- Birth Date i Employee Relation - Data
- Store i r|

l Employee ii i| ri n r, ;l r| Employee i
Represent i r| Row Child Name Filed Child Birth Date Field -
ii -ii i Store | n n| r, l l| i| Relational
Database - l| Row Field - r| -i i Store li i ni
r|

; l-iln - Child i i- Birth Date Employee Record - ii i
Repeat ri n r, ;l ; ii Data i Employee Relation l Repeating
Group of Data ri i ni r| ; in i r- ii| ,ii l-ii ii n r

EmpID FName LName DOB ChildName ChildBirthDate
001 Rahul Sharma 10/12/1982 Rohit Sharma 15/12/2006
Mohit Sharma 20/10/2008

; Table - r- i n r l Rahul i- Employee i Rohit Mohit
r, l r- ii i Data i Employee Relation - Store r| n r,
il l r- i | ilii n r, ni r- r| Attribute Column -

85

www.BccFalna.com
DBMS-RDBMS in HinDi
ii i-i Birthdates i Store i rini, i l Relational Database - -i
r| r|

l| Relational Database - Repeating Groups i Allow i i si ii
i| r| ; ii i -n l r- iri in r, l- Table - l-ii
s Employees i i- Stored r



; Table - r- i n r l r| Single Row Children Name Field
Children Birthdates Field ii r| Fields - ii -i Stored r| -ii i
| Problems Create n| r

; Table - i i; n|i r| r, l ii i l l Child i
Birth Date i r| ; -ii i Use r- r-ii Children i-
Birth Date ii i -i - - Store i | rini r| l| Table -
Children Name Field - l i i- r lii ni r, r- | i
Birth Date r lii rini r i i i; lln n|i r| rini r, l
Verify ri l r- l i i- r lii r, r- | | Date Of
Birth i| r r| li r r i r||

z r- l| Table - Multi-Valued Data Store n r, n DBMS l| Data
i Search l Multi-Valued Column i Extract ni r i
Column Sequential Processing i Apply Required Data i in
ni r, i l i|-| Searching Process rin| r|

; ii --ii i r| Solution r l l| i| Single Column - Multiple Values
i Store i li i i| Repeating Group of Data i l| i| Relation - Avoid
li i| Repeating Groups | --i i Relation i First Normal Form -
i i n| r| ri n|i r| n|i r l i n|i nn n|i r|

r- r nn n| i in nil r- -n l r- Database - i r|
i ilr| ; nn n| i r- l- ii| ,ii -n n r, l- l|

86

www.BccFalna.com
DBMS-RDBMS in HinDi
Repeating Group Data | lli Values i Handle l Relation -
Columns | i i Increase li ini r



; Example - l| Employee n| Childs i- Birth Dates i Store li i
ni r| Table First Normal Form Criteria - r| ri r| riil ;
Table - Data Repeating Groups r| r i r Child | Birth Date i n
Store li ni r| l i| ; Design - ; Problems r, i l-ii r

; Relation - r- l n| Child r| Name Birth Date i Store
n r| ;l l r- Jane Smith ii i i- Date Of Birth Store
i ir, ni ; Relation - Child l i; nr r| r| l r- ii
i i| Data ;| Relation - Store i ir, ni i ni r- i Field
Pair Create i rini i l i Row - ; Data i Store i rini|

l r- ii Data i i Row - Store n r, ni l i
Father EmpID Relate l r- EmpID ii - -
Child i- Column i i| l-ii rini| i| r- Composite Key i
in i rini|

z l r- ; n| i Use n r, ni l Employees i i r| Child r,
Row - n| Child Data | nr Empty rn|, l Employee
Record ,ii Reserved Space Waste rini|

s ; n| i Use l| Particular Child | Searching i i|
-l ri ini r| ; Design - l DBMS si i, l i ;
Relation - Lee i- i i; Child r i r| ` ni DBMS i Query
Construct i ni r, l- n|i Childs i- Included rin r, il
DBMS i i i; n|i r| rini r, l r Particular Lee r|
Column i Identify |

Repeating Group i Handle i r| n|i r l Repeating Group Data
i Store l i Entity i| Table Create li i, i Repeating

87

www.BccFalna.com
DBMS-RDBMS in HinDi
Group Multiple Records i Instances i Handle | l r- r-i ;
iri i - i, ni r- Children i- | i Table i Create i rini,
l- l-ii Data Store l i n r

Employees
EmpID FirstName LastName
1001 Jane Doe
1002 John Doe
1003 Jane Smith
1004 John Smith
1005 Jane Jones

Employees
EmpID ChildName BirthDate
1001 Mary 1/1/92
1001 Sam 5/15/94
1002 Mary 1/1/92
1002 Sam 5/15/94
1003 John 10/5/94
1003 Pat 10/12/90
1003 Lee 6/6/96
1003 Mary 8/21/94
1004 Michael 7/4/96
1005 Edward 10/21/95
1005 Martha 10/15/89

r- i n r l ii r| Tables - i; i| Repeating Group Of Data r| r
;l ; Design r ni; n; i| i | --i -in ri in| r| i| ;
Design r- in i| Problems i l-ii Solution in ri ini r

; Design - r- l| Employee i| Childs Name Birth Dates i
Store n r, il ri Store l i i Children l| i |
i; Limitation r| r|
; Design - ni r| Space Use rini r, ln | n lli Childs
Data i Store l rin| r , ;l Storage Space Waste r| rini r|
; Design - l| Child | Searching i i| ri ini r, il
Child i i- r| Column - Store ri ni r, ;l DBMS i l|

88

www.BccFalna.com
DBMS-RDBMS in HinDi
i| Child i i- Search l r| Column i i - ii rini
r|

riil First Normal Form Relations - Data Repeating Groups r| rin r,
l - i | ; i Problems rin| r| First Normal Form Relation |
--ii i -n l r- Music Store Database Data Entry Form
Connected Back-End Table i r| iri - r r, l- Data Entry Form
Enter li ni Data i Store rini r| Music Store Data Entry Form
Connected Back-End Relation Notation i r- l-ii Represent n r

Orders (CustID, FName, LName, Street, City, State, Pincode, Telephone, OrderDate,
ItemID, Title, Price, HasShipped)

; Table - r- i r i- - Primary Key i Determine i rini r|
; Table - Customer Number l| Order i | nr Uniquely Identify
r| li i ni r, il r Item Order ii r| CustID Repeat rini r|

;| nr ItemID i Primary Key - Use r| li i ni r, il
r Order ii i| Repeat rini r| ; Relation - Primary Key i r|
ln n|i ri ni r i r n|i Composite Key i r|

; iri - r- OrderID ItemID ii Combination i Primary Key -
Use n r| l r- OrderID ItemID Combination i Primary Key
- Use n r, ni ; Relation - r- i rn r| -r-i i-i i i r| n r,
lr l-ii nii ni r

r- n n l| Customer Data i Relation - Store r| n r,
n l r Customer - - Order Place i , il li Order
i Order l-in Item , r-i i Complete Primary Key r|
rin| r|

z ;| nr r- n n l| Item | Information i i| Relation - Store r|
n r, n l i; Customer l| Order ,ii Item i Order i
, il li OrderID i| Complete Primary Key r| ni|

ii ii Insertion Anomalies r, i | Situation i Represent r r,
l- r- l| Relation - ;l l| Data i Insert r| n r, il r-i
i Complete Primary Key r| r|


89

www.BccFalna.com
DBMS-RDBMS in HinDi
i; i| Relation, i l First Normal Form - rini r, - Insertion Anomalies |
l-iln Common rin| r| r| Insertion Anomalies | l-iln n i rin| r,
l| Relation - ii Entities Data i Store | ilii | in|
r| ; Situation - Anomaly r- - Unrelated Entity l Item Data
i Insert l - ni r, r- l| Entity l Customer
Data i Insert r rin r|

First Normal Form Relations - i| --i i n r, r- Relation
l| Data i Delete | ilii n r| iri l -ii l r-
Customer Order i Delete i irn r, l Single Item i Order
Cancel li r| l

Customer r| r| i Order li ri i r| Item i Order li
ri, ni Customer Order i Delete Customer |
Information i| Music Store Database Permanently Delete ri in|,
l Music Store Organization i Customer n n l
Permanently Link -- ini, n l r ii i; Order r| ni r|

z Customer r| r| i Item i Order li ri i Customer
r l| Customer Item i Order r| li ri, ni Order i
Delete Item | Information i| Music Store Database
Permanently Delete ri in||

s Customer Order - r| Item i Order li ri, ni Order i
Delete Order | | Information Database Delete ri in||

Deletion Anomalies ;l i rin| r, il l| Row | Primary Key
Part - - Null Store ri ini r, Item Data i Delete n - r-
Data | | Row i Delete i ni r| Deletion Anomaly i lii- rini r l
Music Store Database Data i| Delete ri in r, lr r- Database - Stored
ii irn r|

l r- Practical i ni r- l| ilsn Entity Data i Delete i
rini r, n ; Anomaly | r r- Entity Data i i| Delete i ni r,
i l Same Table - ni rin r l ilsn Entity Unrelated rin r| ;
Discussion i iii r l r| Table - ii Entities Data i Store
r| i ilr|


90

www.BccFalna.com
DBMS-RDBMS in HinDi
Orders Relation - ln- Anomaly Update/Modification Anomaly i| r|
Orders Relation - r Order ii r Customer | Information i ii Store
| r Music Store Database - r| Customer rn i Unnecessary
Duplicated Data Store ri in r|

;l Customer Move rini r, n Customer ln i| Items ln
i| Orders Music Store Organization i l rin r, Database - i| Items
Orders | Row i Modify Customer Data i Change i ni r, il
r Item | Entry Database - l Item | Information ii Customer
| Information i i| Database - Store li ini r|

l r Row i Correctly Change i li i, ni l| Particular Customer |
Information i Represent i l i| Data i r-ii -i rii ilr, -i
r| r in r| Data | ; Inconsistency | -iii ii Modification
Anomaly | Situation i rin| r|


Second Normal Form
First Normal Form | lli Anomalies i r-i i -iii r l First Normal
Form i| Relation i| Entities i n Relation - Define li i|
iri l Music Store ; Orders Relation - r- i -n Entities
(Customers, Items, Orders Line Items ) i n n r| i
Music Store Organization i Relation Second Normal Form - i ini r|
Theoretical ii - Second Normal Form i l-ii liilin li i ni r

Relation First Normal Form - ri i i| Non-Key Attributes, Functionally l
Primary Key Dependent ri| l i; Non-Key Attribute Functionally
Primary Key Depend i ri l| Non-Key Attribute Depend ri, ni
Non-Key Attribute i Depend i| Non-Key Attributes i Relation
r-i Relation - Define i ilr i ; Relation - Key i
Primary Key i i ilr, l Attributes Depend ri|

Functional Dependency i Attributes | | One-Way Relationship rin| r|
l| Relation - l| i| - Attribute A l| Attribute B |
r| Value Associated ri| ilr|

iri l -ii l Orders Relation - A Customer i Customer Number
i CustID r| r Customer i Customer Number First Name, Last

91

www.BccFalna.com
DBMS-RDBMS in HinDi
Name, Street Address, City, State, Pincode Telephone
Number Associated rini r|

riil ; Attributes | Values i l| i| - Change li i ni r, l
l| i| - r Attribute - r| -i rini r| ; l-iln - r- r n r l
First Name, Last Name, Street Address, City State, Pincode Telephone Numbers
i| Functionally Customer Number Dependent r| Attributes | | ;
Relationship i l-ii Represent li ini r

CustID -> FName, LName, Street Address, City, State, Pincode, Telephone

i ; ; nr Read li ini r l Customer Number Determines First Name,
Last Name, Street Address, City State, Pincode and Telephone Numbers. ;
Relationship - Customer Number i| CustID i Determinant ii ini
r, i l i Attribute rini r, i Attributes | Values i Determine ni
r|

i i l Functional Dependency i Reverse Direction - Represent r| li i
ni r| iri l l| i| First Name i Last Name i ii
Customer Numbers ii Associate li i ni r| Orders Table - l-
Functional Dependencies r

CustID -> FName, LName, Street Address, City, State, Pincode, Telephone
ItemID -> Title, Price
OrderID-> CustID, OrderDate
ItemID + OrderID -> HasShipped

i l Relation - r Entity l Determinant r i Determinant r| r,
l r- Entity Identifier - Choose li r| l| Entity - Composite
Identifier rini r, n Determinate i| Composite rini r, il ii Representation
- ItemID+OrderID i Group Composite Identifier r| ; Example - i; Order
Ship li i i r ii r|, ItemID OrderID Combination Depend
ni r|

r- l| Database Environment - l| Relation lli Attributes | |
Functional Dependencies i Correctly Identify n r, i r- ;i in
Relations i Second Normal Form - Transform l n r|


92

www.BccFalna.com
DBMS-RDBMS in HinDi
; l-iln - r Determinant Relation i Primary Key ini r i ln i|
Attributes ; Determinant Depend rin r, i| Attributes Relation Non-Key
Attributes in r| ; Concept iii Music Store Organization
Original Relation - l i Entities i -n Identify n li ini
r, r l-ii Represent li i ni r

Customer (CustID, FName, LName, Street Address, City, State, Pincode, Telephone)
Items (ItemID, Title, Price)
Orders (OrderID, CustID, OrderDate)
LineItems (ItemID, OrderID, HasShipped )

ii r| Relations ER Diagram Single Entity -lin rin r| i l
Database Design i Functional Dependencies Entities ii - l iii
Derive li i, ;i i; lln l- r| rini r|

-r-i in rin| r l ER Diagram Relation - Identify | n; Functions
Dependency ii | Consistency ri| ilr| ; in Database Design
i; ii r| ni r l r- Relation i Functional Dependency iii
Design n r i Entities iii |

iin l-ilni - Database Design Interactive Process rini r, l- r-
Database i Initial Design Create n r, Check n r, Modify n r i l
Check n r| r- Design Process l| i| Stage - Function Dependency
i,i Entities i i n r i Against Check n r|

il r-ii | r| rini r l r- l Relation i First Normal Form - -i
li r, r i-n - First Normal Form - ri| Design Process l| i| Stage - r-
i -r ri ni r, l Relation | nr First Normal Form - r| r i
l First Normal Form - i | n r| r- Relation Second Normal
Form Criteria Rules i Apply n r, n Original Relation - Present Anomalies
Eliminate ri in| r i r- l- i- n r

Customer Order Place r r| r- Customer Data i
Database Relation - Store n r|
z r- l| Order Data i li Items | Information i| Database
Relation - Store n r|
s l| Customer ,ii l| Particular Item i Order l i r i| r-
Item Data i Database Relation - Store n r|

93

www.BccFalna.com
DBMS-RDBMS in HinDi
Line Items i l| i| Order Delete li i ni r| i
Item i Describe i Data, - Order i l| Item | Information
;i i; ii r| ni r|
r Customer -lin Data i r| i Store li ini r, ;l l
Customer Data - l| i i Change i , ni Change
r| i i ni r| ;- Modification Anomaly i ii r| ni r, il
Customer Data i Database Relation - ; i Store r| li ini r|

riil Second Normal Form lli Relations - iin --ii i -in
ni r| rn - i r| | l-ilni rin| r, r-ii Relation Second Normal Form -
rini r, l i| - Anomalies rin| r|

iri -ii l Music Store l Distributors Titles ni r, i|
Distributors i r| Store Room r, ri l Telephone r| ;
l-iln - l- Relation Second Form - rini

Items (ItemID, Title, Distributor, WareHousePhoneNo)

r ItemID l ; Relation - Title, Distributor Warehouse
Telephone Number r| ;l ; Relation - Insertion Anomaly r| r- n n
l| Distributor i Data Music Store Database - Store r| n r, n l
r- Distributor i; Item in r| rini r|

ii r| ; Relation - Deletion Anomaly i| r, il l r- l| Distributor
,ii i n Only Item | Details i Delete n r, ni r- Distributor |
Information i i| ii n|

; Relation - r Item Record ii Distributor Warehouse Phone
Number i i| Store li ini r , l ;i ii Duplication i| rini r, ;l
; Relation - Modification Anomaly i| r| ; l-iln - Relation Second
Normal Form - ni r, l Third Normal Form - r| r|


Third Normal Form
l| Relation i Third Normal Form iii ;l Normalize li ini r,
nil ni; n; Anomalies i -iii ri | l r- Entities iii i, ni
Items Relation - Item Distributor i Entities Related Data Store ri r r|

94

www.BccFalna.com
DBMS-RDBMS in HinDi
;l in Anomalies i r-i l r- ; Relation i l-ii i Individual
Relations - Divide i rini

Items (ItemID, Distributor)
Distributors (DistID, WareHousePhoneNo)

Third Normal Form i Theoretical Definition r l i; Relation n Third Normal
Form - rini r, Relation - i; Transitive Dependencies r| rin| r|
Original Relation - r- l Functional Dependencies i - ii ii, r|
Transitive Dependency rn r| Relation - Transit Dependency n Exist rin|
r, r-i i- l-ii Functional Dependency rin| r

A -> B and B -> C So Indirectly A -> C

r| Dependency Original Items Relation - r| Warehouse Phone Number i
Functionally Item Number Depend ri i Only ii r| r l Distributor
Functionally Item Number Dependent r i Phone Number Functionally
Distributor Dependent r| ;l i-nl Functional Dependency l-ii r

ItemID -> Distributor
Distributor -> WareHousePhoneNo

l WareHousePhoneNo Indirectly ItemID Dependent r, l r- Transitive
Dependency rn r| Transitive Dependency i l r- Mathematical Example
- Represent , ni l A Directly i ri B i B Directly i ri C ni A
Indirectly C i| i rini r|

r-i Original Items Relation - i Determinants r i ii r| Determinants i
Relation i Primary Key rii ilr, il r Determinate r-ii Relation i
Primary Key r| rini r|

riil ; Relation - Second Determinate i Attribute - Exist rii r|
Transitive Dependency i ii r| r| l~ i-n - Transitive Dependency i
- ii r l i Determinant Relation i Candidate Key r| r| ; -n
l l- Relation i iri in r

Items (ItemID, UpcCode, Distributor, Price)


95

www.BccFalna.com
DBMS-RDBMS in HinDi
ItemID r Number r, l Music Store Organization r Item i Uniquely
Identify l Use ni r, l UPC Code r Industry-Wide Code r, l
r Item i Uniquely Identify l Use li ini r| ; Relation -
Functional Dependencies l-ii r

ItemID -> UpcCode, Distributor, Price
UpcCode -> ItemID, Distributor, Price

i ; Relation - Transitive Dependency r| r|, ; Relations - Transitive
Dependencies r| r, il Second Determinant Candidate Key r| il
Music Store UpcCode i i| n| r| ii| l| Item i Uniquely Identify
l Use ni r, ln| ii| r Primary Key i Use ni r| ;
Relation - l| i i i; Insertion, Deletion i Modification Anomaly
r| r i Relation Item Entity i r| Describe ri r|

Transitive Dependency l| Relation - n Exist rin| r, i; Determinant, i
l Relation l Primary Key r| rini r r Relation i Candidate Key i|
r| rini r|

iri l r- l Items Table i iri - in - r r, -
Distributor Determinant r l r Distributor Items Table l
Candidate Key r| r| il Distributor ii Items Music Store - i
r r|

Second Normal Form Relation - i; Transitive Dependency rin| r, n r-
Relation i i si-si- Relations - Divide i ilr i ii Relations -
ii Determinants i Primary Key i i ilr| l Attributes i Determinants
,ii Determine li ini r, Non-Key Attributes i Determinant
Relation - Specify i ilr| ; Transitive Dependency Remove ri in| r
i ; Associated Anomalies i| Remove ri in| r, ii r| r-ii Relation Third
Normal Form - i ini r| l l| Second Normal Form Relation - i;
Transitive Dependency i ri, ni r Relation Automatically Third Normal Form - i
ini r|

Boyce-Codd Normal Form
iin Relations l Third Normal Form n Normalized Relation si
Design Objective rini r| ; l-iln Relations iin Anomalies Free rin r|

96

www.BccFalna.com
DBMS-RDBMS in HinDi
l i| ll-ilni ; i Third Normal Form Relations - i| ii| n l-- |
Anomalies rin| r|

; Anomalies i BCNF Forth Normal Form Normalization iii
Handle li ini r| l r-ii Relation Third Normal Form - ri i - i; Extra
Ordinary i | --i i ri, ni r-ii Relation Automatically BCNF Fourth
Normal Form - rini r| BCNF | li i -n l r- iri r r|

-ii l Music Store Organization n ni r l r Database - i
Relation Add ni, l r Music Store Employee i- - i
Schedule l Use ni|

r Employee r i 4-Hours | i i Shift - i- ni i r Shift -
Employee i Music Store l| Station (i| Stock Room - Stock i
Manage l i l Desk i- Customer i Handle l)
i- ni, l Station Shift - l r| Employee i- ni|
Schedule i Handle l l-ii Relation Design li i ni r

Schedule (EmpID, Date, Shift, Station, WorkedShift?)

l n Business Rule lri Employee Shift - Station i-
ni, ;l ; Relation - i -iiln Primary Keys EmpID + Date + Shift i Date
+ Shift + Station ri n| r| ; l-iln - Functional Dependency i Relation
l-ii ni

EmpID + Date + Shift -> Station, WorkedShift?
Date + Shift + Station -> EmpID, WorkedShift?

in i - i l Functional Dependency Relation | l-iln - r| r, r
Station r Shift - r| Employee i- ni r| Schedule Relation
Composite Candidate Keys i Show ri r | il ii r| Candidate Keys -
Date Shift Common r| Boyce-Codd Normal Form i l| Relation - Exist ;|
nr | Characteristics i Handle l ii ni r| BCNF Form - ri
l l| i| Relation ; l- i Apply rii | rini r l Relation Third
Normal Form - ri i Relation i| Determinants Candidate Keys ri, ni
Relation BCNF Form - rini r|


97

www.BccFalna.com
DBMS-RDBMS in HinDi
Forth Normal Form
BCNF | nr r| Forth Normal Form i i| l| Relation | Special
Characteristic i Handle l Design li ni r, i l rn r| -
ll-ilni - Generate rin| r| ; l-iln - i Special Characteristics rin| r,
i-ini Multi-Valued Dependency ri ini r| iri l l- Relation i
li

MovieInfo (Title, Star, Producer)

l| Specify | n; Movie - ii Stars ri n r i | Movie i
ii Producers Produce li ri ni r| Same Stars ii Movie -
Appear ri n r i Producer i| ii Movies - Involved ri ni r|
;l ; Relation i| Columns i Composite Primary Key - Use i
| ri ini r| ; iri i r- l- ii| - i n r

MovieInfo Table

Title Star Producer
Great Film Lovely Lady Money Bags
Great Film Handsome Man Money Bags
Great Film Lovely Lady Helen Pursestrings
Great Film Handsome Man Helen Pursestrings
Boring Movie Lovely Lady Helen Pursestrings
Boring Movie Precocious Child Helen Pursestrings

l ; Relation - i; i| Non-Key Attribute r| r, ;l Relation BCNF
Normalization Form - r | l i| Relation l- Anomalies Show ni r

1 r- - - Producer i i li l| Movie Stars i Insert r|
n r|
2 r- - - Star i i li l| Movie Producer i Insert r|
n r|
3 l r- l| Only Producer | Information i Delete n r, ni r-
Movie Starts i i| Loose n r|
4 l r- l| Movie Only Star i Delete n r, ni r- Movie
Producer | Information i i| Loose n r|
5 Movie r Star l Producer i- i Duplication rini r| ;| nr
r Producer l Movie Star i- i Duplication rini r|
Unnecessary Duplication Modification Anomaly | Situation i ni r|

98

www.BccFalna.com
DBMS-RDBMS in HinDi

; Relation - i Unrelated Entities r| ri Entity Movie Stars | |
Relationship i Handle ni r i i Movie Producer | | Relationship
i Handle ni r| Practically i ni r| Anomaly i - ii r , riil Movie,
Star Producer Entities i| Anomaly - Involved r|

l i| Theoretically i Anomalies Create ri r| r, r| Relation - Multivalued
Dependency ii Create ri r| r, lr Forth Normal Form - Eliminate li
ini r| Forth Normal Form i l- r l Relation Boyce-Codd Normal Form -
ri i - i; Multi-Valued Dependency i ri|

l| Relation - Multi-Valued Dependency n Exist rin| r, l| Attribute A |
r Value l l| Attribute B | rn i| Values Associated ri i l|
Attribute C | r Value l Attribute A | rn i| Values Associated ri, l
Attribute B C i - Independent ri|

r- l iri i Use r r, iri - ; i | Dependency r| il
r Movie Title l Stars i Actors i Group r, i l Movie Associated
r i r Movie Title l i| Producers i Group r, l Movie Associated
r| l i| Actors Producers Independent r, il ; | i; Direct
Connection r| r| ; Multivalued Dependency i l-ii Represent li i
ni r

Title ->> Star
Title ->> Producer

i ; ; nr i ini r l

Title Multi-Determines Star and Title Multi-Determines Producer.

Functional Dependency Multi-Valued Dependency i Special i r, ri
l -i i Determine li ini r , i l -ii Group i| Multi-Valued
Dependency i Eliminate ; Relation i Forth Normal Form - i l,
r- Relation i Split i rini r i Relation | Dependency r lr- i
l-ii - Relation - Place i rini r

MovieStars (Title, Star)
MovieProducers (Title, Producer)


99

www.BccFalna.com
DBMS-RDBMS in HinDi
; Design - r- -n Stars Producers i li i iiln l
r, Insert Remove n r| Stars Producers i i- i| r Movie l
r| i Appear rini r, l Connected rin r|

l| Database Relations i Normalize r Entity - n
Relation ,ii Represent rini r i Normalization r- lii ni r l r- li
l| Entity i Directly Disturb n r, lli Relations - Data i Insert
n r, Delete n r, Modify n r| riil Normalization | i| |
s l-i r|

r- Relations i ;l Split n r, nil Relationships i Primary Foreign Keys
Matching ,ii Represent li i | r- i| DBMS l| Query ,ii
li Tables Data i in i irn r, n r- DBMS i lli Relations
| Matching Operation i Perform l i n r|

iri l l| Normalized Database - r- l| Order Data i
Relation - Store n r, Customer Data i Relation - Store n r i
Order Lines Data i n| Relation - Store n r| r- Query n r, n
Query Operation ; n|i r| Relations Required Data i in Single
Table - Prepare ni r| nil l| Invoice l Output Generate li
i | lli Tables Data i Combined Form - Table - lii
l DBMS lii Process i in ni r| ; li i Join ri ini r|

Theory - Join Operation i Relations | Matching Values iii
Records i i Rows i Search ni r i ln| i i| Match in rini r ,
r Resultant Table - i Record i Row Create ni r|

riil Join Operation i Perform ii Relations Data i
Manipulate li ii s| li r| l Join Operations rn ii
Records Access rin r, n DBMS | Performance i| Data Manipulation |
Speed - ri in| r|

i l l Join Operation i ri ni r, r- Join Operation Algebra
i -ni rini| Relational Algebra, Operations i i -r r, li in l|
Relation Data i Manipulate Extract l li ini r| r Operation i
Tables , Single Manipulation Perform ni r| l| Query i Complete
l DBMS, Relational Algebra Operations i i Sequence Use ni r|


100

www.BccFalna.com
DBMS-RDBMS in HinDi
Relational Algebra nr Procedural rini r, l SQL, Relational Calculus
iiiln rini r| SQL - r- nii rini r l Database Relation r- i
Data ilr| l r- ni | n r| rin| r, l r- Database Relation r
Data ilr| Single SQL Retrieval Command, DBMS i i i|
Relational Algebra Operations i Perform l ln ni r|


Equi Join
; Common - Join Operation - Records i Rows Create
ni r, i Source Tables Data i - Match rin r| il r- Rows i
Equal Values l ii r r, ;l ; nr | Join i Equi-Join i Natural
aEqui-Join ri ini r| iri l n| i Tables i li

Customers Table

CustID FName LName
001 Jane Doe
002 John Doe
003 Jane Smith
004 John Smith
005 Jane Jones
006 John Jones


Orders Table

OrderID CustID OrderDate OrderTotal
001 002 10/10/99 250.65
002 002 2/21/O0 125.89
003 003 11/15/99 1567.99
004 004 11/22/99 180.92
005 004 12/15/99 565.O0
006 006 10/8/99 25.O0
007 006 11/12/99 85.O0
008 006 12/29/99 109.12

i l CustID Column Customer Relation i Primary Key r i r| CustID
Column Foreign Key | nr Orders Table - i| r| ;l Orders Table i CustID
Customers Belong ni r, lri Order Place li r|

101

www.BccFalna.com
DBMS-RDBMS in HinDi

-ii l r- Customers i- ii irn r, lri Order Place li r|
ii| in l r- i Tables i CustID Column iii Combined
Rows Create Join i rini|

l r- Database ii - r ni r- r n r l r- CustID iii i
Tables i Join r r| Join r- in ri i| Resultant Table l-ii
rin| r

Result Table

CustID FName LName OrderID OrderDate OrderTotal
002 John Doe 001 10/10/99 250.65
002 John Doe 002 2/21/00 125.89
003 Jane Smith 003 11/15/99 1597.99
004 John Smith 004 11/22/99 180,92
004 John Smith 005 12/15/99 565.00
006 John Jones 006 10/8/99 25,00
006 John Jones 007 11/12/99 85.00
006 John Jones 008 12/29/99 109.12

Equi-Join i r- Table i| | nr Apply n r| r- Equi-Join
n r, n Join Source r Row i | Table r Row Compare ni
r| First Source Table | r Row l Second Source Table Columns -
Matching Data iini r i r| i; Matching Row l- ini r, Result Table
- i Row Place ni r|

-ii l r- First Source - Customers Table i Use r r i Second
Source - Orders Table i, ni Result Table l-ii Produce rin| r

r CustID 001 l Orders Search li ini r| l Orders Table
- ; ID l i; Matching Row r| r, ;l Equi-Join Result Table -
i; Row Place r| ni r|
z ; i CustID 002 l Orders i Search li ini r| l ; ID |
i Matching Rows Orders Table - r, ;l Equi-Join Result Table - i
Rows Place ni r i ii Rows - i i Same Customer Information i
Store Order | Information i Store ni r|

102

www.BccFalna.com
DBMS-RDBMS in HinDi
s ; i CustID 003 l Orders i Search li ini r| ; ID
Related Order r, ;l Equi-Join i i Row Result Table -
Place ni r|
l CustID 004 l Orders i Search li ini r| ; ID Related i
Matching Orders r, ;l Result Table - i Rows i Add li ini r|
r l CustID 005 l Orders i Search li ini r| ; ID Related
i; Matching Orders r| r, ;l Result Table - i; i Row Add r|
li ini r|
c l CustID 006 l Orders i Search li ini r| ; ID Related
n| Matching Orders r, ;l Result Table - n| ; Rows i Add li
ini r|

i l l CustID ii Tables - Appear i ri, ni i; i| Row Result Table -
Place r| rini r| Join ; ri i Inner Join Group - ii ini r| i| ;
nr | Joining i Inner Join ri ini r|

Join Operation i i Operations lr Product Restrict Operation ri
ini r, - i| Implement li i ni r| ; nr Operations - rn ii
Data ii Manipulation rini r, ;l l DBMS ; nr Operations Perform
ni r, ni Database rn r| i|- i- ni r i Query | Performance rn r| -
ri in| r|

Restrict Operation l| Table Matching Rows i si ii Rows i Retrieve
ni r| l Product Operation ii Tables r Row | Cartesian Product
- ln -i ri, n Pair Create ni r|

iri l l Customer Orders Table ; Operation i Perform li
i, ni Customer Table - 6 Rows r l Orders Table - 8 Rows r n
lii-- Result Table - 48 Rows Create rin| ; Operation - CustID
Column i i Appear rini r, il Column ii Tables - Exist r|



103

www.BccFalna.com
DBMS-RDBMS in HinDi

DAtABASe StRuCtuRe AnD
PeRfoRMAnCe tuning


104

www.BccFalna.com
DBMS-RDBMS in HinDi
DBMS Database Structure and Performance Tuning
Database Design ii DBA i i- i i rini r i r i- rini r
Database Performance | Tuning i| Database | Performance i -| nr
Tune i Database i- | Speed i| - ri in| r| Database
| Speed i Tune l r- Database Design - i| Modification i
ni r|

nin r-ii DBMS r| User Commands iii Database - Data i
Store i Database Data i Retrieve i i- ni r| l n| i
in DBMS Software l| User Request i i i| Data
Manipulation Operations i DBMS i Query Optimizer r| Perform ni r| Query
Optimizer, DBMS Software i i lr-i rini r, i l| Query i Perform
l Relational Algebra Operation Efficient Sequence i n i i-
ni r|

riil Query Optimizer i- n| i Database Designer l| i| nr
Directly Handle r| ni r, l Database Design - s -ii
r- Database | Performance i s r n Increase n r|

Indexing
Indexing i n|i rini r, i l| Column i Composite Columns Data i
Access i Fast n|i i ni r| Database Application Use ii
User ln i| Records l| Table - Add ni ini r, i| Records Table n
- Random Order - n in r|

l| Table Records | i n| in| r , Table Sequential
Search ,ii l| Record Search ri | Process i|-| rin| in| r| li l|
s n| i Use l r DBMS l| Value i Search l r-ii
Sequential n| i in ni r, l- DBMS l| Column i Top Bottom |
n Scan ni r|

;l Table - Records | i ln| ii rin| r, Sequential Search | Speed
n| r| - rin| in| r| Indexing Conceptual Operation Diagram i l- l -
iii ni r


105

www.BccFalna.com
DBMS-RDBMS in HinDi


; l - r- Orders Table lli Records i Relation Index Table ii
i r r| Index r-ii Sorted Form - rni r, ;l ; lli i
Operations Perform Database l| Record i ii Fastly Search
ni r| Index - r Record Keys | Ordered List rin| r, l ii Order
Table i r Record Associated rni r| riil Order Table i| Records
Random Order - r, l Index Table - i| Records Sorted Order - ri | r
Records i Fastly Search li i ni r|

i r- Index Create n r, i i| n rin| r, ni DBMS i
Query Optimizer ; Index i in r| l| Record i Search ni r| r- ;
Index i ii Access | n n i; n r| rin| r, n l r- ;
Index i Delete i r| irn r|

r- l| Table - i; Primary Key Create n r, ni DBMS ; Primary Key i
Composite Key Columns iii - r| Index Create ni r| i| r-
l| Table - i; i Record Insert n r, Record Primary Key -i i
Uniqueness l DBMS ,ii Check li ini r| ; Uniqueness l Directly
Base Table Primary Key i Check i DBMS Index i Check
ni r i l Index Ordered Form - rini r, ;l Verification i| n|
ri ini r|

i | r| rini r l DBMS r-ii r-i Primary Key iii r| Index Create
ni| i-n - r- - i| r-i| Table l| i| Column i Group Of Columns
iii Index Create n r| l Indexing ii s Trade-Offs i| r, i
l-ii r

106

www.BccFalna.com
DBMS-RDBMS in HinDi

Indexes Database - Extra Space n r| l i Disk Space ii -rni
r| r , ;l Indexes -i - i i; | --i r| r|
z r- l| Indexed Column Record - l| Data i Insert i Modify
n r, i Record i Delete n r, ni DBMS Base Table ii r|
Index i i| Update ni r| ; li ii Data Modification | li
i|-| ri in| r, lii n Table - Records | i i| ii rin|
r|
s l i| Indexes Data Access i lln Increase n r|

i-ini Update Speed Retrieval Speed | Trade-Off rini r| Indexing
l ln l- r l Indexing l Columns i Choose i ilr, i
SQL Query - ii Use rin r i Indexing i-ini Foreign Key Columns |
| ilr| l l| Indexing i Apply r- nni r l Update Speed ii
iiln ri r| r, ni r- l Indexes i Create li r, - s i i i| i
n iii Delete n r|

Clustering
Disk Data i Write i i Disk Data i Read i DBMS i
Slowest i- rini r| l r- Data Disk Store ri Disk Data Retrieve
ri | i i - , ni r- DBMS | Performance i i n r|

Computer - i| Records Disk Page - Store rin r| i| r- l| Record
i in | Request n r, Database Record Page i Retrieve
ni r, l- r Record rini r| Page | Size nn Operating Systems
iii n| rn| r| Page | Size 512 Bytes 4 KBytes n rin| r|

r- Disk i r| Record | n i i ri, r-ii Disk -lin Record i
i Page r| Access rini r| ;l l r- Data i Access r r, i
-i Disk Page Stored r i i || Page - Stored r, ni r- Data Access
| Speed i i n r| ; Process i Clustering rn r i ;| lii
Oracle DBMS - i r|

Cluster i Primary Foreign Keys Matching i Records i Hold
l Design li ini r| Cluster i Define l r- Tables
Column i Columns Group i Specify i rini r, l iii DBMS
Cluster Create ni r i Tables i Cluster - Include ni r|

107

www.BccFalna.com
DBMS-RDBMS in HinDi

l l Column i Composite Columns iii Clusters Create li ni r,
Column i Composite Columns Same Values i Share i Records
i Disk Physically Store li ini r| ; Records i lni -i rini r ni
| Store li ini r|

lii-- l| Table lli Records ; Disk Pages - li r rn r,
l Matching Primary Keys Foreign Keys Records Same Page r|
Store rin r| Clustering i-ini Join Performance | Speed in| r| l
i| Indexes | nr r| Clusters Create -lin i| s Trade-Offs r, i
l-ii r

l Clustering Data l| File - Physically Store ri -lin rini r,
;l Table i Column i Composite Column iii
r| Clustered li i ni r|
z | Table Records i Scan | n rin| r, n Clustering |
r Scanning | Speed - ri in| r , il Clustering ii r|
Table lli Records Disk lli Disk Pages - Spread ri Store
rin r|
s Clustering Data Insertion | Speed - i| -| in| r|
Cluster l Column i Composite Column iiiln rini r, Columns
i Modification Speed - ri in| r|


Partitioning
Clustering | Reverse li i Partitioning ri ini r| l| | Table i
; si-| Tables - Divide ni r, nil DBMS rn i Data i ii Retrieve
i |

iri l l r- Music Store Application Database i , ni
Customers Orders | i n| in| r, lii Order Lines Table
Records | i i| in| r| l ; ii Tables - Records | i i|
ii ri i, ni ; l| Record i Retrieve | Speed i| - ri in||

l| Table i Horizontally Vertically i n|i Partition li i ni r|
Horizontal Partitioning - Table lli Rows i Records i Identical
Structure - i i i li Tables - Split li ini r|

108

www.BccFalna.com
DBMS-RDBMS in HinDi

l Vertical Partitioning - l| Table Columns i i - Primary Key
,ii Linked in r Split li ini r| ii r| Partition Process s
i s i r|

Horizontal Partition - Table i Records iii i i i li Tables -
Split li ini r, l ii r| Tables i Structure -i ii ini r| Music Store
Database - r- ; n| i Use n r|

iri l Orders Line Items Table i l Horizontal Partitioning iii
ii Tables - Divide i ri, ni r- ; i- i l-ii n r

OpenOrders (OrderID, CustID, OrderDate)
OpenOrderLines (OrderID, ItemID, Quantity, Shipped?)
FilledOrders (OrderID, CustID, OrderDate)
FilledOrdersLines (OrderID, ItemID, Quantity, Shipped?)

i| OpenOrders Table i| Items i Ship li ini r, Application
Program OpenOrders Table OpenOrderLines Table i| Records i Delete
ni r i ; Records i FilledOrders FilledOrdersLines Table - Fill ni
r|

; li ii OpenOrders OpenOrderLines Table ii - r| Records |
i - r| rn| r l Data Modification Retrieval | Performance in|
r| riil FilledOrders FilledOrdersLines Table Data Retrieval | Speed
i| i|-| rin| r, l Music Store ; Tables i rn - i Access ni r|

; n| ii n ii| in| r Music Store i Orders Table i OrderLines
Tables i| Records i ii Access | n n| r| ; n| i Use
r- l| Query - ; ii Tables Data i Access i irn r, n
r- UNION Operator i in n r i Queries i Mix Data i Access
i ni r| l r- i Application Create r r, - ii Tables i rn -
i ii Access | n n| r, ni r- ; n| i Performance i
l Use n r|

Horizontal Partitioning r-i Database | Performance n| i r|, ; in i
ni ni i r| n|i r, l r- i | ilii l r-ii Application
; nr Data i l nr Access ii r| l s Records i i

109

www.BccFalna.com
DBMS-RDBMS in HinDi
Group ri l ii Access l i | n n| ri, ni r- ; nr |
Partitioning i Database Apply n r|

Vertical Partitioning - r| Table lli Columns i ii Tables -
Divide li ini r i ii r| Tables | Primary Key i -i ii ini r| i
i| Tables i - One To One | Relationship Lined rn| r|

iri l l Music Store Database - Titles Prices | Information i
i| ii i Use | n n| r, ni r- Vertical Partitioning i Table
Apply l-ii i iini - i- n r

ItemTitles (ItemID, Title, Price)
ItemDetails (ItemID, Distributor, ReleaseDate, . . . )

; Design i ii r l ItemTitles Table Records Physically i| Close rin
r| si-| Tables - Disk Pages - Store rin r, ;l ; i Tables |
Performance i| s| rin| r| ii r| Tables Data | n rin| r, n
ii r| Tables i ItemID iii Join li ini r| Join Operation | nr
r| ; Join Operation | Speed i| - rin| r|


110

www.BccFalna.com
DBMS-RDBMS in HinDi
Last but not Least. There is more
Computer System lli Programming Languages i li i - ii
Business Solusions Develop i r| ri r| ;|l r Develop li ni
Oracle i- i DBMS Software n-i - - i| ni r| in| r, lni ;
Development - in| ii|

i| i i| l i; Application Software ii Develop li ini r , ni r
Business Solution Software r| rini r, i l | nr Database Application rini r,
l- l| Company i Business | l| Specific Type | Problem i Manage
Solve li ini r|

; -n - r- - Database Application Software Develop r
| i i| n i| i - r| l-ni Discuss li r nil i -n l
Application Software i Develop r l Develop li i ii Data
l i i ri, nil il - l| i | Database Related Anomaly i ri|

-n - ini l i| in| r i Database Administrator i|
DBA Level Profesisonals i irn r , il n-i - - i nin r
Database iiiln Application l l| l| i i Database ni Design i
r| ni r i ;| Database - r| Develop l i i Application i ii Data
Stored rni r|

; -n - r- Database Design -lin l Concepts i Discuss li r,
i| Concepts l| i| Relational Database System Software l MS-SQL
Server, MSAccess, Oracle, Sybase, MySQL, DB2 il -i Apply rin r|
;l l i ; Database Related Concepts i l| l| Software l
|i n r, ni l| i| Software l ;r |ii i| iii ri ini r|

--| r, ; -n i Professional Database Application Develop -lin
ni i ii rini i i l| i| Problem i Solve n - ii ii|
; in i li - i- r, l l i Data i Store l l
i i Database Table Create i rini nii Database | lli Tables
Data | l i | Data Relationship rin||