0% found this document useful (0 votes)
13 views24 pages

Dbms Unit 1 ..

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

Dbms Unit 1 ..

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

&uo~ ~"~on

tf\~ITlt
Easy Engineering Classes - Free YouTube Lectures
For Engineering Students of GGSIPU, UPTU and Other Universities, Colleges of India

~Uty~ BlockS: (9una e


&ub,nH\,~ ·fo ...u,_
clablbci~e ~r""' ·u. ~.,J: ~(~os,cl .~
&""O P>loctu .
A <9u~ ~toe..~ to~ o. bcaic. \u1\-- ~~
on bf ':{10 ~\ah.cl ·,~to -rtloJ.io.,al al.UtbTa.
t't>•ru.s"1on ancl o~'ff\l~td . ~
St\,d 8ook. ~"e ~m
Boo~ w"e"'~
P,iu > (_.stt«l M•~l P-ilc,)
hi-' 2,ook "'-lhtn
(~Boo: It Novtl.. );
Basic Concepts of Entity-Relationship Model

•:• Terminologies
* Entity:
• A "thing· in the real world with an independent existence.

• May be an object with physical existence (ex: house, person)

or with a conceptual existence( ex: course, job).

* Attributes:

• Properties that describe Ev


the entities. PHrnl[
NUMBER

~
/
PERSO
•:• Terminologies

Composite Attributes Simple Attributes

* Can be divided into further * Cannot be divided further.


parts.

* Ex: Name --+ First Name, * Ex: Weight --+ cannot be


Middle Name, Last Name further divided.

11l'SO.ll ,lciC'lllY. Of g
.....
~ Terminologies

Single-Valued Attributes Multivalued Attributes

Have a single value for a


* particular entity.
* Can have set of values for

a particular entity.

Ex: Age ~ single-valued Ex: College degree,


* attribute of a person.
* languaies known ~

multivalued attributes of a

1 1:J,
person.
+
.....
~ Terminologies

Derived Attributes Stored Attributes

Con be derived from other From which the value of


* attributes.
* other attributes ore
derived. •
Ex: Age con be derived
* from date of birth.
-+
* Ex: BirthDate of a person

; it •'if ) . 1c , 1clt 'ri1 v. C) ~ ~;


•:• Terminologies
* Complex Attributes:

• Has multivalued & composite components in it.

• Multivalued attributes ~ represented within '{ }'.

• Composite attributes~ represented within ' ( )'.

• Ex: {CollegeDegrees(College, Year, Degree, Field)}

* Null Values:
STUDENT_ID NAME AGE PHONE-NO

• Null is something which is I HARRY 20 123546897

2 JEREMY 22 NULL

..
not applicable or unknown .
3 JOSHUA NULL 2525468912
•:• Terminologies
* Entity Type: STUDENT

• A collection of entities that STUDENT_IO NAME

HARRY
have the same attributes.
JEREMY

• Ex: STUDENT JOSHUA

* Entity Set:

time.
..
Collection of entities of a particular entity type at a point in

' ' I, ' ') '. ' l i' l ~ j • ' ; ' l ·, . I I' ( •
•:• Terminologies
* Ke Attribute:
STUDENT
STUDENT _ID NAME
• That attribute that is
PRIYANKA

capable of identifying each JEREMY

PRIYANKA
entity uniquely.

• Ex: Roll number of a student

* Value Set of Attributes:

• The set of values that can be assigned to an attribute .


..
•:• Relationships
• Relationship -► association among 2 or more entities.

• Ex: teacher teaches student


!
relationship

* Degree of Relationship: Denotes the number of entity types that

participate in a relationship.

1. Unary relationship:
► Exists when there is an association

with only one entity.


nesoacademy. org
Relationships
* Degree of Relationship:
2. Binary relationship:
► Exists when there is an

association among two

entities.

3. Ternary relationship:
► Exists when there is an

association among three SUBJECT t - -- -----s. >---------1 STUDENT

nesoacademy.org entities.
Relationships
Relationship Constraints:
1. Cardinality Ratio
► Maximum number of relationship instances that an

entity can participate in.

EMPLOYEE DEPARTMENT
► Possible cardinality

ratios for binary N


EMPLOYEE DEPARTMENT

relationship ~ 1:1, 1:N,

nesoacademy. org
..
N:1, M:N. STUDENT SUBJECT

-+
•:• Relationships
* Relationship Constraints:
2. Participation Constraints
► Specifies whether existence of an entity depends on its

being related to another entity.


~----------~ P.mf,.Jj PnrtlC,p,.'lhon Tota PmllC!p,lltan

► 2 types: Tota I r,..,,_ ovrr


l ~lf s
l orrARtMf NT

participation & Partial 1,.-.,ov11 Of J>AHTMf NI

pa rtici potion.

Ill'\(), 1(
ER Diagram for COMPANY Database
.

nesoacade
I

LD8M~ g Symba/,1 rkl E-8. di0Jw.m1


L
► _ 1Name of
L- - ~ Syn16oJ
I - l -
, -· A. e ~ e Ekl-ity Set
r
lSbifh1JJ
r I

-• Doubl e [util-y Set


. Re clr:vn8 Ie
t
t
CWeaKJ
--
~
.
. EM.fpse Att?-ti'bu.k


I D~ ftelatto1-1s'1ip~ U
• ·- ~
• . -. - --
..
I •

• 1
_ Double - lde ko~y 1u;1. -
► 1 • Dfa.Moltld _ __ Ro La.h~f◄ __

•- . - Tyfe - ~
•~ - ~--Do_ulJe
~ _ 1 Ellipe.s

Share
UN IV
N fT
GM

EID E-t4Af1'1E Aoo~us ~1 .,,


I D~ .::!_~ I "' 50.,001)
\2 VtNA'f .D VJ-.i 4QT]tro !J'
3
4
~1>v1<A91
. ~ ,-11.lL ~·-[1"':; 1!
rl..J..M, c,~ cm,
~~ IN 1 1,;pt..£ \ IAIII
~1) Re.smCN:- N~1-IE. U ~
4t2) TuPl£.:- ~R_~~ fWf ~

~3) ~ ~:- ~ ~\STI~ ~ PH,Ra.A~ Ts ~ S(b~t> J:i.i AM ~lfR'6ult .


~ E H ~ Sy C.CWMN~
. ,) l::>£<.t,£ '.- t._ . ~ Ccl,.,11"1.iS Ji.. I\ ~'Tlc,,l
..., ~~:-sa- c~ l\.i..~ ,iteo\·~ s
- - A~.., Pwy AmhBl.lftS . Jt~) ue111~:- Ne-ifr RO\.JS 1M ~'KeumoN.
E~- Nf'IME ( ~ , \J1NA~ &11..aAf>M~ R~uL)
~5) ~"EWIACM .'· PAf!r C~TvPLE\~, ~
DBMS .'- Rc.~noNPtL D~MoDEL :-CH ARACTER1~n<~ O~ ~ - RE LAno N &

