RDBMS Unit 1 Part 1 Basic Concepts Notes-1
RDBMS Unit 1 Part 1 Basic Concepts Notes-1
r)B 11_5
BAS I C CO 1 - r- 1)Ni~, lsl'bM ·.
-----====c~~'~=== '~
D a.616.~ e H o..n C\J t
_,
W1e nt S_ct st e...MJ
~ OBHS ;s °'- Co l\e_c\:::of\ of e.x.ewto.ble- CofflPl{te
Pr O(jt umS tho.\: a. II o s th e,
t,0 1.,\.$ e, r lo S l:o n~. , W1 o Md 'I
i.e.~ Ft Ie.,$ .
J\<- F:le ; s a.. .,.,.,e,Y<10fM block oj ,o... Sec.ortdM,d
sl-of°]e. dev:ce I: ke. d; s k, mo.S"e,hc ¼pe el:-c \:-o
S\:o<e- Io.g :ca.I I~ rel old •e.c.o fO. s ?U 'N\M en!:l~ •
Y-Th~ef?uce- °' _g; Il'. Qriaoe~ I:. .5er st"-~/ eCll mo,J
I ; (\ r,'\ h:
h°'s Q sefe-rale -f?~I~ ,' va.r;ot.LS r-~c.ords ose_ store.&
ti1 . vo.v-;()uS f:ILS D-nd dJfe.rert t . Prcjfo..~ 0.re.. (uf;bl:-en
to u:)ork ~--\:"' d~.Pfexe.nt f.\e,_s re.s~cJ-';✓e, I~'
* Tu~S,, OS l::v-n~ 3cb b(j, W'loce .g Ie 0-nJ '<Y'IO ,e,
Peas ra.v-AS o.e.- o.d-d. eJ l:o l:h e sci sle. 'r<l •
~""Th;S o.ppro~ c1./2 da.to.. ""'°'~elf'<"nl: , w\--- ere -1:-he,
O ~o.n~ z.o..\:;o() ho.S roan O 'Pfo3 fo..Y'/\S Lu; \:ti ndale..J -f~Ie,
;S k no <,u () QS \::'<tl- d; \:-.bM \ a..y'fYo a. c.h ·
~ \ e. b c1.se.-d- sd ste.
of DBMS C VfLf
0~ f-~ \ {2,
7h e fa ll o w; {) d ose. l:h~ ti;so.d.vo..()I: cle.s of- D13\iS ·
sci sk Y'fl (}s, cJ.__ those. res pe.c-1::;ve, o.O--vo..<·i\:·°8 e..s
~I \ lDBti~)
D u.t:D...D s e.:mefl
I
w'I D
4)Dol~ t.Solahin Pfobler(\ : A ll-) Dahl. ~ Solo.bn Solul:-:on ·, AS
d~lo. ' 5 5 ~H.e.r~d 1f"I Vo..r; 0115 do..1:a. res; des ~"' So..rne, s l::or1B e
4
l:s a.f\d. 'n d,~~t<e_ol -f?o,W\al-6 locol~on ,.e. 1 ,efak& ~Its r()
•
rt ' 5 d:f f~w\l:- to we: t~ Y1(!W d:f ~ce.n l: 3 <nuPS,.. ~ I:: , s ea.s l:-o
P<~<o.mS ro r-el(~tve the. a_ppro p, c.ur'te "" M
' cw p ro3,o.MS '-- cu -re1f~e\li
,o!:e do..to.. · lhe. ClPP<o pf;o.\:-a dQ.to.. ·
5) I11le..8~bJ Pru6\em de.velo S)In~~3,:ec1 Solu.t:on : Ta
! To
tt)Q.. ()t,w Gcns;sJe.-')~ ro.<l5e fn d~ve,lop t~e. f\tw c.o""s:slc~{)C ro..fij
ex.~sbn3 SaSt~Wl,/ the Q.PProp,ta.te, tn the.- ex:St.' {)3 sc1st~m lhe,
tade. mu.st be o..dded fr\ vo.r:o O.PPro?r:ale code Whl6t ed be..
app\:c.o..\:~o<'\ P<ob\emS- o..dd~J ~n one °'9p);col-:on P,~,
G\ o,obl,,,c. n, . ,, f\. A,.,,..,.c._S
!/ r ,
'
~ ,n q d O..c-Q •
\ tho.t O...CU!..SS a.ll da.t&to'1~ -l:me.
x
--- -
1
_ u - - • G) Sclu~:on 1n AcceS.s;nq 0 01--o•
"To o..u..e..s S tne a.PProp<; Q be, . . . . - O
do.to.., eo..c.h l::me. ~ re.la. l:e.~ Jo o...c...~s the o..pprop,.-oJe,
, do.ta.,,, the. DBrts Cons;s1:s o.f one,
"~w req,_ . u.es t .Proo,Ci.
u m ho.s l:-O Of fflO re 1
a Pro3 (u.rnS to e.x l:ra.(,t
be.
~
W<,~~~() Or the. ne,12de.,cf ,r-.P
-
~...I. ,I -.
• 't ne.e.ue...u ,
0 ()
()--,...of
l•
Md.c,o () .
1
'~ e.xl:co.ctw mon\AO.llcf .
r) Atom~c;~ Prob\e.:rn •, on l)Atom~u't Solu.t~on : an
0
Su\:u e.c,t to the, fa.~ luf<?.,
SubJe.ct to the.. -~o..~ lure, o.f Comp
of
Co~p14.~U ~St.£.Y'() ~ 7t ~ s C'C\Acla.1 -v.ler 5~ skw\ the So.J2~~
· l:-o ~sv..ce tho.t th~ Pfo Cf!-$~ e.f\Su.r~ tho.t · the P,o ce 6Si'Ae)
de&~ a.re. festo rcu}. to the., daJo. Ckre.. nz.stor~d l::-o the,.
c.ons~ ste.()l 5to.~ ~ho..t e,<; sl: C..O<\s:ste.()l s-l:o.te th a.t e.)(;s I:
1'c:o< ~ l\,~ fo.~lu.~ or not Pt:of ~ the.- .f?o.;lure i-e.~ ·the..
re.stofM• cho.n3 e, dol25not ~pp~l1 o..l: a/(.
S-) Do.to. Rtdv.i1dnn'.'(j Pco blem: ~) Do.to. Rtdu.ndo.nc;:i s 011.11-:on:
AS VO..r~ouS Cop:es of So. AS onlo one Co~ of daba.
doln 'ff.S~de.s / the iso..~ ,,f records ce.s:de.s \:he. So..me. fn.f.
0
APPmaeh ~ -9
* Dex.ta
~ DB H.S
~ A-pp\; co..Eor, S oi b.u a.rc2-
* -rh:s s1:-<ucb.fe as dt5cr~6e.& o.bove ;s re.fe:rred to cis
Q5 the. •do.l.R 60..SG e.n8:N<-" 'or th~ ' b o..c k end ".
da.-1:-o. ~ t
;t hCAS
Y-e.30.cd -le the '('('10.Y lO..~e. 5 ,
"""
o <) 71w·ee.. I~eJ a.b stfOcCH<l o (_M) ~•ch;_I::e.c hr~ (_ er) ;
--rbre.e schtYV"°'- A"ch:l:e.c!uve . . ~ .
~ Tue. 7'h~ sc\.-eWXA' O..rctlecN.«2- ;s . a.lso use & h
Se.pero.\:t?. !:he u.<e,r o.pp\:ca8o,;s ~ P~ s:ca./. da.lo..
-i. :rn DBns / the · do..-lo.. Co..t"1 be 0-bstmcted -. ;n -l:h-iee.
le.ve.ls
~ '4- Slsh& ,he, dola. o..bSlfo..ckJ o..~ e.a.ch 0 ; -1:-h~
" J l- \j "· v-'.)O r 1' Sc he.Me . 4
Jlve ls ·, $ d e,SC<, beO ()Q OI V'
sche-'f()e. V'fllei~ o.._ plo.n tho..t expl o.:(\ & ~he. -re.co rd. s _
0-od nda.bMsh:ps ex1s hcJ beJwea./'\ the. W'I, o:\: eCAch
leveJ ,
~ The.. worJ sche.w-e, c;:i\-,_; c:J-, Y'(\ea_"' 6 a scis l::Lr<lo. t; c
I
Sche.-i<)o.. ~,
*1he. thre.e le..-1els o~ o..bs~ro._cl-;0 f' O...f'<2.
E)tternCll f X te.r0a.1
5 C e.m I
LO<> SchemQ 3
Vi'lwA
Co n c.epb-ta. I /
I Tn~er(\cx.l
~~r:(\d
Dato.bas ~
I
~A~ the. f)\ttf"'°'-1 \~velJ a. do.io..b a..se. Co()tO,()S Several
Sche-rna.s tho..~ SaMeb'ffies ca11e..cl as Subs e, he w-ia , the,;
Sub SC~ e:r(l(A ~s used ~o dtscr: be, chl dJfere0~ v ,'li,u op
l1 e_ dato.bis e., .
-i- A\\ exl:-e.rf'lo..l sche.Wlll i s o.lso kno u.J n a.s v~e..w sche.~
¼ sche.Y'()a. de.scf: be.S the__ e.nd. Lt~er ~nte..'fa.cba 0
Iha v-.e.,,v:;
(,S, \:h datobast- s st
* An~ 3:.,en dol::0-ba.se h00
e.md:ld one, Cof\te.pbAO.-I
sche"'°' o.nd one. ?h1s:c.o.J sc.he"'o.., bi.~ \'t L4r\ morei-Mrl
'
~ It ;s a.\so r,..,tl/JJ
UA cO lcg,ca. \
$ Che.(V\ °'- .
kept do1o.6se •
',(') the.
An8 rjive.fl do.to.base ho..S e-t.<Ut lo ~ne_ Conc-t,p!:-uo.1
che.~o. Co(\t1ecte_cl ½J,l:::\, 6a\:h ExlanoJ Scht«'CA -~o d~splacf
~e. ~f\-~Ofrf\aboo ~ ,l~e lA5erJ ~ttu.e...st.
3) ph~ s:c~\ \tveJ
~ 'Tt ,s o.lso coJlld ~()b~.H\o.\ v~tLu of Ph~ s,' co..\ sche.W)Q ~,
~0s:c.ol v;uL) • ._,
)I- Tue p~s:CI,..\ se,\..e_...-o. 5ft'_c,;f.;es a.JcthoMI sl-or°de. deJo..l.S·
* -p\,clf,;c.o\ sd,e.wa. de..~'fleS how the relo.h~ d,,_scr;k£J;n
_· l:he. Cof'C.lPC\A.oJ cthe.'ff\O-. o..re. 0-dxetlld s\:o~& o() 2eG,nc9osi '
sloro-oe. ckv;ces 5uCh as d:s k.S ad. to..pe S-
Nle.d of m~~ )evt \ Av--ch',~tcture..
¾(he , \"l'\fu() 1'l6Jec,-\:,;ve, o~ -!:hfee, leve,I c~:rc1:le.ch.rt-
i s !:o Cna..61 e, t'f\41 bp) e l,LS e.rs !:o Cl cmss (:-)-,e So._('() e,
dab._ ~•th o.. Pers anal ;uc9 v;e.i,.) c,,.:lt"l~le. sl-or: (\ 8 the_
do...\: o... O()I~ Of\ce, .
U..l'\d e,( \ ~: 1j
-t Jh.tA s ', I: S e..peml-e. s th e, v.So 's v; e. w f rov-r, t:he,
P¼ s: coJ st:N-c t"-le, o~ \:he dato.b o.-£e...
~Tu e.. o..l <, o.&vo.n\::°t]e.. o~ thre.e vc he. rr0 o-.rd-Jecbi
I'(\
l ~"els.
~ ·,s a F two q1 pe..s lo81eo.l d cz!-a.
;1s12_0-l::o._ ? de.Pe."dlf'c::~
i f1 J tP e.0dtn Cl Md-- Phd5,'(o / da.to.. i n de.pe,ndet1 ce ,
PhMs:co..l DBKS
USM \:o process 0..r)& e.n\:-e( do.t~ 1 ()..(\8 houJ thele So(2b,ua.r-~
Cor<\~OM"ls c..n2.. ra,lo.rd O..t\& io ~l(Conf\ec~e.J'
of a. p; Ca..i VBrt S · .
End u&'f DDL
I
I
~ - - - ~ ~-Dtil Co('()p;\e< DDL
,D Comp:\e.r
Su.
18
1
Ii
',s
,_
Eo.&?..d on v-<10--nj fu.{'lct:of\S/
the__ do..t(}..bo..~ s a s teW'
't'f\O.d b e. posb \;;oAC?d 10 t O fo \IO ul '· (
V' l"' O dlA \e 5 . S o rn
)
e,,
~ " e,l::0/\ s mo.(.\ b e. 8;✓~ f\ \o<J th e_ o pe
<ol: .f'\3 Oj 5 t e_VY\ •
* 'D D L 'N'oe,a.r-...S l))...t 0... 0 e...f, ('I ~\: I. <) () 0-na \,Lo.a e,
L is u. s e. c9..
-fur de, s~8"' ;(\ <ii d cJo.bo.S c2.. s ch e'fN
fi.
?t- fncJ use-rs. o.re.. rhos e, pe,opl~ do rnttract Wi bh
- -----
l:he., do±°'b(lbe., l:hrn <.Ad h /Af'pl; cob;of1.S .
¼ DDL Cornp;ler : Jh~ ODL sw.len')ents o.re, sent to
-
DD L c:oYvlp,·I er tho1 'nberpre t-5; ~~ DDL StaJ~mel)ts
to 0.. seJ- 0~ tu.6 les Con~v\~o rne.tu-doJ(A slnred- :n
a. clc&a d; d:ono.'d l:ho.b urn be, use,J 6~ o r\,e r Coyy, Po
- f1e,nt-S of- the DB ~8.
,1: DML Con1p;ler cm& 1,v.eiJ or!:'.m;zer; pML cornp;ler
f" e,ho.fc3 e o~ i,,., pk"" e"\:;"v DB M.S 7n G\n o r_g o.n·, zo..t; <) f1 .
~ Da.~o..b,.se_ de S, ~~ vi
~ Pe< ~O( N"Ck(\Ce. ~ ss\,{_e.,s
1-) Do.t~bas<! ~cc&.&SJ~h\:d
\-) CaRlCi\j 1&5ue_S
'- ) Do.t°' re.pl~CCkt:on
--)To. b\e m'1A ntl?. no.nc.a
Ih ~ ro \e ~f DBA
DBA .
I I __ 1
Conc~a.l I
Te.s-l:n3 ,
L I
~ Ho& ;fCF(\~ sche.""°' ~ Do.lo.bas e..
DBA ho..s to cho.<13 e sche.r00... t() orde.( l-o a.ccommo-
c e.. d cd:o..
L • ltS
1 ,n Lh
, bQS e, • ·
ho...s -recor(J..::)
_1"" ,
Clbo~t OoJe
) Dat<A D;c,l;on.o..ru Con S~&ls o? the .f?o /low~0d t°f'i fQ (V'(\ 0.. b,'on ~
• N.O..~e o~ l:\,e., bo..b\es· f() ~he da..tcx.bQ&Z--
• Canstfa.~ nl:.s of a.. 60-.ble.. i, e~ k~s ,, r-elo.b·on sh;p setc
• Col \l.Wlt'l s of the to..bles bhal rnla.kJ !o each ot:h o·
• o co" e.r o ~ th(2_, ta.6 Ie.,
• LAsl a.ccess d ~nfoc""'o..b·()n o~ lhe.. obje cf:, .
• La...s t v. Pdal:d rnf or w, oJ,:on o ~ tl--,e o bJec t .
Types : --n.e ,e, o..re. t,,'.lo tares of da.to... 0 ; Gt:,Of\o..nt _
Acbve, no.ta._ D,ct7o()o.r½f ~ lht- D8 tiS ·a._r£1
a. ~0 1
u ~,~ ~n~~Lr~
L L/'\
- _ _ _U
0. G\:; ve do.to.. d.- ct ;Of) o..rv 0. wl:owia. kcalla• Tue. m o d;.J';co.J,>o() rs a()
o."' lo"" ab-c to.. D k c...., d. "' os L RD B t-15 ha.& a.c bve d a.IA cl: cbo,w
.
-rl- ,s CilSo know n a.s fn\::-eU-oro.. t e_d da.111 ~, cl-
. c- CJ
U\.. ti O ()CJ...r;_j
l 1
Po.ss ;Ve., .De,.1::-o.. D: C\;;.1 no.r~ : TYU.n °(j eJ bCJ the, LlSer5 a.ri &. ts
Wlod;~ceJ 'N\<l..t1<l0.lla U)Y'lt() !:he. do.6.ba..se. StnJ.CbAre.. cha.ri3 e.. . Al So
l<.t'\Ow () 0-S 'lon- :ri~j ro..~ da.l:o.. 1 f;c\::orio..r8 •
'J r
I¼T ~ pe.,s oC 'Do.l::C1.hw:,e, c1 '°1.rtJ
-
·The,f<L o..re_ V(}.r~ov-S tc1Pe..5 o~ da-l:o..6~ LlSe&. -~or s+.oc:n3
d:~~ce.f\t \J'(}.yte.,be..s of d0-to..
~ The CenhaJz.eJ do.bba.s of Da.to..b
th ol S to f Q.S do.to- oJ o.
~\:.ra.\,'2<Zd da.kbcis ~
5~ s~e.W) .
~ un1a~.e. o.. CQ()tro.L-2.~
do.to.base. sdsbe.'Nl I r()
d;sl<,bAkc?..& sdsl:.e.m~ dofa. ts ~~~: ; - 14:ero.r ,
d; S tr:'c,IA t e..d 0-.YV'On8 d~ ~re.() b Do-t:<AbO.S e Do_\:-R
du.ta.bo..se sc1ste mS of- a.n o \9 a.n~zCAb'al) .
~ ~e.,lat:o(\o._\ doJo.b ~t , 5 60..se_J en t-he Y-ela.b:of\Q I doka_
mode. I, w\,:ch Store.s dote__ ~(\ thl2 · foc1¥\ 0 ~ ffiLG6 L~up\e,s)
<1.~d. Colu.T-1\()S (o.t±r:bu .ttEJ ~!')a t Ojc?,the.r fo,.-V'{\s e1s llible. (rela'~·
* l--lon - S G.L / Not onld S ~L i's 0-. ta f>e
~ da.tCl b~ that ;
O