473,703 Members | 2,912 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Transitive dependencies

Hi there,

I'm having some trouble identifying transitive dependencies in the student
table below

StudId Name CourseCode CourseDesc Lecturer Grade Office
'S1234', 'Jack', 'C224', 'Database', 'Codd', 'D', 381
'S1234', 'Jack', 'C225', 'Algorithms', 'Djikstra', 'P', 380
'S2345', 'Jill', 'C224', 'Database', 'Codd', 'HD', 381
'S2345', 'Jill', 'C226', 'Architecture', 'Ritchie', 'HD', 390
'S4567', 'Jack', 'C226', 'Architecture', 'Ritchie', 'D', 390
'S4567', 'Jack', 'C224', 'Database', 'Codd', 'F', 381
'S9872', 'Howard', 'Cpol', 'Politics', 'Marx', 'F', 380

I've first tried to find the functional dependencies (they may or may not be
correct)

* StudId -> Name
* StudId, CourseCode -> Name, CourseDesc, Lecturer, Grade, Office
* CourseCode -> CourseDesc, Lecturer, Office
* CourseDesc -> CourseCode, Lecturer, Office
* Lecturer -> CourseCode, CourseDesc, Office

I then thought that StudId, CourseCode -> Office, CourseDesc, Lecturer
might be a transitive dependency within student. Is it?





Nov 12 '05 #1
7 10376
Before identifying transitive dependencies, you need to clearly identify the
primary key. The primary key is an attribute (or attributes!) that uniquely
identifies every record in the relation. Once you've done that, the
transitive dependency should be apparent. Hint: Dr. Codd might well teach
more that one Database course, but he will only have one office.
"David" <au*******@hush mail.com> wrote in message
news:3f******** **************@ news.optusnet.c om.au...
Hi there,

I'm having some trouble identifying transitive dependencies in the student
table below

StudId Name CourseCode CourseDesc Lecturer Grade Office
'S1234', 'Jack', 'C224', 'Database', 'Codd', 'D', 381
'S1234', 'Jack', 'C225', 'Algorithms', 'Djikstra', 'P', 380
'S2345', 'Jill', 'C224', 'Database', 'Codd', 'HD', 381
'S2345', 'Jill', 'C226', 'Architecture', 'Ritchie', 'HD', 390
'S4567', 'Jack', 'C226', 'Architecture', 'Ritchie', 'D', 390
'S4567', 'Jack', 'C224', 'Database', 'Codd', 'F', 381
'S9872', 'Howard', 'Cpol', 'Politics', 'Marx', 'F', 380

I've first tried to find the functional dependencies (they may or may not be correct)

* StudId -> Name
* StudId, CourseCode -> Name, CourseDesc, Lecturer, Grade, Office
* CourseCode -> CourseDesc, Lecturer, Office
* CourseDesc -> CourseCode, Lecturer, Office
* Lecturer -> CourseCode, CourseDesc, Office

I then thought that StudId, CourseCode -> Office, CourseDesc, Lecturer
might be a transitive dependency within student. Is it?





Nov 12 '05 #2

"Randy Harris" <ra***@SpamFree .com> wrote in message
news:Qs******** ************@ne wssvr28.news.pr odigy.com...
Before identifying transitive dependencies, you need to clearly identify the primary key. The primary key is an attribute (or attributes!) that uniquely identifies every record in the relation. Once you've done that, the
transitive dependency should be apparent. Hint: Dr. Codd might well teach more that one Database course, but he will only have one office.

Well, StudId, CourseCode uniquely identifies every row - I think this is
probably the primary key.

I should have explained myself better: the reason I thought that StudId,
CourseCode -> Office, CourseDesc, Lecturer was a transitive dependency was
because CourseCode and Lecturer both depend on CourseDesc, and CourseDesc in
turn depends on StudId, CourseCode. Similarly, Office depends on Lecturer
and Lecturer depends on StudId, CourseCode.

Have I understood the concepts correctly? I'd like to put the student table
in *both* 2NF and 3NF.
Nov 12 '05 #3
A transitive dependency is a situation where an attribute depends on another
attribute that is not part of the primary key. So, if (StudID, CourseCode)
is the PK, examine each of the other attributes to see if any are dependant
on an attribute that is not part of the PK.

"David" <au*******@hush mail.com> wrote in message
news:3f******** *************** @news.optusnet. com.au...

"Randy Harris" <ra***@SpamFree .com> wrote in message
news:Qs******** ************@ne wssvr28.news.pr odigy.com...
Before identifying transitive dependencies, you need to clearly identify the
primary key. The primary key is an attribute (or attributes!) that

