Академический Документы
Профессиональный Документы
Культура Документы
Terstruktur
Kelas
2A-2K
Tim
Dosen
Yunarso
Anang,
Sihar
Lumban
Tobing,
I.R.
Tandjung,
What
is
a
Database
A
database
may
be
dened
as
a
collecFon
of
persistent
data
Persistent
means
the
data
has
a
more-or-less
independent
existence
or
that
is
semipermanent
E.g.
Data
stored
in
ling
cabinet,
magneFcally
or
opFcally
stored
on
a
hard
disk
or
CD-ROM
is
persistent
The
purpose
is
to
store
informaFon
about
certain
types
of
objects,
which
is
called
en)ty(ies)
in
database
languange
E.g.
books,
authors,
publishers,
students,
lecturers,
courses
AHributes
EnFFes
possess
certain
properFes,
which
are
called
aSributes
The
enFty
class
may
has
the
same,
all
aSributes
of
the
enFFes
(depend
on
the
database
designer)
Purpose
of
an
aSribute
To
include
informaFon
in
the
database
E.g.
we
want
to
know
what
Ftle
of
each
book,
so
we
include
the
Title
aSribute
To
help
uniquely
idenFfy
individual
enFFes
within
an
enFty
class
E.g.
we
may
wish
to
include
publisher's
ID-number
aSribute
for
the
Publishers
enFty
class
Are
used
to
describe
relaFonships
between
the
enFFes
in
dierent
enFty
classes
We
will
discuss
later..
E.g.
The
set
of
{ISBN}
in
the
Books
enFty
class,
the
set
of
{PubID}
and
{PubName,
PubPhone}
are
both
superkeys
for
the
Publishers
enFty
class
E.g.
See
the
set
of
{Titles}
in
the
sample
BOOKS
Keys
are
someFmes
called
candidate
keys,
since
it
is
usually
the
case
that
we
use
as
an
idenFers
A
key
may
contain
more
than
one
aSribute
An entityrelationship
diagram
E/R diagram
Many-to-many relaFonship
One-to-many relaFonship
E.g.
In
relaFonship
between
Books
and
Authors,
a
book
may
have
many
authors
and
an
author
may
write
many
books
E.g.
In
relaFonship
between
Publishers
and
Books,
one
publisher
may
publish
many
books,
but
a
book
may
only
be
published
by
at
most
one
publisher
(assumed)
One-to-one relaFonship
The
enFFes
The
enFty
classes
The
enFty
sets
The
relaFonships
between
the
enFty
classes
ImplemenDng EnDDes
ImplemenDng
EnDDes
Con)nued
The
rst
row
of
the
table
is
the
table
scheme
for
the
enFty
class
Each
of
the
other
rows
of
the
table
implements
an
enFty
The
set
of
all
rows
of
the
table,
except
the
rst
row,
implements
the
enFty
set
Concept
of
a
Table
Each
column
is
labeled
with
a
disFnct
a8ribute
name
Ai,
or
is
also
called
column
heading
The
elements
of
a
column
is
called
the
domain
for
that
column
No
two
rows
of
the
table
are
idenFcal
A
table
may
(but
not
required)
have
a
name,
e.g.
BOOKS
The
number
of
rows
is
called
the
size
of
the
table,
the
number
of
columns
is
called
the
degree
of
the
table
To
emphasize
the
aSributes
of
a
table,
denote
a
table
by
wriFng
T(A1,
A2,
,
An).
E.g.
BOOKS
(ISBN,
Title,
Price)
The
order
of
the
rows
of
a
table
is
not
important
Similarly,
the
order
of
columns
is
also
not
important
Dierent
columns
may
have
the
same
domain,
as
long
as
the
aSributes
are
dierent
Add
PubID
to
the
Books
enFty
class:
Books
(ISBN,
Title,
PubID,
Price)
The
Books
table
scheme
is
now
{ISBN,
Title,
PubID,
Price}
ReferenDal Integrity