Question: Using sql and the 2 tables below for questions b - l: Relation assignment _ r has attributes ( A , B , C ,
Using sql and the tables below for questions bl:
Relation assignmentr has attributes A B C D the domains of char int, varchar float respectively.
i Attribute B is the primary key for this relation
ii Relation assignmentr has the following tuples as values
ahello,
bhi
xg
cgeog
yg
Relation assignments has attributes B D E the domains of int float, char respectively.
i Attribute B is the primary key for this relation
ii Relation assignments has the following tuples as values
s
z
g
y
s
b Calculate the average value of attribute D in relation assignments
c Sum the values of attribute B in relation assignmentr for rows if the value of attribute D is either or
d Change the value of attribute C in relation assignmentr to geog if attribute A has value s or y
e Delete tuple from assignmentr if value of attribute D is
f Perform natural join of relations assignmentr and assignments and explain your result.
g Perform inner join of relations assignmentr and assignments on attribute B and explain your result. How is this result similar or different than natural join?
h Perform inner join of relations assignmentr and assignments on attribute B and D and explain your result. How is this result similar or different than natural join?
i Perform inner join of relations assignmentr and assignments by making assignmentrA equal to assignmentsE and explain your result.
j Perform left join of relations assignmentr and assignments on attribute B and explain your result.
k Perform right join of relations assignmentr and assignments on attribute B and explain your result.
l Perform full outer join of relations assignmentr and assignments on attribute B and explain your result.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
