Author |
Topic |
Tu
Starting Member
1 Post |
Posted - 2011-07-26 : 10:52:42
|
I am very new to dbms and i have a HW which i don't know how to answer and it is not in my database textbook. Could anybody help and let me know where i can find something to learn them. One more thing i apologize if i posted under the wrong heading, i just thought database management might be related. Below are the questions. Thanks in advance! Tuy
Question 1
Suppose relation R(A,B) has the tuples: A B 1 2 3 4 5 6
and the relation S(B,C,D) has tuples: B C D 2 4 6 4 6 8 4 7 9
Compute the theta-join of R and S with the condition R.A < S.C AND R.B < S.D Answer: (1,2,2,4,6), (3,4,4,7,9)
Question 2 Suppose relation R(A,B,C) has the tuples: A B C 1 2 3 4 2 3 4 5 6 2 5 3 1 2 6
and relation S(A,B,C) has the tuples: A B C 2 5 3 2 5 4 4 5 6 1 2 3
Compute (R - S) [union] (S - R), often called the "symmetric difference" of R and S. Answer: (1,2,6), (2,5,4)
Question 3 Suppose relation R(A,B) has the tuples: A B 1 2 3 4 5 6
and the relation S(B,C,D) has tuples: B C D 2 4 6 4 6 8 4 7 9
Compute the outerjoin of R and S, where the condition is: R.A>S.B AND R.B=S.C.
Question 4 Suppose relation R(A,B,C) has the tuples: A B C 1 2 3 1 2 3 4 5 6 2 5 3 1 2 6
and relation S(A,B,C) has the tuples: A B C 2 5 3 2 5 4 4 5 6 1 2 3
Compute the bag union R [union] S,
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2011-07-26 : 11:42:34
|
Ask the lecturer. It's not shameful not to know the answer at this stage of your education, nor is it unexpected that you can't work it out for yourself from the literature/documentation/coursework covered to date. It's just a bit more challenging than expected.
Also, we generally don't do morework here (see the FAQ's). Also, we generally deal with practical work-related problems, and this one seems to be verging on higher order theoretical maths (And given that i've an 24-year old applied maths degree tucked away under my belt, this question looks to imply that i'm an early candidate for alzheimers) |
 |
|
|
|
|