• Keine Ergebnisse gefunden

Quiz Sheet No. 5 for

N/A
N/A
Protected

Academic year: 2022

Aktie "Quiz Sheet No. 5 for"

Copied!
3
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Quiz Sheet No. 5 for Architecture and Implementation of Database Systems Prof. Rudolf Bayer, Ph. D.

Institut für Informatik SS 2003

Exercises for Chapter 6: Distributed DBS

1. Consider the database schema:

create table CD ( CD# integer, Title string, Price real,

L# integer ) key is CD#

create table Label

( L# integer,

LName string,

LCountry string ) key is L#

create table Song ( CD# integer, Track# integer, STitle string,

Artist string ) key is (CD#, Track#)

a) Given below is an operator tree for query “Retrieve the Title, LName and Price of CDs that cost less than $12 and contain songs by the Artist Tom Waits”:

π Title, LName, Price

| ? L#

? CD# Label

σArtist=’Tom Waits’ σPrice<12.0 | |

Song CD

Assume a distributed DBS with nodes KL (holding relation Label), KC (holding relation CD) and KS (holding relation Song). Sketch an operator graph using semi- joins for executing this query on the distributed DBS.

(2)

Answer:

There is a large variety of possibilities for such an operator graph. Given below is only one of these solutions:

(JOIN) KS

(SEMIJ) KL

L#) KL

L (JOIN) KS

(SEMIJ) KC

CD#) KC Artist=’Tom Waits’) KS Price<12.0) KC | |

Song CD

b) The following operator tree is another representation of the query in exercise 1a):

π Title, LName, Price

| ? CD#

σArtist=’Tom Waits’

|

? L# Song

σPrice<12.0 |

Label CD

(3)

A possible operator graph for the join Label? CD, designed for the distributed DBS hosting KL, KC and KS is:

(? L#) KS

(SEMIJL#) KC

(SEMIJL#) KL

L#) KL L#) KC

Price<12.0) KC

| Label CD

Compute the transport volume (the number of attributes, regardless of their types) that must be sent from node to node and determine the total transport volume of this query plan. Assume that:

|Label| = 25

|CD| = 12,500

Selectivity (“Price < 12.0”) = 0.4 Selectivity for all semi-joins = 0.02

Answer:

Assuming that both join attributes in semi joins are being sent from node to node:

(? L#) KS (2,500*25*0.02)*5 = 6,250 attributes

(SEMIJL#) KC (25*5,000*0.02)*4 = 10,000 attributes

25*1 = 25 attributes

(SEMIJL#) KL

5,000*1 = 5,000 attributes L#) KL L#) KC

12,500*0.4 = 5,000 tuples

Price<12.0) KC

| Label CD

total transport volume: 5,000 + 10,000 + 25 + 6,250 = 21,275 attributes

Referenzen

ÄHNLICHE DOKUMENTE

invariant names for relations address only in catalogue. additional info in catalogue: - schema - statistics -

2. Determine the general formula for the net output in B/s of a hard drive dependent on the average access time α in ms and the transfer rate β in B/s. UNIX files:. a) What is

Quiz Sheet for Architecture and Implementation of Database Systems Prof. Rudolf Bayer, Ph. Determine the general formula for the net transfer time in s of a hard drive dependent

1. c) Sketch the corresponding conflict graph using the “follow relation” (defined in chapter 4.3 on page11).. d) Describe some possibilities for modifying H2 to a new schedule

a) Determine the different states of the database, the cache and the safe along the timeline from timestamp 1 to 13 using the following schema. For each step fill in the appropriate

Graph schemas have been developed in light of the upcoming tree-like graph data structures of the 1990's, called semistructured data [28, 2, 9]. Hence, there are design decisions

The partitionF operator, applied to a distributed array whose fields contain relations, lets workers in parallel (and sequentially per worker) partition the relation of a field

We presented our findings on the interaction between optimization through query graph changes and the placement of operators on different heterogeneous processing systems.. We