Transparency 222

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 27

Transparency

Supervised By
Dr. Jane Jaleel
By:
Ghazwan Khalid
Israa Shihab
Huda Wadah
Transparency
 what is transparency?

 It means that end-users see just the


pretty boxes on their screens and not
the inner workings of the database,
such as the tables, i.e : a transparent
system “hides” the implementation
details from users.
Transparency
 Q: Why do we need transparency?

 A: Without DDBMS transparency,


applications must be written using
special knowledge about the stored
data.
Transparency
 Advantage of Transparency?

 The advantage of a fully transparent


DBMS is the high level of support that it
provides for the development of
complex applications.
Type of Transparency
 Distribution Transparency
 Transaction Transparency
 Performance Transparency
 Heterogeneity Transparency
Distribution Transparency
 Idea: Users perceive the DB as a single,
unified entity.
 Types of Distribution Transparency
 Fragmentation
 Location
 Local-mapping
 Replication
 Naming
Distribution Transparency:
Fragmentation
 What is a fragment?
 Horizontal fragments
 Fragmented by SELECTION
 Composed by UNION
 Vertical fragments
 Fragmented by PROJECTION
 Composed by JOIN
Distribution Transparency:
Fragmentation
 Mixed/Hybrid fragments
 Horizontal  Vertical fragmentation
 Vertical  Horizontal fragmentation
 Derived (Horizontal) fragments
 Fragmenti  Fragmentj
 Fragmented by SEMIJOIN
Fragment Types
Distribution Transparency:
Fragmentation
o Idea: Tables can be fragmented to different
sites without user awareness
o Therefore, neither fragment names nor
fragment locations are specified prior to data
access . Therefore, It is the highest level of
transparency.
o Example1: The Database Supports Fragmentation Transparency – It
does not specify fragment names or locations.

SELECT name FROM EMPLOYEE


WHERE EMP_DOB < ’01-JAN-1940’;
Distribution Transparency:
Fragmentation Example
EMP # DEPT # SALARY
E1 DX 450$
Employee E2 DY 400$
E3 DZ 500$
E4 DY 630$
E5 DZ 400$ User Perception

New York fragment London fragment


EMP # DEPT # SALARY EMP # DEPT # SALARY
E1 DX 450$ E2 DY 400$
E3 DZ 500$ E4 DY 630$
E5 DZ 400$
Distribution Transparency:
Location
 Idea: Users don’t know where the data
is, but must specify fragment names
Distribution Transparency:
Location
 Suppose an employee wants to find all
employees with a birth date prior to Jan 1,
1940

 SELECT * FROM E1
WHERE EMP_BD < ’01-JAN-1940’
UNION
SELECT * FROM E2 …
UNION
SELECT * FROM E3…;
Distribution Transparency:
Local-mapping
 Idea: User needs to specify fragment
names and location of data items .
 Example: Suppose an employee wants to find all
employees with a birth date prior to Jan 1, 1940

 SELECT * FROM E1 NODE NY


WHERE EMP_BD < ’01-JAN-1940’
UNION
SELECT * FROM E2 NODE ATL …
UNION
SELECT * FROM E3 NODE Miami
Distribution Transparency
The use of various levels of
transparency:
Distribution Transparency:
Replication
 Idea: Objects can be copied, and copies
are maintained automatically and
without user knowledge.
 Replication provides user with fast,
access to shared data
 Even if one site becomes unavailable,
users can continue to query or even
update the remaining locations
Distribution Transparency:
Replication Example
EMP # DEPT # SALARY
Employee
E1 DX 450 $
E2 DY 400 $
E3 DZ 500 $
E4 DY 630 $ User Perception
E5 DZ 400 $

EMP # DEPT # SALARY EMP # DEPT # SALARY


New York London
E1 DX 45 0$ E2 DY 400 $ fragment
fragment E3 DZ 500 $ E4 DY 630 $
E5 DZ 400 $
EMP # DEPT # SALARY
Replica of EMP # DEPT # SALARY Replica of
E1 DX 450 $ New York
London E2 DY 400 $ E3 DZ 500 $
fragment fragment
E4 DY 630 $ E5 DZ 400 $
Distribution Transparency:
Naming
 Idea: Each attribute in the DDB must
have an unique name; DDBMS ensures
this by either:
 Creating a central name server
 Prefixing attribute with site identifier
 Using aliases [Best Solution]
Transaction Transparency
 Idea: Distributed transactions look like
single-site transactions.
 Transaction transparency ensures that database transactions
will maintain the database’s integrity and consistency.
 allows a transaction to update data at several network sites.

 Example:
Transaction Transparency
 Concurrency Transparency
 Failure Transparency
Transaction Transparency:
Concurrency
 Idea: DDBMS ensures non-interference
among local and global transactions.

 All transactions must execute


independently and be logically
consistent with results obtained if
transactions executed one at a time.
Transaction Transparency:
Concurrency
 Same fundamental principles as for centralized DBMS.

 DDBMS must ensure both global and local transactions do


not interfere with each other.

 Similarly, DDBMS must ensure consistency of all sub


transactions of global transaction.

 Replication makes concurrency more complex. If a copy of a


replicated data item is updated, update must be propagated
to all copies.

 However, if one site holding copy is not reachable, then


transaction is delayed until site is reachable.
Transaction Transparency:
Failure
 Idea: ensures that the system will
continue to operate in the event of a
node failure:
 Loss of a message
 Failure of a communication link
 Failure of a site
 Network partitioning
 Distributed systems must maintain availability
even at low levels of hardware/software/
network reliability.
Performance Transparency &
Query Optimization
 Idea: Minimize total cost associated with execution since the data may be
replicated in several different sites and a database may be partitioned into
several fragments.

 Decisions:
 Which fragment to access
 Which copy of a fragment to use, if the fragment is replicated
 Which location to use


Performance Transparency &
Query Optimization
 Costs:
 Access time – involved in accessing the physical
data stored on disk.
 Communication time – associated with the
transmission of data among nodes in DDBS.
 CPU time – associated with the processing
overhead of managing distributed transactions.
Heterogeneity Transparency
 Idea: Shouldn’t matter what DBMS is
running at each site


Running Oracle 1 N Running Sybase

Distributed Database
Thank You!

You might also like