purchase - Binus Repository

Download Report

Transcript purchase - Binus Repository

Matakuliah
Tahun
Versi
: M0184 / Pengolahan Data Distribusi
: 2005
:
Session – 8
DATA HANDLING – DISTRIBUTION AND
TRANSFORMATION
OBJECTIVES
• Integration of heterogeneous database systems
• Relational database
• Processing relational queries against the
network database
Semantic Approach to the Problem
• Optimizing the placement and allocation
data without considering the requirements
of any quantitative cost model directly
• The goal : to split a global database up
into fragments to maximize the efficiency
of query execution
Aggregation
Relationship between entities is
represented as a higher level object.
For Example :
An “Appointment” entity could be used
to represent a relationship between a
Patient, a Doctor and a Clinic.
Generalization
A set of similar entities is consider to be a
single generic entity
For Example :
A “Person” object could be generalization as
a Doctor, a Patient and Nurse entities
Restrictions
To obtain a subset of interest give another
abstracting mechanism
For example :
The set “Patient” in the Orthopedic
department could form an object called
“orthopedic patients”
Semantic Approach to the Problem
Cont’d
• Each local data model is defined by the
corresponding DDL and DML semantic
• To integrate pre-existing heterogeneous
database special method of mapping
between different data model are needed
• We should ideally be able to access all of
local data via the global model
Getting a relational schema
equivalent to network schema
• To use relational model, we usually need to
provide relational views of the local.
• Four source of data in a network schema
which have to be used when getting relational :
1. The record and data item description
2. The associations between owners and
members of set types
3. The “duplicates not allowed” location mode for
record types
4. The “duplicates not allowed” declaration for set
types
Processing Relational Query
CUSTOMER
CID
CUST - PUR
Date
CName
Price
Address
Qty
Main-Purchase
Tot-Purchase
PURCHASE
SALESMAN
SID
Sname
Office
Salary
SALE - PUR
Processing Relational Query
• CUSTOMER : CID, Cname, Address,
Main-Purchase, Tot-Purchase
Key : CID
• SALESMAN : SID, SName, Office, Salary
Key : SID
• PURCHASE : CID, SID, Date, Price, Qty
Key : CID,SID
Foreign Key : CID, SID
Processing Relational Query
SELECT SName, Office
FROM CUSTOMER, SALESMAN, PURCHASE
WHERE (Address = “Jakarta”) AND
(Main-Purchase = “Lemari”) AND
(PURCHASE .CID = CUSTOMER.CID)
AND
(PURCHASE .SID = SALESMAN.SID)