Results 1 to 7 of 7
Thread: Functional dependencies

050606, 14:52 #1Registered User
 Join Date
 Feb 2006
 Posts
 18
relational algebra
there are 2 relations R(A,B) and S(B,C) where R = 3000,R = 1000 and B is the primary key of S.Then R natural joinS <= 1000.
Is this true or false?
I think R Natjoin S is less than or equal to 1000,but the answer is false....why is this so? please answer.....

050606, 15:49 #2SQL Consultant
 Join Date
 Apr 2002
 Location
 Toronto, Canada
 Posts
 20,002
R has 3000 rows? then the answer is less than or equal to 3000, not 1000
each row in R has a value for B, so joining R to S using B, every row in R will match at most one row in B
suppose R is some set of people, A=name and B=gender (e.g. M/F)
suppose S is the set of genders, B=gender (M/F), C=name (Male/Female)
joining R to S you get one row for every person, right?

050706, 19:57 #3Registered User
 Join Date
 Feb 2006
 Posts
 18
Functional dependencies
F={A →B, AC →D, AB →C}
X=A
Result should be X+=ABCD
A>B.......AB
AB>C (given) therefore ABC
ABC......ABCD ....as AC>D
Is this right?
suppose for example A>B...then can we write AA>AB
so AA is nothing but A...so A>AB..is this right..

050706, 23:53 #4Registered User
 Join Date
 Feb 2006
 Posts
 18
Functional Dependencies!
F = { I > B, IS > Q, B > O}
a. What are the keys of the relation?
b. Is the relation in BCNF?
IS > ISBQO IS is the only key...
How is IS the key....can anyone please elaborate?

050806, 16:32 #5Registered User
 Join Date
 Feb 2006
 Posts
 18
functional dependencies
Show that the following rule for functional dependencies is not sound: If
A>B and C>B then A>B..??????????
ans:for example 3 attributes:lets assume ::A is ssn ; C is empno ; B is name.
ssn name empno
100000 abc E4343
200000 bhh E6456
300000 njk E9079
can the above rule be disproved...
and one more doubt is
in FD: A>B (A determines B )means A is the key...
so
A B
1000 rr
1000 rr
this table satisfies A> B
but how can there be two 1000's as A is the key ???

050806, 17:42 #6SQL Consultant
 Join Date
 Apr 2002
 Location
 Toronto, Canada
 Posts
 20,002
look, this is the 4th separate thread you've started, and, as with the other ones, i'm going to merge them into one thread
please keep to one thread per topic, thanks

050806, 18:34 #7Registered User
 Join Date
 Feb 2006
 Posts
 18
fd'surgent reply wanted please
C = CourseNo, SN = SecNo, OD = OfferingDept, CH = CreditHours, CL = CourseLevel,
I = InstructorSSN, S = Semester, Y = Year, D = Days_Hours, RM = RoomNo,
NS = NoOfStudents
Hence, R = {C, SN, OD, CH, CL, I, S, Y, D, RM, NS}, and the following functional
dependencies hold:
{C} > {OD, CH, CL}
{C, SN, S, Y} > {D, RM, NS, I}
{RM, D, S, Y} > {I, C, SN}
solution:
(a) All attributes of R are in F. Attributes only in LHS: S,Y. Attributes only in RHS:
OD,CH,CL,I,NS. Thus, attributes S and Y must be part of any candidate key, and the
attributes OD,CH,CL,I,NS are not part of any candidate key. We combine S and Y
with the remaining attributes: C, SN, D, RM. By looking at the LHS of the given FDs,
we notice that {S,Y} is not a candidate key, and no combination of three attributes is
a candidate key. The only sets of attributes that can generate the entire schema are:
{S,Y,C,SN} and {S,Y, RM,D}, which are the candidate keys.why is this so...can anone please elaborate...from the bold....how can we decipher by looking at the LHS of the given fd's that s,y is not a candidate key.......