uniquely
identifies every record in the relation. Once you've done that, the
transitive dependency should be apparent. Hint: Dr. Codd might well

teach
more that one Database course, but he will only have one office.

Well, StudId, CourseCode uniquely identifies every row - I think this is
probably the primary key.

I should have explained myself better: the reason I thought that StudId,
CourseCode -> Office, CourseDesc, Lecturer was a transitive dependency was
because CourseCode and Lecturer both depend on CourseDesc, and CourseDesc

in turn depends on StudId, CourseCode. Similarly, Office depends on Lecturer
and Lecturer depends on StudId, CourseCode.

Have I understood the concepts correctly? I'd like to put the student table in *both* 2NF and 3NF.

Nov 12 '05 #4
rkc

"David" <au*******@hush mail.com> wrote in message
news:3f******** *************** @news.optusnet. com.au...

"Randy Harris" <ra***@SpamFree .com> wrote in message
news:Qs******** ************@ne wssvr28.news.pr odigy.com...
Before identifying transitive dependencies, you need to clearly identify the
primary key. The primary key is an attribute (or attributes!) that

uniquely
identifies every record in the relation. Once you've done that, the
transitive dependency should be apparent. Hint: Dr. Codd might well

teach
more that one Database course, but he will only have one office.

Well, StudId, CourseCode uniquely identifies every row - I think this is
probably the primary key.

I should have explained myself better: the reason I thought that StudId,
CourseCode -> Office, CourseDesc, Lecturer was a transitive dependency was
because CourseCode and Lecturer both depend on CourseDesc, and CourseDesc

in turn depends on StudId, CourseCode. Similarly, Office depends on Lecturer
and Lecturer depends on StudId, CourseCode.

Have I understood the concepts correctly? I'd like to put the student table in *both* 2NF and 3NF.


You're confusing a partial dependency for a transitive dependency.
A partial dependency is when an attribute is functionally dependent on only
part of the primary key.

In your base relation CourseDesc is only dependent on CourseID, Lecturer
is only dependent on CourseID and Name is only dependent on StuID.
All are partial dependencies.

Office is dependent on Lecturer, Lecturer is dependent on CourseID, so
Office is transitively dependent on CourseID.



Nov 12 '05 #5

"rkc" <rk*@yabba.dabb a.do.rochester. rr.com> wrote in message
news:YL******** ***********@twi ster.nyroc.rr.c om...

You're confusing a partial dependency for a transitive dependency.
A partial dependency is when an attribute is functionally dependent on only part of the primary key.

In your base relation CourseDesc is only dependent on CourseID, Lecturer
is only dependent on CourseID and Name is only dependent on StuID.
All are partial dependencies.

Office is dependent on Lecturer, Lecturer is dependent on CourseID, so
Office is transitively dependent on CourseID.

But isn't CourseID (CourseCode) functionally dependent on Lecturer? The
definition that I'm looking at says that:

If A -> B and B->C then C is transitively dependent on A via B *provided
that* A is not functionally dependent on B or C.

In the example you gave, A (CourseID) is *not* dependent on C (Office) but A
*is* dependent on B (Lecturer) - for each value of Lecturer there's exactly
one value of CourseID.
Nov 12 '05 #6
rkc

"David" <au*******@hush mail.com> wrote in message
news:3f******** *************** @news.optusnet. com.au...

"rkc" <rk*@yabba.dabb a.do.rochester. rr.com> wrote in message
news:YL******** ***********@twi ster.nyroc.rr.c om...

You're confusing a partial dependency for a transitive dependency.
A partial dependency is when an attribute is functionally dependent on only
part of the primary key.

In your base relation CourseDesc is only dependent on CourseID, Lecturer
is only dependent on CourseID and Name is only dependent on StuID.
All are partial dependencies.

Office is dependent on Lecturer, Lecturer is dependent on CourseID, so
Office is transitively dependent on CourseID.

But isn't CourseID (CourseCode) functionally dependent on Lecturer? The
definition that I'm looking at says that:

If A -> B and B->C then C is transitively dependent on A via B *provided
that* A is not functionally dependent on B or C.

In the example you gave, A (CourseID) is *not* dependent on C (Office) but

A *is* dependent on B (Lecturer) - for each value of Lecturer there's exactly one value of CourseID.


You're a step behind worrying about transitive dependencies. Get your
relation
into 2NF and take another look.
Nov 12 '05 #7
"David" <au*******@hush mail.com> wrote in message
news:3f******** *************** @news.optusnet. com.au...

