0% found this document useful (0 votes)
48 views

Distributed Database System: By: Madiha Hameed

This document provides an outline for a chapter on distributed database and multidb query processing. It discusses the mediator/wrapper architecture for integrating autonomous databases including how wrappers encapsulate DBMS details and mediators provide a global schema. It also covers issues in multidb query processing like heterogeneity, query rewriting using views and a Datalog example, and optimization challenges from differing capabilities of component DBMSs.

Uploaded by

Bilal Mushtaq
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

Distributed Database System: By: Madiha Hameed

This document provides an outline for a chapter on distributed database and multidb query processing. It discusses the mediator/wrapper architecture for integrating autonomous databases including how wrappers encapsulate DBMS details and mediators provide a global schema. It also covers issues in multidb query processing like heterogeneity, query rewriting using views and a Datalog example, and optimization challenges from differing capabilities of component DBMSs.

Uploaded by

Bilal Mushtaq
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Distributed Database

System

BY: MADIHA HAMEED

Ch.1/1
Outline
• Introduction
• Background
• Distributed Database Design
• Database Integration
• Semantic Data Control
• Distributed Query Processing
• Multidatabase Query Processing
➡ Query Rewriting
➡ Optimization Issues

• Distributed Transaction Management


• Data Replication
• Parallel Database Systems
• Distributed Object DBMS
• Peer-to-Peer Data Management
• Web Data Management
• Current Issues
Ch.1/2
Multidatabase Query Processing
• Mediator/wrapper architecture
• MDB query processing architecture
• Query rewriting using views
• Query optimization and execution
• Query translation and execution

Ch.1/3
Mediator/Wrapper Architecture
Mediator
Same Different
Interface Interfaces
Query
Processing Local
Wrapper1 DBMS1
Schema

Query Global local


Wrapper2 DBMS2
view schema
Results
local
Wrapper3 DBMS3
schema
Result
Integration
DBMS4

Ch.1/4
Advantages of M/W Architecture
• Wrappers encapsulate the details of component DBMS
• Export schema and cost information
• Manage communication with Mediator

• Mediator provides a global view to applications and users


• Single point of access
• May be itself distributed
• Can specialize in some application domain
• Perform query optimization using global knowledge
• Perform result integration in a single format

Ch.1/5
Issues in MDB Query Processing
• Component DBMSs are autonomous and may range from full-
fledge relational DBMS to flat file systems
• Different computing capabilities
• Prevents uniform treatment of queries across DBMSs
• Different processing cost and optimization capabilities
• Makes cost modeling difficult
• Different data models and query languages
• Makes query translation and result integration difficult
• Different runtime performance and unpredictable behavior
• Makes query execution difficult

Ch.1/6
Component DBMS Autonomy
• Communication autonomy
• The ability to terminate services at any time
• How to answer queries completely?

• Design autonomy
• The ability to restrict the availability and accuracy of information needed
for query optimization
• How to obtain cost information?

• Execution autonomy
• The ability to execute queries in unpredictable ways
• How to adapt to this?

Ch.1/7
Mediator Data Model
• Relational model
• Simple and regular data structures
• Mandatory schema

• Object model
• Complex (graphs) and regular data structures
• Mandatory schema

• Semi-structured (XML) model


• Complex (trees) and irregular data structures
• Optional schema (DTD or XSchema)

In this chapter, we use the relational model which is sufficient to


explain MDB query processing

Ch.1/8
MDB Query Processing
Architecture
Global/local
correspondences

Allocation and
capabilities

Local/DBMS
mappings

Ch.1/9
Query Rewriting Using Views
• Views used to describe the correspondences between global and
local relations
• Global As View: the global schema is integrated from the local databases
and each global relation is a view over the local relations
• Local As View: the global schema is defined independently of the local
databases and each local relation is a view over the global relations
• Query rewriting best done with Datalog, a logic-based language
• More expressive power than relational calculus
• Inline version of relational domain calculus

Ch.1/10
Datalog Terminology
• Conjunctive (SPJ) query: a rule of the form
• Q(T) :- R1(T1), … Rn(Tn)
• Q(T) : head of the query denoting the result relation
• R (T ), … R (T ): subgoals in the body of the query
1 1 n n
• R , … R : predicate names corresponding to relation names
1 n
• T , … T : refer to tuples with variables and constants
1 n
• Variables correspond to attributes (as in domain calculus)
• “-” means unnamed variable

• Disjunctive query = n conjunctive queries with same head predicate

Ch.1/11
Datalog Example
With EMP(ENAME,TITLE,CITY) and ASG(ENAME,PNAME,DUR)

SELECT ENAME,TITLE, PNAME


FROM EMP, ASG
WHEREEMP.ENAME = ASG.ENAME
AND TITLE = "Programmer" OR DUR=24

Q(ename,title,pname) :- Emp(ename,title,-)
Asg(ename,pname,-),
title = “Programmer”.
Q(ename,title,pname) :- Emp(ename,title,-)
Asg(ename,pname,24).

Ch.1/12
Question ?

13

Ch.1/13

You might also like