We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

Objective:

The assignment has been designed to develop your ability to calculate the Bitmap index. 

Instructions:

Please read the following instructions carefully before solving & submitting assignment:

 

  1. 1.      The assignment will not be accepted after due date in any case (whether it is the case of load shedding or emergency electric failure or internet malfunctioning etc.).
  2. 2.      Zero marks will be awarded to the assignment that does not open or the file is corrupt.
  3. 3.      The assignment file must be an MS Word (.doc) file format; Assignment will not be accepted in any other format.
  4. 4.      Zero marks will be awarded to the assignment if copied (from other student or copied from handouts or internet).
  5. 5.      Zero marks will be awarded to the assignment if the Student ID is not mentioned in the assignment file.

 

For any query about the assignment, contact only at CS614@vu.edu.pk

Do not post queries related to assignment on MDB.

 

GOOD LUCK

Question 1                                                                                                                                         [10 Marks]

 

Consider the following table:

 

Player_Team

Player_ID

Player_Name

Team_ID

Pool_ID

IND-06

Gangoli

IND

A

AFG-05

Najeeb

AFG

B

SA-07

AB Devillier

SA

A

AU-01

Steve Waugh

AU

B

IND-01

Tandulker

IND

A

AU-04

Maxwell

AU

B

AFG-01

Nawroze

AFG

B

SA-09

Dal Styn

SA

A

 

Consider the following query:

 

SELECT Count (Player_Team.Pool_ID) AS CountOfPool_ID

FROM Player_Team

GROUP BY Player_Team.Pool_ID;

 

Answer the following questions:

 

  1. You need to identify the number of clusters from this data.
  2. Secondly, you have to identify whether the given clustering is one way or two way clustering. Your answer should support by valid reasons.

 

Question 2                                                                                                                                         [10 Marks]

Consider the following tables:

 

Player

 

Player_ID

Player_Name

Team

PK-01

Wasim

Pakistan

PK-02

Misbah

Pakistan

SA-03

AB Devillier

South Africa

 

Award

 

Award_ID

Match_ID

Player_ID

01

01

PK-01

01

02

PK-01

02

03

PK-02

01

04

SA-03

 

Consider the following query:

 

Select * from Player P, Award A where P.Team= ‘Pakistan’ and A.Award_ID = ‘01’ and P.Player_ID = A.Player_ID

 

Suppose this query is executed using Naive Nested-Loop join and (i.e. there is no index created on both Player and Award tables). Mention that which table should be the Outer table to get minimum I/O by manually calculating the cost in both cases i.e. when “Player” is outer table and when “Award” is outer table.

 

 

Note: You need to mention the calculations in your solutions where required.

 

 

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 7174

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Attachments:

Replies to This Discussion

sab apni confsion discuss kro thek bn jayega 

men 2nd question ka hint deta hun in simple:

2nd question men player k table men 3 rows hain  so total table size 3 hoga 

isi trha award k table men 4 so total table size 4 hoga, 

and according to the giving query pakistan selected hai so qualtifying block pakistan k first table men 2 hain and award k table men 3 so ab isay formula lagyen and calculate karain so simple dua men yaad rakhna jisay samj agaye..............

And first question men A and B poll -ID wali rows aranage krni hai and btana hai k one way clustering use hue hai kyun k clustering ek ek column k base pay ki hai which is pool-id so

2nd part ki calcultion b kr dyen

Is it Correct Q2:

Answer:

Size of table_Player = 3

Qualifying blocks in table_Player = 2

 

Size of table_Award = 4

Qualifying blocks in table_Award = 3

 

 

 

If table_Player is outer & table_Award is inner:

 

Formula for Join cost:

 

