Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
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! TuyQuestion 1Suppose relation R(A,B) has the tuples:A B1 23 45 6and the relation S(B,C,D) has tuples:B C D2 4 64 6 84 7 9Compute the theta-join of R and S with the condition R.A < S.C AND R.B < S.DAnswer: (1,2,2,4,6), (3,4,4,7,9)Question 2Suppose relation R(A,B,C) has the tuples:A B C1 2 34 2 34 5 62 5 31 2 6and relation S(A,B,C) has the tuples:A B C2 5 32 5 44 5 61 2 3Compute (R - S) [union] (S - R), often called the "symmetric difference" of R and S. Answer: (1,2,6), (2,5,4)Question 3Suppose relation R(A,B) has the tuples:A B1 23 45 6and the relation S(B,C,D) has tuples:B C D2 4 64 6 84 7 9Compute the outerjoin of R and S, where the condition is: R.A>S.B AND R.B=S.C. Question 4Suppose relation R(A,B,C) has the tuples:A B C1 2 31 2 34 5 62 5 31 2 6and relation S(A,B,C) has the tuples:A B C2 5 32 5 44 5 61 2 3Compute 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) |
|
|
|
|
|
|
|