‘Moder
n’D
atab
ases
Dat
abas
e Sys
tem
s Le
cture
18
Nat
asha
Ale
chin
a
'Moder
n' D
atab
ases
In T
his
Lec
ture
•'M
oder
n' D
atab
ases
•D
istr
ibute
d D
Bs
•W
eb-b
ased
DBs
•O
bje
ct O
rien
ted D
Bs
•Sem
istr
uct
ure
d D
ata
and X
ML
•M
ultim
edia
DBs
•Fo
r m
ore
info
rmat
ion
•Connolly
and B
egg
chap
ters
22-2
8•
Ullm
anan
d W
idom
chap
ter
4
'Moder
n' D
atab
ases
Oth
er S
ort
s of
DB
•W
e hav
e lo
oke
d
mai
nly
at
rela
tional
dat
abas
es•
Rel
atio
nal
model
•SQ
L•
Des
ign t
echniq
ues
•Tra
nsa
ctio
ns
•M
any
of
thes
e to
pic
s re
lied o
n r
elat
ional
co
nce
pts
•Ther
e ar
e se
vera
l oth
er t
ypes
of
DB in
use
today
•D
istr
ibute
d D
Bs
•O
bje
ct D
Bs
•M
ultim
edia
DBs
•Tem
pora
l D
Bs
•Lo
gic
DBs
'Moder
n' D
atab
ases
Dis
trib
ute
d D
atab
ases
•A d
istr
ibute
d D
B
syst
em c
onsi
sts
of
seve
ral si
tes
•Sites
are
connec
ted
by
a net
work
•Eac
h s
ite
can h
old
dat
a an
d p
roce
ss it
•It
should
n’t m
atte
r w
her
e th
e dat
a is
-th
e sy
stem
is
a si
ngle
en
tity
•D
istr
ibute
d d
atab
ase
man
agem
ent
syst
em
(DD
BM
S)
•A D
BM
S (
or
set
of
them
) to
contr
ol th
e dat
abas
es•
Com
munic
atio
n
soft
war
e to
han
dle
in
tera
ctio
n b
etw
een
site
s
'Moder
n' D
atab
ases
Clie
nt/
Ser
ver
Arc
hitec
ture
•The
clie
nt/
serv
er
arch
itec
ture
is
a gen
eral
model
for
syst
ems
wher
e a
serv
ice
is p
rovi
ded
by
one
syst
em (
the
serv
er)
to a
noth
er
(the
clie
nt)
•Ser
ver
•H
ost
s th
e D
BM
S a
nd
dat
abas
e•
Sto
res
the
dat
a
•Clie
nt
•U
ser
pro
gra
ms
that
use
the
dat
abas
e•
Use
the
serv
er for
dat
abas
e ac
cess
'Moder
n' D
atab
ases
Dis
trib
ute
d D
atab
ases
Net
wor
kC
lient
(s)
Ser
ver
Clie
nt(s
)S
erve
r
Clie
nt(s
)S
erve
r
Clie
nt(s
)S
erve
r
Clie
nt(s
)S
erve
r
'Moder
n' D
atab
ases
Web
-bas
ed D
atab
ases
•D
atab
ase
acce
ss
ove
r th
e in
tern
et•
Web
-bas
ed c
lients
•W
eb s
erve
r•
Dat
abas
e se
rver
(s)
•W
eb s
erve
r se
rves
pag
es t
o b
row
sers
(c
lients
) an
d c
an
acce
ss d
atab
ase(
s)
•Typ
ical
oper
atio
n•
Clie
nt
sends
a re
ques
t fo
r a
pag
e to
the
web
se
rver
•W
eb s
erve
r se
nds
SQ
L to
dat
abas
e•
The
web
ser
ver
use
s re
sults
to c
reat
e pag
e•
The
pag
e is
ret
urn
ed t
o
the
clie
nt
'Moder
n' D
atab
ases
Web
-bas
ed D
atab
ases
Clie
nt(B
row
ser)
Web
S
erve
r
Dat
abas
eS
erve
r
HTT
P re
ques
t
SQ
L qu
ery
SQ
L re
sult
HTM
L pa
ge
'Moder
n' D
atab
ases
Web
-bas
ed D
atab
ases
•Adva
nta
ges
•W
orld-w
ide
acce
ss•
Inte
rnet
pro
toco
ls
(HTTP,
SSL,
etc
) giv
e uniform
acc
ess
and
secu
rity
•D
atab
ase
stru
cture
is
hid
den
fro
m c
lients
•U
ses
a fa
mili
ar
inte
rfac
e
•D
isad
vanta
ges
•Sec
urity
can
be
a pro
ble
m if
you a
re n
ot
care
ful
•In
terf
ace
is les
s flex
ible
usi
ng
stan
dar
d b
row
sers
•Li
mited
inte
ract
ivity
ove
r sl
ow
connec
tions
'Moder
n' D
atab
ases
Obje
ct O
rien
ted D
atab
ases
•Rel
atio
nal
DBs
•The
dat
abas
e ca
n’t
see
dat
a’s
inte
rnal
st
ruct
ure
so c
an’t u
se
com
ple
x dat
a•
Rel
atio
nal
model
giv
es
a si
mple
, an
d q
uite
pow
erfu
l, s
truct
ure
-but
is q
uite
rigid
•O
bje
ct O
rien
ted D
Bs
•U
se c
once
pts
fro
m
obje
ct o
rien
ted
des
ign/p
rogra
mm
ing
•O
O c
once
pts
•Enca
psu
lation
•In
her
itan
ce•
Poly
moprh
ism
•O
OD
BM
S
'Moder
n' D
atab
ases
Obje
ct O
rien
ted D
atab
ases
•An o
bje
ct o
rien
ted
dat
abas
e (O
OD
B)
is
a co
llect
ion o
f per
sist
ent
obje
cts
•O
bje
cts
-in
stan
ces
of
a def
ined
cla
ss•
Per
sist
ent
-obje
ct
exis
t in
dep
enden
tly
of
any
pro
gra
m
•An o
bje
ct o
rien
ted
DBM
S•
Man
ages
a c
olle
ctio
n
of obje
cts
•Allo
ws
obje
cts
to b
e m
ade
per
sist
ent
•Per
mits
quer
ies
to b
e m
ade
of th
e obje
cts
•D
oes
all
the
norm
al
DBM
S t
hin
gs
as w
ell
'Moder
n' D
atab
ases
OO
DB e
xam
ple
•In
lec
ture
10 w
e had
a
store
with d
iffe
rent
sort
s of
pro
duct
s•
Books
•CD
s•
DVD
s
•This
lea
d t
o m
issi
ng
dat
a am
ong t
he
various
types
•O
OD
B s
olu
tion
•W
e m
ake
an a
bst
ract
Pr
oduct
cla
ss•
Book,
CD
, an
d D
VD
ar
e ea
ch a
concr
ete
subcl
ass
of Pr
oduct
•The
dat
abase
is
a per
sist
ent
colle
ctio
n o
f Pr
oduct
s
'Moder
n' D
atab
ases
OO
DB E
xam
ple
•Pr
oduct
is
abst
ract
•You c
annot
mak
e a
Product
direc
tly
•You c
an,
how
ever
, m
ake
a Book,
CD
, or
DVD
, an
d t
hes
e ar
e Pr
oduct
s
Pro
duct
Boo
kC
DD
VD
Pric
eTi
tleSh
ippi
ng
Aut
hor
Publ
ishe
rA
rtist
Prod
ucer
Dire
ctor
'Moder
n' D
atab
ases
Obje
ct O
rien
ted D
atab
ases
•Adva
nta
ges
•G
ood inte
gra
tion w
ith
Java
, C+
+,
etc
•Can
sto
re c
om
ple
x in
form
atio
n•
Fast
to r
ecove
r w
hole
obje
cts
•H
as t
he
adva
nta
ges
of
the
(fam
iliar
) obje
ct
par
adig
m
•D
isad
vanta
ges
•Ther
e is
no u
nder
lyin
g
theo
ry t
o m
atch
the
rela
tional
model
•Can
be
more
com
ple
x an
d les
s ef
fici
ent
•O
OD
B q
uer
ies
tend t
o
be
pro
cedura
l, u
nlik
e SQ
L
'Moder
n' D
atab
ases
Obje
ct R
elat
ional
Dat
abas
es
•Ext
end a
RD
BM
S
with o
bje
ct c
once
pts
•D
ata
valu
es c
an b
e obje
cts
of ar
bitra
ry
com
ple
xity
•Thes
e obje
cts
hav
e in
her
itan
ce e
tc.
•You c
an q
uer
y th
e obje
cts
as w
ell as
the
table
s
•An o
bje
ct r
elat
ional
dat
abas
e•
Ret
ains
most
of th
e st
ruct
ure
of th
e re
lational
model
•N
eeds
exte
nsi
ons
to
quer
y la
nguag
es (
SQ
L or
rela
tional
alg
ebra
)
'Moder
n' D
atab
ases
Sem
istr
uct
ure
d d
ata
•Sem
istr
uct
ure
d D
ata
: A n
ew d
ata
model
des
igned
to c
ope
with p
roble
ms
of
info
rmat
ion inte
gra
tion.
•XM
L :
A s
tandar
d lan
guag
e fo
r des
crib
ing
sem
istr
uct
ure
d d
ata
schem
as a
nd
repre
senting d
ata.
'Moder
n' D
atab
ases
The
Info
rmat
ion-I
nte
gra
tion
Proble
m
•Rel
ated
dat
a ex
ists
in m
any
pla
ces
and c
ould
, in
princi
ple
, w
ork
toget
her
.•
But
diffe
rent
dat
abas
es d
iffe
r in
:•
Model
(re
lational
, obje
ct-o
rien
ted?)
.•
Sch
ema
(norm
alis
ed/
not
norm
aliz
ed?)
.•
Ter
min
olo
gy:
are
consu
ltan
ts e
mplo
yees
?
Ret
iree
s? Subco
ntr
acto
rs?
•Conve
ntions
(met
ers
vers
us
feet
?).
•H
ow
do w
e m
odel
info
rmat
ion r
esid
ing in
het
erogen
eous
sourc
es (
if w
e ca
nnot
com
bin
e it a
ll in
a
single
new
dat
abas
e)?
'Moder
n' D
atab
ases
Exa
mple
•Suppose
we
are
inte
gra
ting info
rmat
ion a
bout
bar
s in
so
me
tow
n.
•Eve
ry b
ar h
as a
dat
abas
e.•
One
may
use
a r
elat
ional
DBM
S;
anoth
er k
eeps
the
men
u in a
n M
S-W
ord
docu
men
t.•
One
store
s th
e phones
of dis
trib
uto
rs,
anoth
er d
oes
not.
•O
ne
dis
tinguis
hes
ale
s fr
om
oth
er b
eers
, an
oth
er
does
n’t.
•O
ne
counts
bee
r in
vento
ry b
y bott
les,
anoth
er b
y ca
ses.
'Moder
n' D
atab
ases
Sem
istr
uct
ure
d D
ata
•Pu
rpose
: re
pre
sent
dat
a fr
om
indep
enden
t so
urc
es
more
fle
xibly
than
either
rel
atio
nal
or
obje
ct-o
rien
ted
model
s.•
Thin
k of obje
cts,
but
with t
he
type
of ea
ch o
bje
ct its
ow
n b
usi
nes
s, n
ot
that
of its
“cla
ss.”
•La
bel
s to
indic
ate
mea
nin
g o
f su
bst
ruct
ure
s.•
Dat
a is
sel
f-des
crib
ing:
stru
ctura
l in
form
atio
n is
par
t of
the
dat
a.
'Moder
n' D
atab
ases
Gra
phs
of
Sem
istr
uct
ure
d
Dat
a•
Nodes
= o
bje
cts.
•La
bel
s on a
rcs
(att
ribute
s, r
elat
ionsh
ips)
.•
Ato
mic
val
ues
at
leaf
nodes
(nodes
with n
o a
rcs
out)
.•
Flex
ibili
ty:
no r
estr
iction o
n:
•La
bel
s out
of a
node.
•N
um
ber
of su
cces
sors
with a
giv
en lab
el.
'Moder
n' D
atab
ases
Exa
mple
: D
ata
Gra
ph
Bud
A.B.
Gol
d19
95
Map
leJo
e’s
M’lo
b
beer
beer
bar
man
fm
anf
serv
edAt
nam
e
nam
ena
me
addr
priz
e
year
awar
d
root
The
bar
obje
ctfo
r Jo
e’s
Bar
The
beer
obj
ect
for
Bud
Not
ice
ane
w k
ind
of d
ata.
'Moder
n' D
atab
ases
XM
L
•XM
L =
Exte
nsi
ble
Mar
kup L
anguag
e.•
While
HTM
L use
s ta
gs
for
form
atting (
e.g.,
“ital
ic”)
, XM
L use
s ta
gs
for
sem
antics
(e.
g.,
“th
is is
an a
ddre
ss”)
.•
Key
idea
: cr
eate
tag
set
s fo
r a
dom
ain (
e.g.,
bar
s),
and
tran
slat
e al
l dat
a in
to p
roper
ly t
agged
XM
L docu
men
ts.
•W
ell fo
rmed
XM
L -
XM
L w
hic
h is
synta
ctic
ally
corr
ect;
ta
gs
and t
hei
r nes
ting t
ota
lly a
rbitra
ry.
•Val
id X
ML
-XM
L w
hic
h h
as D
TD
(docu
men
t ty
pe
def
initio
n);
im
pose
s so
me
stru
cture
on t
he
tags,
but
much
more
fle
xible
than
rel
atio
nal
dat
abas
e sc
hem
a.
'Moder
n' D
atab
ases
XM
L an
d S
emis
truct
ure
d
Dat
a•
Wel
l-Fo
rmed
XM
L w
ith n
este
d t
ags
is e
xact
ly t
he
sam
e id
ea a
s tr
ees
of se
mis
truct
ure
d d
ata.
•XM
L al
so e
nab
les
non-t
ree
stru
cture
s (w
ith r
efer
ence
s to
ID
s of nodes
), a
s does
the
sem
istr
uct
ure
d d
ata
model
.
'Moder
n' D
atab
ases
Exa
mple
: W
ell-
Form
ed X
ML
<?
XM
L VERSIO
N =
“1.0
”STAN
DALO
NE =
“ye
s”?>
<BARS>
<BAR>
<N
AM
E>
Joe’
s Bar
</N
AM
E>
<BEER>
<N
AM
E>
Bud<
/NAM
E>
<PRIC
E>
2.5
0<
/PRIC
E>
</B
EER>
<BEER>
<N
AM
E>
Mill
er<
/NAM
E>
<PRIC
E>
3.0
0<
/PRIC
E>
</B
EER>
</B
AR>
<BAR>
…<
/BARS>
'Moder
n' D
atab
ases
Exa
mple
•The
<BARS>
XM
L docu
men
t is
:
Joe’
s Ba
r
Bud
2.50
Mill
er3.
00
PRIC
E
BAR
BAR
BARS
NAM
E. .
.
BAR
PRIC
EN
AME
BEER
BEER
NAM
E
'Moder
n' D
atab
ases
XPA
TH
and X
QU
ERY
•XPA
TH
is
a la
nguag
e fo
r des
crib
ing p
aths
in X
ML
docu
men
ts.
•Rea
lly t
hin
k of th
e se
mis
truct
ure
d d
ata
gra
ph a
nd its
pat
hs.
•W
hy
do w
e nee
d p
ath d
escr
iption lan
guag
e: c
an’t g
et
at t
he
dat
a usi
ng just
Rel
atio
n.A
ttribute
expre
ssio
ns.
•XQ
UERY is
a fu
ll quer
y la
nguag
e fo
r XM
L docu
men
ts
with p
ow
er s
imila
r to
OQ
L (O
bje
ct Q
uer
y La
nguag
e,
quer
y la
nguag
e fo
r obje
ct-o
rien
ted d
atab
ases
).
'Moder
n' D
atab
ases
Multim
edia
Dat
abas
es
•M
ultim
edia
DBs
can
store
com
ple
x in
form
atio
n•
Images
•M
usi
c an
d a
udio
•Vid
eo a
nd a
nim
atio
n•
Full
text
s of books
•W
eb p
ages
•They
can
be
use
d in
a w
ide
range
of
applic
atio
n a
reas
•Ente
rtai
nm
ent
•M
arke
ting
•M
edic
al im
agin
g•
Dig
ital
publis
hin
g•
Geo
gra
phic
In
form
atio
n S
yste
ms
'Moder
n' D
atab
ases
Quer
ying M
ultim
edia
DBs
•M
etad
ata
sear
ches
•In
form
atio
n a
bout
the
multim
edia
dat
a (m
etad
ata)
is
store
d•
This
can
be
kept
in a
st
andar
d r
elat
ional
dat
abas
e an
d q
uer
ied
norm
ally
•
Lim
ited
by
the
amount
of m
etad
ata
avai
lable
•Conte
nt
sear
ches
•The
multim
edia
dat
a is
sea
rched
direc
tly
•Po
tential
for
much
m
ore
fle
xible
sea
rch
•D
epen
ds
on t
he
type
of dat
a bei
ng u
sed
•O
ften
difficu
lt t
o
det
erm
ine
what
the
‘corr
ect’
resu
lts
are
'Moder
n' D
atab
ases
Met
adat
a Sea
rches
•Exa
mple
-in
dex
ing
film
s w
e m
ight
store
•Title
•Yea
r•
Gen
re(s
)•
Act
or(
s)•
Direc
tor(
s)•
Pro
duce
r(s)
•W
e ca
n t
hen
sea
rch
for
thin
gs
like
•Fi
lms
star
ring K
evin
Spac
ey•
Film
s direc
ted b
y Pe
ter
Jack
son
•D
ram
as p
roduce
d in
2000
•W
e don’t a
ctual
ly
sear
ch t
he
film
s
'Moder
n' D
atab
ases
Met
adat
a Sea
rches
•Adva
nta
ges
•M
etad
ata
can b
e st
ruct
ure
d in a
tr
aditio
nal
DBM
S•
Met
adat
a is
gen
eral
ly
conci
se a
nd s
o
effici
ent
to s
tore
•M
etad
ata
enrich
es t
he
conte
nt
•D
isad
vanta
ges
•M
etad
ata
can’t a
lway
s be
found
auto
mat
ical
ly,
and s
o
requires
dat
a en
try
•It
res
tric
ts t
he
sort
s of
quer
ies
that
can
be
mad
e
'Moder
n' D
atab
ases
Conte
nt
Sea
rches
•An a
lter
nat
ive
to
met
adat
a is
to
sear
ch t
he
conte
nt
direc
tly
•M
ultim
edia
is
less
st
ruct
ure
d t
han
m
etad
ata
•It
is
a rich
er s
ourc
e of
info
rmat
ion b
ut
har
der
to p
roce
ss
•Exa
mple
of
conte
nt
bas
ed r
etriev
al•
Find im
ages
sim
ilar
to
a giv
en s
ample
•H
um
a t
une
and fin
d
out
what
it
is•
Sea
rch for
feat
ure
s,
such
as
cuts
or
tran
sitions
in film
s
'Moder
n' D
atab
ases
Conte
nt-
Bas
ed R
etriev
al
QB
IC™
(Que
ry B
y Im
age
Con
tent
)fro
m IB
M -
sear
ches
for i
mag
es
havi
ng s
imila
r col
our o
r lay
out
http
://w
ww
qbic
.alm
aden
.ibm
.com
/cgi
-bin
/sta
mps
-dem
o
'Moder
n' D
atab
ases
Conte
nt-
Bas
ed R
etriev
al
•Im
age
retr
ieva
l is
har
d•
It is
oft
en n
ot
clea
r w
hen
tw
o im
ages
are
‘s
imila
r’•
Imag
e in
terp
reta
tion
is u
nso
lved
and
expen
sive
•D
iffe
rent
peo
ple
ex
pec
t diffe
rent
thin
gs
•D
o w
e lo
ok
for?
•Im
ages
of ro
ses
•Im
ages
of re
d t
hin
gs?
•Im
ages
of flow
ers?
•Im
ages
of re
d flo
wer
s?•
Imag
es o
f re
d r
ose
s?
'Moder
n' D
atab
asesOth
er T
opic
s
•Tem
pora
l D
Bs
•Sto
ring d
ata
that
ch
anges
ove
r tim
e•
Can
ask
about
the
his
tory
of th
e D
B
rath
er t
han
just
the
curr
ent
stat
e•
Sys
tem
tim
e vs
rea
l tim
e
•Lo
gic
DBs
•A d
atab
ase
is a
set
of
fact
s an
d r
ule
s fo
r m
anip
ula
ting t
hem
(l
ike
a Pr
olo
gpro
gra
m)
•The
DBM
S m
ainta
ins
and c
ontr
ols
thes
e fa
cts
and r
ule
s•
A ‘quer
y’is
mad
e by
apply
ing t
he
rule
s to
th
e fa
cts
'Moder
n' D
atab
asesN
ext
wee
k
•W
ednes
day
12-1
: Rev
isio
n a
nd m
odule
ev
aluat
ion lec
ture
•If
you h
ave
sugges
tions
for
revi
sion
ques
tions,
ple
ase
emai
l m
e!•
Monday
the
28th
9-1
0:
Java
and S
QL
lect
ure
(optional
–not
in t
he
exam
)