Size of blocks of table_Player + (table blocks of table_Player * size of blocks of table_Award

 

=3 + (2 * 4)

=3+8

=11

 

 

If table_A is outer & table_P is inner:

 

Formula for Join cost:

 

 Size of blocks of table_Award + (table blocks of table_Award * size of blocks of table_Player

 

=4+ (3* 3)

=4 +9

=13

yes correct #khurram #rafiq

Thank u so much

Q1:

SOLUTION:?? Is it correct Zain Nasar ????

 

Part 1:

Cluster indexing on Team_ID

 

Player_ID

Player_Name

Team_ID

Pool_ID

IND-06

Gangoli

IND

A

IND-01

Tandulker

IND

A

SA-07

AB Devillier

SA

A

SA-09

Dal Styn

SA

A

AFG-05

Najeeb

AFG

B

AFG-01

Nawroze

AFG

B

AU-01

Steve Waugh

AU

B

AU-04

Maxwell

AU

B

 

 

Cluster indexing on Pool_ID

 

Player_ID

Player_Name

Team_ID

Pool_ID

IND-06

Gangoli

IND

A

IND-01

Tandulker

IND

A

SA-07

AB Devillier

SA

A

SA-09

Dal Styn

SA

A

AFG-05

Najeeb

AFG

B

AFG-01

Nawroze

AFG

B

AU-01

Steve Waugh

AU

B

AU-04

Maxwell

AU

B

 

 

 

 

 

 

 

 

Number of clusters:

 

 

Pool_ID

count

A

4

B

4

 

 

nai bro first question men just 1 table bnana hai and jis men A ki Value and B ki separate krdni hain and us k 2nd part men btana k oneway clustering hain bus simple

Q1 PART 1 IS THIS CORRECT?

Player_ID Player_Name Team_ID Pool_ID
IND-06 Gangoli IND A
IND-01 Tandulker IND A
SA-07 AB Devillier SA A
SA-09 Dal Styn SA A
AFG-05 Najeeb AFG B
AFG-01 Nawroze AFG B
AU-01 Steve Waugh AU B
AU-04 Maxwell AU B

Q1: PART 2: WHAT IS THE REASON/ COULD YOU PLEAS ELABORATE?

Question 1                                                                                                                           

 

Consider the following table:

 

Player_Team

Player_ID

Player_Name

Team_ID

Pool_ID

IND-06

Gangoli

IND

A

AFG-05

Najeeb

AFG

B

SA-07

AB Devillier

SA

A

AU-01

Steve Waugh

AU

B

IND-01

Tandulker

IND

A

AU-04

Maxwell

AU

B

AFG-01

Nawroze

AFG

B

SA-09

Dal Styn

SA

A

 

Consider the following query:

 

SELECT Count (Player_Team.Pool_ID) AS CountOfPool_ID

FROM Player_Team

GROUP BY Player_Team.Pool_ID;

 

Answer the following questions:

 

  1. You need to identify the number of clusters from this data.

 

Sol:

 

Pool_ID

count

A

4

B

4

 

 

  1. Secondly, you have to identify whether the given clustering is one or two way clustering way. Your answer should support by valid reasons.

 

Sol:

       This is one  one way clustring.

       One way clustring is when only data record of rows are used. So only one row is used in given table.

 

 

 

Question 2                                                                                                                           

Consider the following tables:

 

Player

 

Player_ID

Player_Name

Team

PK-01

Wasim

Pakistan

PK-02

Misbah

Pakistan

SA-03

AB Devillier

South Africa

 

Award

 

Award_ID

Match_ID

Player_ID

01

01

PK-01

01

02

PK-01

02

03

PK-02

01

04

SA-03

 

Consider the following query:

 

Select * from Player P, Award A where P.Team= ‘Pakistan’ and A.Award_ID = ‘01’ and P.Player_ID = A.Player_ID

 

Suppose this query is executed using Naive Nested-Loop join and (i.e. there is no index created on both Player and Award tables). Mention that which table should be the Outer table to get minimum I/O by manually calculating the cost in both cases i.e. when “Player” is outer table and when “Award” is outer table.

 

Sol:

When Player is outer and Award is inner table(Player=A  &  Award=B):

 

Cost=Blocks accessed for table A+(Qualifying blocks for table A* Qualifying blocks for table B)

 =  3+ (1*1)

 

 =  3+1

 

=4  I/Os

 

And       

When Player is outer and Award is inner table(Award=A  &  Player=B):

 

Cost=Blocks accessed for table A+(Qualifying blocks for table A* Qualifying blocks for table B)

=   4+(1*1)

 

=  4+1

 

=  5 I/Os

 

 

When Player table is outer then i/o is minimum.

 

cs614 assignment#4 idea solution

Attachments:

RSS

Latest Activity

+ !ѕιмρℓє ¢н updated their profile
10 minutes ago
+ !ѕιмρℓє ¢н replied to + ! ❤INNOCENT❤'s discussion Akhri Salam Smjh kr
15 minutes ago
+ ! ! ! ! ! " Muskan liked + M.Tariq Malik's discussion Fall 2019 2nd Merit List of Candidates Eligible for Admission
22 minutes ago
+ ! ! ! ! ! " Muskan liked + M.Tariq Malik's discussion VIRTUAL UNIVERSITY OF PAKISTAN ORGANIZED AAOU 2019
22 minutes ago
+ ! ! ! ! ! " Muskan liked + M.Tariq Malik's discussion Fall 2019- 2nd Merit List of Candidates Eligible for Admission
22 minutes ago
+ ! ! ! ! ! " Muskan liked + Iuuoɔǝut+'s discussion عشق
22 minutes ago
+ ! ! ! ! ! " Muskan liked + M.Tariq Malik's discussion غیر پھر غیر، درگزر کر دے - کون روکے زبان اپنوں کی
22 minutes ago
+ ! ! ! ! ! " Muskan liked + ! ! RebeL's discussion Read this out Loud !!!!!!!!!
23 minutes ago
+ ! ! ! ! ! " Muskan liked + "Jɨyą's discussion okey :x
23 minutes ago
+ ! ! ! ! ! " Muskan liked + "Jɨyą's discussion okey :x
23 minutes ago
+ ! ! ! ! ! " Muskan liked ♦_"Tooba"_♦'s discussion Guzri Howi Zindagi Ko Kabhi Yaad Na Kr
23 minutes ago
+ ! ! ! ! ! " Muskan liked + "αяsαℓ " Ќąƶµяɨ •"'s discussion 2019 Noble Prize Winners
23 minutes ago
+ ! ! ! ! ! " Muskan liked +"Certified Gangster"++'s discussion For all female friends
23 minutes ago
+ ! ! ! ! ! " Muskan liked ASIM MAQSOOD's discussion BANKING AND FINANCE
23 minutes ago
+ ! ! ! ! ! " Muskan liked + ! ! ! ! ! !Aaima Ansari ❤️'s discussion ++!!!!!!!EARTH QUACKS!!!!!!!!!!++
23 minutes ago
+ ! ! ! ! ! " Muskan liked 彡JK彡 ❤️'s discussion Dedicated To All Fake IDs............ :p:p
23 minutes ago
+ ! ! ! ! ! " Muskan liked + "αяsαℓ " Ќąƶµяɨ •"'s discussion Muhabato me li gaye kasmain
23 minutes ago
+ ! ! ! ! ! " Muskan liked + Iuuoɔǝut+'s discussion hijar ka tara doob chala hy ......wasi shah
23 minutes ago
+ ! ! ! ! ! " Muskan liked +¢αяєℓєѕѕ gιяℓ's discussion Lets Share yOur desktOp wAllpAper.....  (•ิ‿•ิ)
23 minutes ago
+ ! ! ! ! ! " Muskan liked +¢αяєℓєѕѕ gιяℓ's discussion Jin sey Mohabbat Ho.....
23 minutes ago

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service