0% found this document useful (0 votes)
4 views

AIS Final Assignment (2)

A database (DB) is a structured collection of data stored and managed electronically, allowing for efficient organization, retrieval, and manipulation of information. Databases can be relational (e.g., MySQL, Oracle) or non-relational (e.g., MongoDB) and are essential in various fields like accounting and e-commerce. A Database Management System (DBMS) is used to manage and query databases, providing controlled access and organization of data for users.

Uploaded by

Henok Fikadu
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)
4 views

AIS Final Assignment (2)

A database (DB) is a structured collection of data stored and managed electronically, allowing for efficient organization, retrieval, and manipulation of information. Databases can be relational (e.g., MySQL, Oracle) or non-relational (e.g., MongoDB) and are essential in various fields like accounting and e-commerce. A Database Management System (DBMS) is used to manage and query databases, providing controlled access and organization of data for users.

Uploaded by

Henok Fikadu
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/ 18

Chapt

erFour
:Dat
abase

1.Whati
sDat
abase(
DB)
?
Adat
abasei
sast
ruct
uredcol
lect
ionofdat
athati
sst
ored,managed,andaccessed
el
ect
roni
cal
l
y.I
tcancont
ainanyt
ypeofdat
a,i
ncl
udi
ngwor
ds,number
s,i
mages,
vi
deos,andf
il
es.I
tal
lowsf
oref
fi
cientor
gani
zat
ion,r
etr
ieval
,andmani
pul
ati
onof
i
nfor
mat
ion.Dat
abasesar
ecommonl
yusedi
nvar
iousf
iel
ds,i
ncl
udi
ngaccount
ing,
f
inance,heal
thcar
e,ande-
commer
ce,t
ost
oreandmanagel
argevol
umesofdat
a
syst
emat
ical
ly.

 Adat
abasei
sacol
lect
ionofdat
ael
ement
s(f
act
s)st
oredi
nacomput
eri
nsucha
syst
emat
icwayt
hatacomput
erpr
ogr
am canconsul
titt
oanswerquest
ions.The
answer
stot
hose quest
ions become i
nfor
mat
ion t
hatcan be used t
o make
deci
sionst
hatmaynotbemadewi
tht
hedat
ael
ement
sal
one.Thecomput
er
pr
ogr
am used t
o manage and quer
y a dat
abase i
s known as a dat
abase
managementsyst
em (
DBMS)
.

Adat
abasei
sacol
lect
ionofr
elat
eddat
athatwecanusef
or

 De
fi
ni
ng (
speci
fyngt
i ypesofdat
a)

 Cons
truc
ti
ng (
stor
ing&popul
ati
ng)

 Mani
pul
at
ing (
quer
ying,
updat
ing,
repor
ti
ng)

Exampl
esofdat
abasesi
ncl
uder
elat
ionaldat
abases(
suchasMySQL,
Oracl
e,andSQL
Ser
ver
)andnon-
rel
ati
onaldat
abases(
li
keMongoDBandCassandr
a).

Feat
uresofadat
abase

 I
tisaper
sist
ent(
stor
ed)col
l
ect
ionofr
elat
eddat
a.

 Thedat
aisi
nput(
stor
ed)onl
yonce.

 Thedat
aisor
gani
zed(
ins
omef
ashi
on)
.

 Thedat
aisacces
sibl
eandcanbequer
ied(
eff
ect
iv
elyandef
fi
ci
ent
ly
).

1
A dat
abasei
sacol
lect
ionofi
nfor
mat
ioni
nthedi
git
alf
ormr
elat
edt
oapar
ti
cul
ar
subj
ectorpur
pose,such as t
racki
ng cust
omeror
der
s ormai
ntai
ning a musi
c
col
lect
ion.I
fanor
gani
zat
ion’
sdat
abasei
snotst
oredonacomput
er,
oronl
ypar
tsofi
t
ar
e,i
tmay be t
racki
ng i
nfor
mat
ion f
rom a var
iet
y ofsour
ces t
hathave t
o be
coor
dinat
edandor
gani
zed.Usi
ngaDBMSsuchasMS-
Access,al
lsuchi
nfor
mat
ion
canbemanagedf
rom asi
ngl
edat
abasef
il
e.

Wi
thi
nthef
il
e,dat
aisdi
videdi
ntosepar
atest
oragecont
ainer
scal
ledt
abl
es.Tabl
e
dat
acanbevi
ewed,added,andupdat
edusi
ngonl
inef
orms.Anor
gani
zat
ioncanf
ind
andr
etr
ievej
ustt
hedat
aitr
equi
resusi
ngquer
ies,andanal
yzeorpr
intdat
aina
speci
fi
clayoutusi
ngr
epor
ts.Theadvant
ageofst
ori
ngdat
ainadat
abasei
sthatdat
a
ar
est
oredonl
yoncei
nasi
ngl
elocat
ion,
canbevi
ewedf
rom mul
ti
plel
ocat
ions,
andi
f
updat
edatasi
ngl
epoi
nt,
iti
saut
omat
ical
lyupdat
edever
ywher
eitappear
s.