#-Ir NOT NECE~~ lo o ~ -~ ?LES. ~ A~1&JfcS :- EMPLJ:)~EE. - RcL.ArlO"-!


BuT To \-IFNE. 60<:0 Ef~\Cla.lC.1 luPlES. Sttc,,.,LD
E_II) Pl,toNE. D ef'r- N AP11:. \?ho ~
t?iE. C)~~a) BJ ~~)' V..E,Y. 1 2~ -. F'l om•~

'lt'lj L)\l\>Ua\le \JALJ.:E.S. Tu T~~ S t10ULD NoT J, ~ :n . . LE.C.


BE1\-\\:Sll:.,
3 ~ ~ (., · - Ao~ rN
1=3) \J11UJ~s 0~ E:oc"' ~~~ &4c:u..o ~ ATh~1c '1 A-;j~ NUL.L. Lee
1"e:o£ .31-'0W> ~ Ex~crL1 Ot-1E \Ji:>tu E ~ Cllo(H
A1111,1,Ull. "Lir (I-IA~ "L..,,- CH~
~~ E\JEA.y A,~,~~U) ~E u~16')e Nc\lrlE ·
E~~ee )( SQJ1U~
~s) ATTR1e,u1t S..WLO bl.:)~E &lrtJE I)omA,,-,
to~ THEIR.__" ~E~ l)i-f;~CJJ;- t > ~
~ ) ~t'10N N A<t!E &ouU> '6E D 11+l:REN1 ffi"" ._-- -S
C, 114€ R.1-<W T)o/lJ ~ 1'J o.m.c. Ree~
RsG,,l!) -ro N~ E.mcut DEP-ID
12~ 1 5'.:<>-S~ Ob~ 9 ma... 1 C.C ,., 10
Du+wc. M ~ ~l'OCW 2..0
5P4 3 CL 'l

~t ~ 1SA8~_,.o..J.. ~"' 10
""f- R~kVL

PR.1 9 l(f\PIL.. q~~.s~ 4." 1()


~ s~ 30
- Mb.4 SoJ..'\'1€ ~ <-.
UNl'-
N E"
G,kTI
R£&.JI) -ro N~ E.-rn~a DEP-ID
JHtttf
1 2~ i Suo£SH O.b@_ 9 fl"\0...f . Cc ,,, 10 '

DEEP?A~ aAt!:. .~mcu.C " "' 2-- 0


5P4 3
(;1-~ i5A8~G.M. CQ"" iO
1- R~HVL
PR.1 9 1(~1)1L G\&~~~ c.c,~ 10
~ \C\4 G S~OtJ <;~t..C\ 6@ ~mo..J ·Gun :!O
tK
L
UNIV
NET
G,~
Re&.lI) -ro N~ e._mQ.J.l DEP-It>
~ s \Jw•Uf SuoESH a.b@_ .9 rn a.i i -Com to ....

- '
12~ 1
LJ PlE ~ 5P4 3 Dc~PAK aA ft 3 f'nO..LC c.o m 2.0
Gl-~ 1- RA .. VL 1.SAB~41l Cc "°' 1o
'f ME. \<Ne~ PR1 9 l(~~IL '1~(~5~ Cc~ 10
· \;E. Nuu..._. l'\6.4 G ~~ -So..L~ 6<2 ~ o j J · ec ~. 30
Fc-RE.\6'~ ~E~:- J.rTu THAT p. [)tf~N,
Aml.\\,\Jlt \..l\>\1t11 Ts A~R'~J DEP-Ib t)E p-NAtr\t
KEy "TN Ot~~ Reum~ . io P.tf
• Use -r:,o EsTI\BUSH REU\TloMQt,, Tw 2
1.o ft1l~
ORMoR~r~ . 30 "'LN&Jt?)R
• ~ -\( . CAN ~~\If ~·
NOLL OR. D~PUCA~ Vt:1wf.
R~ l\tioJ W . .
~
UNIV
N el
(flf4t
~G.l'D -ro NW'1'. E..mcu.c. DEP-tD
-
,5 ',n£SH a.b@. 3mcu r,Com io
t
12~ 1
PlE lN DeePRK 2..0
5P4 3 ~ ~ ~ A'°-1.( W"l

(1- ij -=1- RAMUL i SAB~()j.( ~ "' iO


pR.1~ q K.J\?ll... qP,c~.S~ C.O"' 10
l'\().4 G s~ S cJ;<\ 6€ !)maJ -~ 30

You might also like