Dbms
Dbms
aacollection
collectionofof application
application
programs
programs that
that perform
perform
services
servicesfor
for the
theend
endusers
users
such
suchasasthe
theproduction
productionofof
reports.
reports. Student
Courses
Faculty
Registrar File
enrollment
EAF
Data
Dataentry
entryof
of Data
Dataentry
entryof
of Generation
Generationof
of
courses
courses enrollment
enrollment EAF
EAF
Student
File-based system Courses
Faculty
Registrar
File
enrollment
EAF
Data
Dataentry
entryof Data
Each
Each program
program inin the
the
of Dataentry
entryof
of
courses
courses enrollment
enrollment system
system defines
defines and
and
manages
manages its
its own
own data.
data.
struct
structcourse
course [CBS98]
[CBS98]
{{char
charcode[5];
code[5];
char
chardesc[20];
desc[20];
int
intunits
units[3];
[3];
}}
Each
Eachuser
user(with
(withthe
theassistance
assistanceofof File-based
DP
DPstaff)
staff)defines
definesand
andimplements
(including
(includingstorage
storageand
implements
andcontrol)
control)the
the systems
files
filesneeded
neededfor foraaspecific
specific
application.
application.[CBS98,
[CBS98,EN94]
EN94]
Student
Registrar File Courses
Faculty
enrollment
EAF
Student
Accounting File Fees
payment of fees
OR
Dataredundancy
redundancy
Student System (File-based)
Student
Registrar File Courses
Faculty
enrollment
EAF
Student
Accounting File Fees
payment of fees
OR
Student
Registrar File Courses
Faculty
enrollment
EAF
Student
Accounting File Fees
payment of fees
OR
CC
Student
Accounting File Fees
payment of fees
OR
Student
Accounting File Fees
payment of fees
OR
DB
Site 4
Site 2
Computer
Network
Site 3
DB DB
DB
Motivation behind DDBMS
1. To integrate the operational data and
provide controlled access to the data.
– This may imply centralization but it is not
the intention
2. To adopt a decentralize approach to
data which mirrors the organizational
structure of many companies.
– Each unit maintains its own data.
– Data is stored proximate to the location
which would improve:
• Shareability of the data
• Efficiency of data access
Motivation behind DDBMS
3. To help resolve the islands of
information problem:
– Geographical separation
– Incompatible computer architectures
– Incompatible communication protocols
Why Distribute??
• Example: X Corp. has offices in London,
New York, and Hong Kong.
• Employee data:
– EMP(ENUM, NAME, TITLE, SALARY, …)
• Where should the employee data table
reside?
EMP
London
New York
Internet
Hong Kong
Payroll app NY and HK payroll
apps run very slowly!
Hong Kong
London
Emp NY
London
New York Emp
Internet
Hong Kong
Payroll app
Much better!!
Hong Kong
HK
Emp (example from Stanford University)
Fundamental principle of
DDBMS
• The DDBMS is expected to make the
distribution transparent (invisible) to the
user.
• The objective of transparency:
– To make the distributed system appear like
a centralized system.
Distributed Database System
Data
Data is
is spread
spread over
over multiple
multiple machines
machines (also
(also
referred toAas
referred to Distributed
as sites
sites or System
or nodes).
nodes).
The
The computers
computers maymay vary
vary in
in size
size and
and function
function
A Distributed System
Network
Network interconnects
interconnects the
the machines
machines
Database
Database is is stored
stored on
on several
several sites.
sites.
Data A Distributed System
Data is
is shared
shared byby users
users on
on multiple
multiple machines
machines
Account(actno, br-name, balance) Branch(br-name, br-city,assets)
Add
Add100
100to
toaccount
accountAki-01
Aki-01
Makati Local
Localtransaction:
transaction: IfIf Main
transaction
transactionis
isinitiated
initiated at
at
Makati network
Makatibranch
branch
Q.C. Manila
Makati Main
Global:
Global: ififtransaction
transactionisisinitiated
initiated
elsewhere
elsewhere network
Global
Global Transaction
TransactionExample:
Example:
transfer Manila
Q.C. transfer100100pesos
pesosfrom
fromaccount
account
Aki-01
Aki-01(Makati)
(Makati) to toaccount
accountAki-Aki-
100
100(Manila)
(Manila)
Makati Main
network