For the following PC relation, suppose we compute the projection speed (PC). Wha
ID: 3592590 • Letter: F
Question
For the following PC relation, suppose we compute the projection speed (PC). What is the value of this expression as a set? As a bag? What is the average value of tuples in this projection, when treated as a set? As a bag? (20 points)
1013 3.06 512 80 529
For two relations:
R (A, B) = {(0,1), (2,3), (0,1), (2,4), (3,4)}
S(B, C) = {(0,1), (2,4), (2,5), (3,4), (0,2), (3,4)}
Compute the following: (40 points)
B+1,C-1 (S); b) B,C (S); c) (R); d) A,SUM(B) (R); e) R OUTERJOIN R.B < S.B S
List the isolation levels of transactions and explain their differences in your own words (10 points).
From the following base tables: (20 points)
MovieStar (name, address, gender, birthdate)
MovieExec (name, address, cert#, netWorth)
Studio (name, address, presC#)
Construct the following views:
A view RichExec giving the name, address, certificate number and net worth of all executive with a net worth of at least $10,000,000.
A view StudioPres giving the name, address, and certificate number of all executive who are studio presidents.
For the same base tables in Question 5, declare indexes on the following attributes or combination of attributes (10 points).
address of MovieExec
gender and birthdate
model speed ram hd price 1001 2.66 1024 250 2114 1002 2.10 512 250 995 1003 1.42 512 80 478 1004 2.80 1024 250 649 1005 3.20 512 250 630 1006 3.20 1024 320 1049 1007 2.20 1024 200 510 1008 2.20 2048 250 770 1009 2.00 1024 250 650 1010 2.80 2048 300 770 1011 1.86 2048 160 959 1012 2.80 1024 160 649Explanation / Answer
value of speed(PC). expression as a set?
solution:
value of speed(PC) expression as a bag?
solution:
What is the average value of tuples in this projection, when treated
As a set?
Answer: 2.37
As a bag?
Answer: 2.49
Computer (a) B+1,C-1 (S);
Solution:
(b) B,C (S);
2.66 2.10 1.42 2.80 3.20 2.20 2.00 1.86 3.06