"rkc" <rk*@yabba.dabb a.do.rochester. rr.com> wrote in message
news:YL******** ***********@twi ster.nyroc.rr.c om...

You're confusing a partial dependency for a transitive dependency.
A partial dependency is when an attribute is functionally dependent on only
part of the primary key.

In your base relation CourseDesc is only dependent on CourseID, Lecturer
is only dependent on CourseID and Name is only dependent on StuID.
All are partial dependencies.

Office is dependent on Lecturer, Lecturer is dependent on CourseID, so
Office is transitively dependent on CourseID.

But isn't CourseID (CourseCode) functionally dependent on Lecturer? The
definition that I'm looking at says that:

If A -> B and B->C then C is transitively dependent on A via B *provided
that* A is not functionally dependent on B or C.

In the example you gave, A (CourseID) is *not* dependent on C (Office) but

A *is* dependent on B (Lecturer) - for each value of Lecturer there's exactly one value of CourseID.


The example rkc gave you was perfect.
A(CourseID) -> B(Lecturer) and B(Lecturer) -> C(Office)
C is dependent on B and B is dependent on A
So C is transitively dependent on A

Also, as rkc stated, as did I in my first post, the transitive dependency
has no significance until the relation is in 2NF. Do that by defining the
primary key. THEN examine the transitive dependencies.

Nov 12 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1875
by: Imre | last post by:
As far as I know, the using directive is transitive, and I'm not sure I like this. So I'd like to ask if there's any workaround. Consider this: namespace MyNameSpace { void F(SomeNameSpace::SomeOtherNameSpace::YetAnotherNameSpace::SomeType a); void G(SomeNameSpace::SomeOtherNameSpace::YetAnotherNameSpaceSomeOtherType a);
3
4169
by: Vincenzino | last post by:
Hi, I have some problem in using SQL3 recursive queries on DB2 database system (8.1 and 8.2 UDB). I need to compute the transitive closure of a (possibly) ciclic graph using SQL3 on DB2. I MUST use pure SQL3 and I cannot use cursors, indexes and the like. The graph is represented by a set of arcs with the table "arc" having two attributes "a1" and "a2" for source and target nodes resp. The SQL3 query I'm using is the following:
9
2740
by: Mikito Harakiri | last post by:
Transitive closure (TC) of a graph is with TransClosedEdges (tail, head) as ( select tail, head from Edges union all select e.tail, ee.head from Edges e, TransClosedEdges ee where e.head = ee.tail ) select distinct * from TransClosedEdges
1
4416
by: mp | last post by:
Hi, I have problem with project dependencies. I have made new setup application and everything works perfectly on my comp with VS 2003. On another computer with VS 2002 it does not work. Normally it does not work on computer without VS framework. I am not sure what proper way is to include dependencies. I know how VS automatically discovering all dependencies and add it to
2
13865
by: JT Lovell | last post by:
I have a solution with 5 projects and I need them to build in a particular order. I understand that setting the project dependencies will allow this, but when I go to the Project Dependencies dialog, the "Depends on" checkboxes are grayed out. Is there something else required in order to enable these? Thanks, -- JT Lovell
7
13514
by: barias | last post by:
Although circular dependencies are something developers should normally avoid, unfortunately they are very easy to create accidentally between classes in a VS project (i.e. circular compile-time dependencies). But then I started wondering how "easy" it would be to similarly make a NON-RUNTIME circular dependency between (implicitly linked) DLLs. Indeed authors like John Lakos, who focus on compile/link-time dependencies (not run-time),...
8
2380
by: Scott Sauyet | last post by:
I found myself needing to find my way recursively through a document in XSLT, finding the dependencies one element had on others, and including only those in an initial set, their dependencies, the dependencies of those dependencies and so on. I managed to do it, but I'm not really happy with the method, and I'm wondering if anyone can suggest something better. My technique involves manipulating a string containing the names, calling a...
6
5395
by: =?Utf-8?B?YXByMDUyNA==?= | last post by:
I am wondering if there is a devenv switch that will ignore build dependencies that are set in .xxproj files. At the command line I am attempting to build individual projects that I do not want subjected to the build dependencies set in the project files.
2
1900
by: papinceto87 | last post by:
#!/usr/bin/env perl ################################################################ ### gsyn2 ### Plamena Dragieva ### Oct 30, 2008 ################################################################ use strict;
0
9244
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9111
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9004
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8961
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5922
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4679
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2439
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2058
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.