Dat
abasescanbet
houghtofasanor
gani
zedcol
lect
ionofi
nfor
mat
ion.I
nfor
mat
ion
aboutt
heat
tr
ibut
esofanent
it
y,suchasacust
omer
`snameandaddr
ess,
arest
oredi
n
f
iel
ds.Al
lthef
iel
dscont
aini
ngdat
aaboutoneent
it
y(e.
g.,
onecust
omer
)for
m ar
ecor
d.
Asetofr
elat
edr
ecor
ds,suchasal
lcust
omerr
ecor
ds,f
ormsaf
il
e(e.
g.,t
hecust
omer
f
il
e).Asetofi
nter
rel
ated,
cent
ral
lycoor
dinat
edf
il
esf
ormsadat
abase.

Fi
gur
e4.
1:Basi
cEl
ement
sofDat
aHi
erar
chy

2
Dat
abase

Customer Sal
esFi
l
e I
nvent
ory
Fi
le Fi
le

Recor
d1: Recor
d3: Recor
d1000:
Recor
d2:
Cust
omer Cust
omer3 Customer
Cust
omer2 1000:
1

Fi
eld1: Fi
eld2:
Fi
eld3: Fi
eld4: Fi
eld5: Fiel
d6: Fiel
d7:
omer Cust
Cust ome
St
reet Cust
omer
Number rName Ci
ty St
ate ZipCode
Addr
ess Age

Thedat
abaseappr
oacht
reat
sdat
aasanor
gani
zat
ionalr
esour
cet
hatshoul
dbeused
byandmanagedf
ort
heent
ir
eor
gani
zat
ion,notj
ustt
heor
igi
nat
ingdepar
tmentor
f
unct
ion.Adat
abasemanagementsyst
em (
DBMS)act
sasani
nter
facebet
weent
he
dat
abaseandt
hevar
iousappl
icat
ionpr
ogr
ams.Thepur
poseoft
heDBMSi
stopr
ovi
de
cont
rol
ledaccesst
othedat
abase.TheDBMSi
saspeci
alsof
twar
esyst
em t
hati
s
pr
ogr
ammedt
oknow whi
chdat
ael
ement
seachuseri
saut
hor
izedt
oaccess.The
user
’spr
ogr
am sendsr
equest
sfordat
atot
heDBMS,whi
chval
idat
esandaut
hor
izes
accesst
othedat
abasei
naccor
dancewi
tht
heuser
’sl
evelofaut
hor
it
y.TheDBMSwi
ll
denyr
equest
sfordat
athatt
heuseri
sunaut
hor
izedt
oaccess.Asonemi
ghti
magi
ne,
t
heor
gani
zat
ion’
scr
it
eri
a,r
ules,and pr
ocedur
esf
orassi
gni
ng useraut
hor
it
yar
e
i
mpor
tantcont
rol
issuesf
oraccount
ant
stoconsi
der
.

Thecombi
nat
ionoft
hedat
abase,DBMS,andappl
icat
ionpr
ogr
ams,whi
chaccesst
he
dat
abase t
hrough t
he DBMS i
sref
err
ed t he dat
o ast em.Ast
abase syst echnol
ogy
i
mpr
oves,manyl
argecompani
esar
edevel
opi
ngver
ylar
gedat
abasescal
leddat
a

3
war
ehouses

Gener
all
y,t
het
erm dat
abasesy
stem r
efer
stoanor
gani
zat
ionofcomponent
sthat
def
ineandr
egul
atet
hecol
lect
ionst
orage,managementanduseofdat
awi
thi
na
dat
abaseenvi
ronment
.Thedat
abasesyst
em i
scomposedof5maj
orpar
tsi
.e.

a)Har
dwar
e

Thi
sident
if
iesal
lthesyst
emsphysi
caldevi
cese.
g.t
hecomposi
ti
on per
ipher
als,
st
oragedevi
ceset
c.

b)Sof
twar
e

Thesear
eacol
lect
ionofpr
ogr
amsusedbyt
hecomput
erswi
thi
nthedat
abasesyst
em.

i
. O.
S-managesal
lhar
dwar
ecomponent
sandmakesi
tpossi
blef
oral
lot
herand
sof
twar
etor
unont
hecomposi
ti
on.

i
i.TheDBMS-managest
hedat
abasewi
thi
nthedat
abasesyst
em e.
g.Or
acl
e,DB2,
MsAccesset
c.

i
ii
.Appl
icat
ionspr
ogr
amsandut
il
it
iest
oaccessandmani
pul
atedat
aint
heDBMS.

c)Peopl
e

Thesear
eal
ldat
abasesyst
emsuser
s:-

1.Syst
emsadmi
nist
rat
or-Ov
erseest
hedat
abasesyst
emsgener
aloper
ati
ons.

2.Dat
abaseadmi
nist
rat
or(
DBA)-Managest
heDBMSuseandensur
est
hatt
he
dat
abasei
sfunct
ioni
ngpr
oper
ly.Hi
sfunct
ionsi
ncl
ude:

i
.Schemedef
ini
ti
on-Theor
igi
naldat
abaseschemei
scr
eat
edbywr
it
ingaset
ofdef
ini
ti
ons,
whi
char
etr
ansl
atedbyDDLcompi
lert
oasetoft
abl
est
hatar
e
per
manent
lyst
oredi
nthedat
adi
cti
onar
y.

i
i.St
oragest
ruct
ureand AccessMet
hodsDef
ini
ti
ons-Bywr
it
ing a setof
def
ini
ti
onsf
orappr
opr
iat
est
oragest
ruct
uresandaccessmet
hods,
whi
char
e
t
ransl
atedbyt
hedat
ast
orageanddef
ini
ti
onl
anguagecompi
ler
.

i
ii
.Schemeandphysi
calor
gani
zat
ionmodi
fi
cat
ions-Modi
fi
cat
iont
oei
thert
he
dat
abaseschemaordescr
ipt
ionoft
hephysi
calst
orageor
gani
zat
ionar
e

4
accompani
edbywr
it
ingasetofdef
ini
ti
onswhi
char
eusedbyei
thert
heDDL
compi
lerort
hedat
ast
orageanddef
ini
ti
onl
anguagecompi
lert
ogener
ate
modi
fi
cat
iont
oappr
opr
iat
eint
ernalsyst
emst
abl
ese.
g.dat
adi
cti
onar
y.i
v.
Gr
ant
ingaut
hor
izat
iont
odat
aaccess-Thi
sissoast
oregul
atewhi
chpar
ts
oft
hedat
abaseuser
scanaccess.v.Thedat
abasemanagerkeepsi
ntegr
it
y
Const
rai
nsi
naspeci
alsyst
em st
ruct
urewheneveranupdat
etakespl
acei
n
t
hesyst
em.

3.Dat
abase desi
gner
s -These ar
ethe dat
abase ar
chi
tect
s who desi
gn t
he
dat
abasest
ruct
ure.

4.Syst
emsAnal
yst
s&Pr
ogr
ammer
s(appl
icat
ionpr
ogr
ammer
s)-Theydesi
gnand
i
mpl
ementt
heappl
icat
ionpr
ogr
amst
heydesi
gn&cr
eat
ethedat
aent
ryscheme,
r
epor
ts & pr
ocedur
es t
hrough whi
ch user
s access and mani
pul
atet
he
dat
abasesdat
a.

Tabl
e4.
1:Dat
abaseofonl
inesal
esor
der
s
Or
der Cust
omerI
D Empl
oyee Or
derdat
e PO Tot
al
I
D I
D number amount
1 AD001 St
even 2/
2/07 52 231.
95
2 AD002 St
even 3/
14/
00 32 87.
3

3 AD003 Nancy 4/
18/
07 87 144.
65

4 AD004 Andr
ew 4/
21/
07 125 11.
3

5 Ol
dWor
ld St
even 2/
1/07 145 42.
45
6 Ol
dWor
ld Nancy 4/
9/07 444 31.
6
7 Ol
dWor
ld Andr
ew 4/
11/
07 555 52.
3
8 CanyonGr
ocer
y Andr
ew 2/
18/
07 55 52.
3
9 CanyonGr
ocer
y Janet 3/
26/
07 222 137.
1
10 CanyonGr
ocer
y Andr
ew 4/
1/07 666 136.
65

Asshownont
heabov
etabl
eadat
abasei
sacol
lect
ionofr
ecor
dsi
nast
ruct
ured
f
ormat
.Dat
ainast
ruct
uredf
ormatar
eeasi
lyr
etr
ievabl
eforanal
ysi
sandcal
cul
ati
ons.
I
tispossi
blet
oquer
ydat
athatexi
sti
nast
ruct
uredf
ormat
.Forexampl
e,i
famanager

5
want
sto sel
ectt
he bestcust
omer
,he need notask t
he i
nfor
mat
ion syst
ems
depar
tmentf
orar
epor
tonsal
esf
igur
es,butcansi
mpl
ycompar
ethet
otalamount
s
andcust
omerI
Dfi
eldsf
oral
lther
ecor
dsi
nthesal
esor
derdat
abaseandsel
ectt
he
bestcust
omer
.

Fi
gur
e4.
2:TheDat
abaseAppr
oach

User1
Tr
ansact
ions Dat
abase

Pr
ogr
am 1 FactA

(
Sal
es) FactB

User2 Dat
abase
FactC
Tr
ansact
ion Managemen
s Pr
ogr
am 2 tSyst
em
FactD
(
Shi
ppi
ng)
FactE

User3
FactF
Tr
ansact
ion Pr
ogr
am 3
s FactG
(
Bil
l
ing)

Gener
all
y,adat
abasei
sacol
lect
ionofdat
ast
oredont
hecomput
eri
naf
ormt
hat
al
lowst
hedat
atobeeasi
lyaccessed,r
etr
ieved,mani
pul
ated,andst
ored.Dat
abases
ar
e essent
ialf
orst
ori
ng l
arge amount
s ofdat
ain one pl
ace.Wi
th dat
abases,
or
gani
zat
ionscanqui
ckl
yaccess,manage,modi
fy,updat
e,or
gani
zeandr
etr
ievet
hei
r
dat
a.Dat
abases ar
e nor
mal
ly cont
rol
led usi
ng a dat
abase managementsyst
em
(
DBMS)
.Int
hedat
abase,
dat
aisor
gani
zedi
ntot
abl
esconsi
sti
ngofr
owsandcol
umns.
Manydat
abasesal
souseSt
ruct
uredQuer
yLanguage(
SQL)f
orwr
it
ingandquer
ying
dat
a.Ther
ear
edi
ff
erentki
ndsofdat
abases,
however
,sot
heexactl
anguageusedand
howi
twor
ksdependsont
het
ypeofdat
abase.

6
2.Whati
sfi
le?
Af
il
eisadi
git
alcont
ainerusedt
ost
oredat
ainacomput
ersyst
em.Fi
lesar
etypi
cal
ly
or
gani
zedi
ntoadi
rect
oryst
ruct
ureandcancont
aint
ext
,images,vi
deos,orot
her
f
ormsofdat
a.Unl
ikeadat
abase,f
il
esar
elesscompl
exandof
tenser
veasasi
mpl
e
meanst
ost
oreandr
etr
ievei
nfor
mat
ion.

 Af
il
eisacol
lect
ionofr
ateddat
athati
str
eat
edasasi
ngl
euni
tonaper
ipher
al
devi
cef
orexampl
etextdocumenti
n wor
d pr
ocessi
ng.A setofal
lrel
ated
r
ecor
dsf
ormsaf
il
e.Exampl
esoff
il
esi
ncl
udest
udent
sfi
lest
oredast
extf
il
es
(
.t
xt)
,spr
eadsheet
s(.
xls)
,andCSVf
il
es(
.csv)
.

 Af
il
epr
ocessi
ngsyst
em i
sacol
lect
ionofpr
ogr
amst
hatst
oreandmanagef
il
es
i
ncomput
erhar
d-di
sk.Ont
heot
herhand,adat
abasemanagementsyst
em i
s
col
lect
ionofpr
ogr
amst
hatenabl
est
ocr
eat
eandmai
ntai
nadat
abase.Fi
le
pr
ocessi
ngsyst
em hasmor
edat
aredundancy,
lessdat
aredundancyi
nDBMS.

 Thef
il
eisbasi
cal
l
yawayofar
rangi
ngt
hedat
ainast
oragemedi
um l
ikeahar
d
di
sk.Thef
il
esyst
em or
gani
zest
hef
il
esandhel
psi
nther
etr
ievaloff
il
eswhen
t
heyar
erequi
red.Fi
lesyst
emsconsi
stofdi
ff
erentf
il
eswhi
char
egr
oupedi
nto
di
rect
ori
es.The di
rect
ori
esf
urt
hercont
ain ot
herf
older
sand f
il
es.The f
il
e
syst
em per
for
msbasi
coper
ati
onsl
ikemanagement
,fi
lenami
ng,gi
vingaccess
r
ules,
etc.

Asment
ionedabove,
inat
ypi
calFi
leSyst
em el
ect
roni
cdat
aar
edi
rect
lyst
oredi
naset
off
il
es.I
fonl
yonet
abl
eisst
oredi
naf
il
e,i
tiscal
ledaf
latf
il
e.Theycont
ainval
uesi
n
eachr
ow separ
atedwi
thaspeci
aldel
imi
terl
ikecommas.I
nor
dert
oquer
ysome
r
andom dat
a,f
ir
sti
tisr
equi
redt
opar
seeachr
ow andl
oadi
ttoanar
rayatr
unt
ime,
butf
ort
hisf
il
eshoul
dber
eadsequent
ial
ly(
because,
ther
eisnocont
rolmechani
sm i
n
f
il
es)
;ther
efor
eiti
squi
tei
nef
fi
cientandt
imeconsumi
ng.Thebur
denofl
ocat
ingt
he
necessar
yfi
le,goi
ngt
hrought
her
ecor
ds(
li
nebyl
ine)
,checki
ngf
ort
heexi
stenceofa
cer
tai
ndat
aandr
emember
ingwhatf
il
es/
recor
dst
oedi
tar
eont
heuser
.Theuser
ei
therhast
oper
for
m eacht
askmanual
lyorhast
owr
it
eascr
iptt
hatdoest
hem
aut
omat
ical
lywi
tht
hehel
poft
hef
il
emanagementcapabi
li
ti
esoft
heoper
ati
ngsyst
em.
Becauseoft
heser
easons,Fi
leSyst
emsar
eeasi
lyvul
ner
abl
etoser
iousi
ssuesl
ike

7
i
nconsi
stency,
inabi
li
tyt
omai
ntai
nconcur
rency
,dat
aisol
ati
on,
thr
eat
soni
ntegr
it
yand
l
ackofsecur
it
y
Fi
gur
e4.
2:Fl
atFi
leDat
aManagement

3.Whatar
ethedi
ff
erencebet
weenFi
leandDat
abase?
 Af
il
esyst
em i
ssof
twar
ethatmanagesandor
gani
zest
hef
il
esi
nast
orage
medi
um,wher
easaDBMSi
sasof
twar
eappl
icat
iont
hati
susedf
oraccessi
ng,
cr
eat
ing,
andmanagi
ngdat
abases.

User1
Tr
ansact
ion
s Pr
ogr
am 1 Mast
erFi
le1
(
Sal
es) FactA,
B,C,
D

User2
Tr
ansact
ions
Pr
ogr
am 2
Mast
erFil
e2
(
Shi
ppi
ng
FactA,C,E,
F
)
User3
Tr
ansact
ions
Pr
ogr
am 3
MasterFi
le3
(
Bil
l
ing)
FactA,D,
EG

 Thef
il
esyst
em doesn’
thaveacr
ashr
ecover
ymechani
sm;ont
heot
herhand,
t
heDBMSpr
ovi
desacr
ashr
ecover
ymechani
sm.

 Dat
ainconsi
stency i
s hi
gher i
nthe f
il
e syst
em.On t
he cont
rar
y,dat
a
i
nconsi
stencyi
slowi
nadat
abasemanagementsyst
em.

 Fi
lesyst
em doesnotpr
ovi
desuppor
tforcompl
icat
edt
ransact
ions,whi
lei
nthe
DBMSsyst
em,
iti
seasyt
oimpl
ementcompl
icat
edt
ransact
ionsusi
ngSQL.

 Fi
le syst
em does notof
ferconcur
rency,wher
eas t
he DBMS pr
ovi
des a
concur
rencyf
aci
l
ity.

8
Asasummer
y,i
naFi
leSyst
em,f
il
esar
eusedt
ost
oredat
awhi
le,adat
abasei
sa
col
lect
ionofor
gani
zeddat
a.Al
thoughFi
leSyst
em anddat
abasesar
etwowaysof
managi
ngdat
a,dat
abasescl
ear
lyhavemanyadvant
agesoverFi
leSyst
ems.Typi
cal
ly
whenusi
ngaFi
leSyst
em,mostt
askssuchasst
orage,r
etr
ievalandsear
char
edone
manual
ly(
event
houghmostoper
ati
ngsyst
emspr
ovi
degr
aphi
cali
nter
facest
omake
t
heset
askseasi
er)andi
tisqui
tet
edi
ouswher
easwhenusi
ngadat
abase,t
hei
nbui
lt
DBMS wi
l
lpr
ovi
deaut
omat
ed met
hodst
o compl
etet
heset
asks.Becauseoft
his
r
eason,
usi
ngaFi
leSyst
em wi
lll
eadt
opr
obl
emsl
ikedat
aint
egr
it
y,dat
ainconsi
stency
anddat
asecur
it
y,butt
hesepr
obl
emscoul
dbeavoi
dedbyusi
ngadat
abase.Unl
ikea
Fi
leSyst
em,dat
abasesar
eef
fi
cientbecauser
eadi
ngl
inebyl
inei
snotr
equi
red,and
cer
tai
ncont
rol
mechani
smsar
einpl
ace.

Themai
ndi
ff
erencebet
weenf
il
esyst
em andDat
abasear
e:
Basi
s Dat
abaseAppr
oach Fi
leSyst
em Appr
oach

Meani
ng •Dat
abasei
sa •The f
il
e syst
em i
s a
col
lect
ionofdat
a. col
lect
ionofdat
a.
•I
nDat
abase,
theuser •I
nthi
ssyst
em,
theuserhas
i
snotr
equi
redt
owr
it
e t
owr
it
ethepr
ocedur
esf
or
t
hepr
ocedur
es. managi
ngt
hedat
abase.
Shar
ingofdat
a •Duet
othecent
ral
ized •Dat
aisdi
str
ibut
edi
nmany
appr
oach,
dat
a f
il
es,and i
t may be of
shar
ingi
seasy
. di
ff
erentf
ormat
s,soi
tisn'
t
easyt
oshar
edat
a.
Dat
aAbst
ract
ion •Dat
abasegi
vesan •Thef
il
esyst
em pr
ovi
dest
he
abst
ractvi
ewofdat
a det
ail of t
he dat
a
t
hathi
dest
hedet
ail
s. r
epr
esent
ati
on and st
orage
ofdat
a.
Secur
it
yand •Dat
abasepr
ovi
desa •I
tisn'
teasyt
opr
otectaf
il
e
Pr
otect
ion goodpr
otect
ion undert
hef
il
esyst
em.
mechani
sm.

9
Recov
ery •Dat
abasepr
ovi
desa •The f
il
e syst
em doesn'
t
Mechani
sm cr
ashr
ecover
y have a cr
ash mechani
sm,
mechani
sm,
i.
e., i
.e.
,ift
he syst
em cr
ashes
Dat
abasepr
otect
sthe whi
le ent
eri
ng some dat
a,
userf
rom syst
em t
hent
hecont
entoft
hef
il
e
f
ail
ure. wi
llbel
ost
.
Mani
pul
ati
on •Dat
abasecont
ainsa •Thef
il
esyst
em can'
t
Techni
ques wi
devar
iet
yof ef
fi
cient
lyst
oreandr
etr
ieve
sophi
sti
cat
ed t
hedat
a.
t
echni
quest
ost
ore
andr
etr
ievet
hedat
a.
Concur
rency •Dat
abaset
akescar
eof •I
ntheFi
lesyst
em,
Pr
obl
ems Concur
rentaccessof concur
rentaccesshas
dat
ausi
ngsomef
orm manypr
obl
emsl
ike
ofl
ocki
ng. r
edi
rect
ingt
hef
il
ewhi
le
del
eti
ngsomei
nfor
mat
ion
orupdat
ingsome
i
nfor
mat
ion.

Wher
etous
e •Dat oachused • Fi
abaseappr lesyst
em appr
oachused
i
nlar
gesyst
emswhi
ch i
nlar
gesyst
emswhi
ch
i
nter
rel
atemanyf
il
es. i
nter
rel
atemanyf
il
es.

Cost •Thedat
abasesyst
em i
s • Thef
il
esyst
em appr
oachi
s
expensi
vet
odesi
gn. cheapert
odesi
gn.

Dat
aRedundancy • Due t
o he • I
t n t
his, t
he f
il
es and
andI
nconsi
stency cent
ral
izat
ion of t
he appl
icat
ion pr
ogr
ams ar
e
dat
abase,t
hepr
obl
ems cr
eat
ed by di
ff
erent
ofdat
aredundancyand pr
ogr
ammer
ssot
hatt
her
e
i
nconsi
stency ar
e exi
stsal
otofdupl
icat
ionof
cont
rol
led. dat
a whi
ch may l
ead t
o

10
i
nconsi
stency.

St
ruct
ure • Thedat
abase • Thef
il
esyst
em appr
oach
st
ruct
urei
scompl
ex hasasi
mpl
est
ruct
ure.
t
odesi
gn.

Dat
a •I
nthi
ssyst
em,
Dat
a •I
ntheFi
lesyst
em appr
oach,
I
ndependence I
ndependenceexi
sts, t
her
eexi
stsnoDat
a
andi
tcanbeoft
wo I
ndependence.
t
ypes.

 Logi
calDat
a
I
ndependence

 Phy
sical
Dat
a
I
ndependence

I
ntegr
it
yConst
rai
nts •I
ntegr
it
yConst
rai
nt e •I
sar ntegr
it
yConst
rai
ntsar
e
easyt
oappl
y. di
ff
icul
ttoi
mpl
ementi
nfi
le
syst
em.

Dat
aModel
s •I
nthedat
abase •I
nthef
il
esyst
em appr
oach,
appr
oach,
3typesof t
her
eisnoconceptofdat
a
dat
amodel
sexi
st: model
sexi
sts.
o Hi
erar
chaldat
a
model
s

o Net
wor
kdat
a
model
s

11
o Rel
ati
onal
dat
a
model
s

Fl
exi
bil
i
ty • Changes ar
e of
ten a • Thef
lexi
bil
it
yoft
hesyst
em
necessi
ty t
o t
he i
slessascompar
edt
othe
cont
ent of t
he dat
a DBMSappr
oach.
st
oredi
nanysyst
em,
andt
hesechangesar
e
mor
e easi
l
y wi
th a
dat
abaseappr
oach.

Ex
ampl
es • Or
acl
e, SQL Ser , • Cobol
ver ,C++et
c.
Sybaseet
c.

4.Whatar
ethei
mpor
tanceandadvant
agesofDat
abasesyst
em?

Busi
ness,gover
nmentandsci
ent
if
icf
iel
dsusedat
abasesf
ordat
ast
orage,anal
ysi
s
andmanagement
.Or
gani
zat
ionsuset
hedat
ast
oredi
ndat
abasest
omakei
nfor
med
busi
ness deci
sions.Some oft
he ways or
gani
zat
ions use dat
abases i
ncl
ude t
he
f
oll
owi
ng:

 Dat
aint
egr
ati
on:I
ntegr
ati
on i
sachi
eved bycombi
ning mast
erf
il
esi
ntol
arger

pool
s”ofdat
athatmanyappl
icat
ionpr
ogr
amscanaccess.Anexampl
eisan
empl
oyeedat
abaset
hatconsol
idat
esdat
afor
mer
lycont
ainedi
npayr
oll
,per
sonnel
,
andj
obski
ll
smast
erf
il
es.Thi
smakesi
teasi
erf
ori
nfor
mat
iont
obecombi
nedi
n
unl
imi
tedways

 Dat
ashar
ing:I
ntegr
ati
ngdat
amakesi
teasi
ert
oshar
edat
awi
thal
laut
hor
ized
user
s.

 Repor
ti
ngf
lexi
bil
it
y:Repor
tscanber
evi
sedeasi
lyandgener
atedasneededand
t
hedat
abasecanbeeasi
lybr
owsedt
oresear
chapr
obl
em orobt
aindet
ail
ed
i
nfor
mat
ionunder
lyi
ngasummar
yrepor
t.

12
 Mi
nimaldat
aredundancyanddat
ainconsi
stenci
es:Becausedat
ait
emsar
eusual
ly
st
oredonl
yonce,
dat
aredundancyanddat
ainconsi
stenci
esar
emi
nimi
zed.

 Dat
aindependence:Because dat
a and t
he pr
ogr
ams t
hat use t
hem ar
e
i
ndependentofoneanot
her
,eachcanbechangedwi
thouthavi
ngt
ochanget
he
ot
her
.Thi
smakespr
ogr
ammi
ngeasi
erandsi
mpl
if
iesdat
amanagement
.

 Cent
ralmanagementofdat
a:Dat
a managementi
s mor
e ef
fi
cientbecause a
dat
abaseadmi
nist
rat
ori
sresponsi
blef
orcoor
dinat
ing,cont
rol
li
ng,andmanagi
ng
dat
a.

 Cr
oss-
funct
ionalanal
ysi
s:I
n a dat
abase syst
em,r
elat
ionshi
ps,such as t
he
associ
ati
onbet
weensel
li
ngcost
sandpr
omot
ionalcampai
gns,canbeexpl
ici
tl
y
def
inedandusedi
nthepr
epar
ati
onofmanagementr
epor
ts.

 I
mpr
ovebusi
nesspr
ocesses.Compani
escol
lectdat
aaboutbusi
nesspr
ocesses,
suchassal
es,or
derpr
ocessi
ngandcust
omerser
vice.Theyanal
yzet
hatdat
ato
i
mpr
ovet
hesepr
ocesses,
expandt
hei
rbusi
nessandgr
owr
evenue.

 Keept
rackofcust
omer
s.Dat
abasesof
tenst
orei
nfor
mat
ionaboutpeopl
e,suchas
cust
omer
soruser
s.Forexampl
e,soci
almedi
apl
atf
ormsusedat
abasest
ost
ore
useri
nfor
mat
ion,suchasnames,emai
laddr
essesanduserbehavi
or.Thatdat
ais
usedt
orecommendcont
entt
ouser
sandi
mpr
ovet
heuserexper
ience.

 St
oreper
sonaldat
a.Dat
abasescanal
sobeusedt
ost
oreper
sonali
nfor
mat
ion.For
exampl
e,per
sonalcl
oudst
oragei
savai
labl
efori
ndi
vidualuser
stost
oremedi
a,
suchasphot
os,
inamanagedcl
oud.

Advant
agesDat
abasesyst
em:

 Cont
rol
li
ngofRedundancy:Dat
aredundancyr
efer
stot
hedupl
icat
ionofdat
a
(
i.
est
ori
ng samedat
a mul
ti
plet
imes)
.In a dat
abasesyst
em,byhavi
ng a
cent
ral
ized dat
abase and cent
ral
ized cont
rolof dat
a by t
he DBA t
he
unnecessar
ydupl
icat
ionofdat
aisavoi
ded.I
tal
soel
imi
nat
est
heext
rat
imef
or
pr
ocessi
ngt
hel
argevol
umeofdat
a.I
tresul
tsi
nsavi
ngt
hest
oragespace.

 I
mpr
ovedDat
aShar
ing:DBMSal
lowsausert
oshar
ethedat
ainanynumberof

13
appl
icat
ionpr
ogr
ams.

 Dat
aInt
egr
it
y:I
ntegr
it
y means t
hatt
he dat
aint
he dat
abase i
s accur
ate.
Cent
ral
izedcont
roloft
hedat
ahel
psi
nper
mit
ti
ngt
headmi
nist
rat
ort
odef
ine
i
ntegr
it
yconst
rai
ntst
othedat
aint
hedat
abase.

 Secur
it
y:Havi
ngcompl
eteaut
hor
it
yovert
heoper
ati
onaldat
a,enabl
est
heDBA
i
nensur
ingt
hatt
heonl
ymeanofaccesst
othedat
abasei
sthr
oughpr
oper
channel
s.TheDBAcandef
ineaut
hor
izat
ioncheckst
obecar
ri
edoutwhenever
accesst
osensi
ti
vedat
aisat
tempt
ed.

 Dat
a Consi
stency:By el
imi
nat
ing dat
aredundancy,we gr
eat
lyr
educe t
he
oppor
tuni
ti
esf
ori
nconsi
stency.Forexampl
e:i
sacust
omeraddr
essi
sst
ored
onl
yonce,wecannothavedi
sagr
eementont
hest
oredval
ues.Al
soupdat
ing
dat
aval
uesi
sgr
eat
lysi
mpl
if
iedwheneachval
uei
sst
oredi
nonepl
aceonl
y.
Fi
nal
ly,
weavoi
dthewast
edst
oraget
hatr
esul
tsf
rom r
edundantdat
ast
orage.

 Ef
fi
cientDat
aAccess:I
nadat
abasesyst
em,t
hedat
aismanagedbyt
heDBMS
andal
laccesst
othedat
aist
hrought
heDBMSpr
ovi
dingakeyt
oef
fect
ivedat
a
pr
ocessi
ng

 Enf
orcement
sofSt
andar
ds:Wi
tht
hecent
ral
izedofdat
a,DBAcanest
abl
ishand
enf
orcet
hedat
ast
andar
dswhi
chmayi
ncl
udet
henami
ngconvent
ions,dat
a
qual
it
yst
andar
dset
c.

 Dat
aIndependence:I
nadat
abasesyst
em,t
hedat
abasemanagementsyst
em
pr
ovi
dest
hei
nter
facebet
weent
heappl
icat
ionpr
ogr
amsandt
hedat
a.When
changesar
emadet
othedat
arepr
esent
ati
on,t
hemet
adat
aobt
ainedbyt
he
DBMSi
schangedbutt
heDBMSi
scont
inuest
opr
ovi
det
hedat
atoappl
icat
ion
pr
ogr
am i
nthe pr
evi
ousl
y used way
.The DBMs handl
es t
he t
ask of
t
ransf
ormat
ionofdat
awher
evernecessar
y.

 Reduced Appl
icat
ion Devel
opmentand Mai
ntenance Ti
me:DBMS suppor
ts
manyi
mpor
tantf
unct
ionst
hatar
ecommont
omanyappl
icat
ions,accessi
ng
dat
ast
oredi
ntheDBMS,
whi
chf
aci
li
tat
est
hequi
ckdevel
opmentofappl
icat
ion.

14
5.Whatar etheBasi
crequi
rement
sofarel
ati
onaldat
abase?
Ar
elat
ionaldat
abaseisat ypeofdatabasethatstor
esand or
gani
zesdat
aina
col
lect
ionoft
abl
es.Theset
abl
esar
erel
atedt
oeachot
hert
hrought
heuseofa
common f
iel
d known as a pr
imar
ykey.Rel
ati
onaldat
abases ar
e used t
o st
ore,
or
gani
zeandr
etr
ievedat
aqui
ckl
yandef
fi
cient
ly.Theyar
ethemostcommont
ypeof
dat
abaseusedi
nbusi
nessappl
icat
ions.
Ther
elat
ionaldat
amodeli
mposessever
alr
equi
rement
sont
hest
ruct
ureoft
abl
es.The
setoft
abl
esf
oll
owst
heseconst
rai
nts,r
epr
esent
ing a wel
l-
str
uct
ure(
nor
mal
ized)
dat
abase.
1.Ever
ycol
umni
nar
owmustbesi
ngl
eval
ued.
I
nrel
ati
onaldat
abaset
her
eisone,
andonl
yone,
val
uei
nanygi
vencel
l
.
•I
nthest
udentt
abl
e,youcoul
dn’
thaveanat
tr
ibut
enamed“
PhoneNumber
”ifa
st
udentcoul
dhavemul
ti
plephonenumber
s.
•Ther
emi
ghtbeanat
tr
ibut
enamed“
localphonenumber
”andanat
tr
ibut
enamed

per
manentphonenumber
.”
•Youcoul
dnothaveanat
tr
ibut
enamed“
Class”i
nthest
udentt
abl
e,becausea
st
udentcoul
dtakemul
ti
plecl
asses.
2.Pr
imar
ykeycannotbenul
l
Thepr
imar
ykeyi
stheat
tr
ibut
e,orcombi
nat
ionofat
tr
ibut
es,t
hatuni
quel
yident
if
iesa
speci
fi
crow i
nat
abl
e.Fort
hist
obet
rue,t
hepr
imar
ykeyofanyr
ow i
nar
elat
ion
cannotbenul
l(bl
ank)
,fort
hent
her
ewoul
dbenowayt
ouni
quel
yident
if
ythatr
owand
r
etr
ievet
hedat
ast
oredt
her
e.Anon-
nul
lval
uef
ort
hepr
imar
ykeyi
ndi
cat
est
hata
speci
fi
cobj
ectexi
stsandcanbei
dent
if
iedbyr
efer
encet
oit
spr
imar
ykeyval
ue.Thi
sis
r
efer
redt
oast
heent
it
yint
egr
it
yrul
e;becausei
tensur
est
hatever
yrow i
never
y
r
elat
ionmustr
epr
esentdat
aaboutsomespeci
fi
cobj
ecti
nther
ealwor
ld.Forexampl
e,
i
n sal
es-
invent
oryt
abl
ether
eisno si
ngl
efi
eldt
hatuni
quel
yident
if
ieseach r
ow.
However
,theSal
esI
nvoi
ce#andI
tem #,
takent
oget
her
,douni
quel
yident
if
yeachr
ow.
Ther
efor
e,bot
hat
tr
ibut
esar
ecombi
nedt
ofor
mthepr
imar
ykey.Forexampl
e,

STUDENTS

15
St
udentI
D LastName Fi
rstName Phone
Number
333-
33-
3333 Samson Al
emu +251-
913-
666-
666
111-
11-
1111 Bel
ay Gi
rma +251-
912-
444-
444
123-
45-
6789 Ti
l
ahun Mer
on +251-
921-
555-
555

COURSES
Cour
seI
D Cour
se Sect
ion Day Ti
me
1234 ACCT-
3603 1 M,
W,F 8:
30
1235 ACCT-
3603 2 T,
Thu 9:
30
1236 MGMT-
2103 1 M,
W 7:
30

STUDENTXCOURSE( SCI
D)
333333333-
1234
333333333-
1236
333333333-
1235
333333333-
1236

• Not
ethatwi
thi
neacht
abl
e,t
her
ear
enodupl
icat
epr
imar
ykeysandnonul
lpr
imar
y
key
s.
• Consi
stentwi
tht
heent
it
yint
egr
it
yrul
e.
3.For
eignkeys,
ifnotnul
l,
musthaveval
uest
hatcor
respondt
otheval
ueofapr
imar
y
keyi
nanot
hert
abl
e.
For
eignkeysar
eusedt
oli
nkr
owsi
nonet
abl
etor
owsi
nanot
hert
abl
e.Forexampl
e,
t
heCust
omer#i
saf
orei
gnkeyi
nthesal
est
abl
eandl
inkseachsal
est
ransact
ionwi
th
cust
omerwhopar
ti
cipat
edi
nthatevent
.Thi
sisonl
ypossi
ble,
however
,ift
hecust
omer
numberval
uesi
nthesal
est
abl
ecor
respond t
o act
ualcust
omernumber
sint
he
cust
omert
abl
e.Thi
sconst
rai
nti
sref
err
edt her
oast efer
ent
iali
ntegr
it
yrul
ebecausei
t
ensur
es t
he consi
stencyoft
he dat
abase.For
eign keys can cont
ain nul
lval
ues,
however
.Forexampl
e,somecust
omer
spaycashandf
orpr
ivacyr
easonsdonotwant
t
ogi
vecompanyanywayt
oident
if
yandt
rackt
hem.Ther
efor
e,f
orsuchcashsal
es,
the
Cust
omer#f
iel
dint
hesal
est
abl
ewoul
dbebl
ank.

16
Forex
ampl
e,
STUDENTS
St
udentI
D LastName Fi
rstName Phone Adv
isor
Number Number
333-
33-
3333 Si
mpson Al
i
ce 333-
3333 1418
111-
11-
1111 Sander
s Ned 444-
4444 1418
123-
45-
6789 Moor
e Ar
ti
e 555-
5555 1503

ADVI
SORS
Adv
isor LastName Fi
rstName Of
fi
ce
Number Number
1418 Howar
d Gl
en 420
1419 Mel
ton Amy 316
1503 Zhang Xi 202
1506 Radowski J.
D. 203

Advi
sorNumberi
saf
orei
gnkeyi
ntheSTUDENTSt
abl
e.Ever
yinci
dentofAdvi
sor
Numberi
ntheSTUDENTSt
abl
eei
thermat
chesani
nst
anceoft
hepr
imar
ykeyi
nthe
ADVI
SORSt
abl
eori
snul
l.
4.Al
lnon-
keyat
tr
ibut
esi
nat
abl
eshoul
ddescr
ibeachar
act
eri
sti
caboutt
heobj
ect
i
dent
if
iedbyt
hepr
imar
ykey.
Mostt
abl
escont
ainot
herat
tr
ibut
esi
naddi
ti
ont
opr
imar
yandf
orei
gnkeys.Consi
der
t
hesal
est
abl
e.Sal
esI
nvoi
ce#i
sthepr
imar
ykey.Bot
hCust
omer#andSal
esper
son
ar
efor
eignkeys,
alt
hought
hesal
esper
sont
abl
eisnotshown.Ther
emai
ningat
tr
ibut
es,
(
dat
eandsal
esamount
)ar
eot
heri
mpor
tantf
act
saboutt
hesal
esevent
.Det
ail
sabout
t
hecust
omerorsal
esper
sonwhopar
ti
cipat
edi
nthatt
ransact
ion,oraboutt
hei
tems
pur
chase,
however
,ar
est
oredi
nthoset
abl
es,
noti
nthesal
est
abl
e.
dnat
• Coul ional
it
ybeanon-
keyat
tr
ibut
eint
hest
udentt
abl
e?
dadvi
• Coul sor
’snat
ional
it
ybeanon-
keyat
tr
ibut
eint
hest
udentt
abl
e?
Thesef
ourconst
rai
ntspr
oduceawel
l-
str
uct
ured(
nor
mal
ized)dat
abasei
nwhi
chdat
a

17
e consi
ar stentand r
edundancy i
s mi
nimi
zed and cont
rol
led.Fi
rst
,not
ice t
hat
r
edundancyi
sgr
eat
lyr
educed.Forexampl
e,al
lnon-
keyat
tr
ibut
es,suchascust
omer
addr
essesanduni
tpr
ices,ar
est
oredj
ustonce.Thi
savoi
dst
hepot
ent
ialofupdat
e
anomal
ypr
obl
ems.Not
ethatr
edundancyi
snotent
ir
elyel
imi
nat
ed.Cer
tai
nit
ems,
such
asSal
esI
nvoi
ce#andI
tem #,
appeari
nmor
ethanonet
abl
e.Theseat
tr
ibut
esappear
mor
ethanonce(
mul
ti
plet
imes)onl
ywhent
heyf
unct
ionasf
orei
gnkeys,however
.
Consequent
ly,t
he r
efer
ent
iali
ntegr
it
yrul
e ensur
es t
hatt
her
e wi
llbe no updat
e
anomal
ypr
obl
emswi
tht
hef
orei
gnkeys.
Thesef
ourconst
rai
ntspr
oduceawel
l-
str
uct
ured(
nor
mal
ized)dat
abasei
nwhi
chdat
a
ar
econsi
stentandr
edundancyi
smi
nimi
zedandcont
rol
led.

18

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy