nit-1
Date
Paga
Q6Queny Pracesing
Quey Procewing in a disibuteol databade managemnt
Systum required transmission of olata batweon the
CormpuBurs inanetwork.
distibution strateqy is he oradering of data transmission
in a databae systum.
Genuraly quy in a aistibuted D8Ms
reuirel data fom mulhi ple sikea.
for olata
This ned for alata tom muliple sitedis called
he trnsmission olato
This thansmission of olata causeA aommunicahon
cOsts.
This communicahon cost and transmission
data oVer anetwork is what maked
prmcsaing in alistbuted DBMS oliffent rom queny
procesing in cenhalizedDBMS.
Thetanmission cost is louw whun sitesare
Connected thnugh high speud Netuarks
The transmission cast is quite signifcant in ofhec
hetworks
Date
Puge
Casts Trasfu of olata) of Distibutedl Quny Pocwing
Sn odistibuted queny proCRing he cast of olata
Lanafu mean the co.st
of tansfuning immadiate
other sited or proing and tharefore the
Cast
of tanifuming the ulhmateedult fle to the
Site whue dhe reaut js reqvirrd
User senoa a queny to site S1wuhich
ntauired data om ts awn fom site S2
Now thure 2 stratagieA to pracaua this quey
We can
tranafr data fom S2 to and then proc
sthe quy
drnsfu data fom S1 to s2 and then procet
sthe quey
We tranufr data fram 81 and 2 to S3 and
dhen
So the chaice odpenol on ike
4the aize oA relation and suts
the comMuni cation cests betueen oiffunt sitea
the site at whichelvlt will be uhlised.
Paga
Commanly, ha dlata transfr Cost is calulated in
dums of the size of message
By using tha formola below
below we oaleuate dlata
dransfur casth
Data transfer cost = Si2e
cost p noof
byta of byte to be
data tranfu tanimitted.
Excumple
Consider the follouing 2 tablet.
Sihe 1 : EMPLOYEE Sit &i DEPARIMENI
EID NAME 8ALARY DLD DID DNAME
ELD- 0 bytes. DID - lO bytes
SALARY - 20 bytes. DNAME- RO bytea
DID - 10 byt Total Recarelu- SO
NAME- 20 bytu RecorolSiu - 30 bytes
Total Recorda- 000
Record size - 6o bytes
Anol the
of emplayeA and thuir dpartmunt
noume
name
Also ind the amount of data hantfr to execwte
this query when he quury is submittd to site3
casSnte
Date
Page
Consideing dhe quey is submittaod at aite 2 andl
nithu EMPLOYEE nor DEPA RTM ENT ave aVailable at
site 3, We have3
atat1giea to execute thiS quey
Transfu both tableu to site 3 then join table thue
Total 0ost=60* oo0 + SO* 3o= 60000+ lS00
= 61S00 bytu
Transf EMPLOYEE to site 2 join tabled at site 2
and trnspr the eAutt t site 2
Total COst = 60 * l000 t GO*1000 = 60000 +60000
= 1Qo000 byte
(since. we have do tranimit l000 tuplea wuith
NAMEand DNAME from Site 1)
Transfu DEPARTMENT to aite1 oin tableA at site1
cnd sransfr Hhe Ault to site 3
Total cost = SO *30 + 60 * lo 00 =61S00 byte
8o, oif the ophirmisation criteria is to nduce the
cmount of data tranfu we 02n choose trategy1
above.
QUsing Semi join in Distbuted Query procehing.
The Qemi join operation in listributed quey proAing
is USed to redwce the nwm ber af tuples in a table
efore trandmithing itt to onother site
This redvohian in tuplesredues the sizeand
thus redwces the total cost of data transer
Lat's say Wehave two tables Ra und R2 on
Site SL ond S2.
Now we will forward the joining column of one table
(say R1) to the site
site where dhe other table Csoy
R2) js located.
This colunn isjoined with R2 at that site.
The oecision of whethe to reduo R1 or R2 is
made aftr with a comp arinq the advantages of
rrowcing RI and that of reducing R2
Thus suni join is org anised soluion to dua the
dransfu of olata in distributhd quany pmcsing
Example
The folla wing Stategy can be used to execute the
Same quuy baing semi join
Select all athributes of EMPLOYEE table at site 1
andthen tronsfer them do site 3.
Far this we wil transtr NAME, D1DENPLaYEE)
and te gize is 2S * 000 = RSo00 bytes
Date
Page
TFanifu the table DEPARTMENT to site 3 and join the
projccted athibutes of EMPLO yEE. wilh his table.
The si of DE PARTMENT Table is 2s * G0 =1R60.
Applying she above schemethe amount of olata
anfurd to xecute dhe above quey wil be
QS000tlaS0=QA2 S0 bytu