| |
|
If this is your first visit, be sure to check out the FAQ by clicking the link above.
You may have to register before you can post: click the register link above to proceed.
To start viewing messages, select the forum that you want to visit from the selection below.
|
 |
|

03-30-10, 13:12
|
|
Registered User
|
|
Join Date: Mar 2010
Posts: 7
|
|
|
Composite PK's and FD's
|
|
Hi
Can someone please give me some guidance?
From the attached spreadsheet below i've determined that the following are the FD's:
> Title --- Description
> Media ID --- Description, Title, Format
> Returned By --- Name, House, Address, City, County, Post Code, Phone
> Status ID --- Status Description
> Status Description --- Status ID
> City --- County
> County --- City
> Phone --- Returned By
And from the FD's i've determined that the attributes on the left hand side of the relationship are the attributes that make up the composite PK.
If you need any clarification on the question or if there is any confusion with the attachment, please let me know
Thanks for your help
Whitebear
|
|

03-30-10, 14:15
|
|
SQL Consultant
|
|
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
|
|
Quote:
Originally Posted by whitebear
> Title --- Description
> Media ID --- Description, Title, Format
> Returned By --- Name, House, Address, City, County, Post Code, Phone
> Status ID --- Status Description
> Status Description --- Status ID
> City --- County
> County --- City
> Phone --- Returned By
|
wha?
Quote:
Originally Posted by whitebear
If you need any clarification on the question
|
there was no question in your post

|
|

03-30-10, 14:43
|
|
Resident Curmudgeon
|
|
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,605
|
|
|
|
Sure there was a question:
Quote:
|
Originally Posted by whitebear
Can someone please give me some guidance?
|
-PatP
__________________
In theory, theory and practice are identical. In practice, theory and practice are unrelated.
|
|

03-30-10, 15:07
|
|
Registered User
|
|
Join Date: Mar 2010
Posts: 7
|
|
My apologies for not being clear.
Have I identified the correct FD's, and if so is the composite PK correct too?
From looking at my results though, there seems to be too many FD's?
Hope that clears things up
Whitebear
|
|

03-31-10, 06:07
|
|
Registered User
|
|
Join Date: Dec 2007
Location: London, UK
Posts: 732
|
|
A candidate key must be both unique and irreducible. Is that the case for your proposed composite key?
I don't see the point of this exercise if the dependencies are to be based solely on the small sample of data you are given. For all practical purposes dependencies are defined by the semantics of the data across all valid values. So for example the dependency County->City holds for the tiny sample you've been given but we know it will not hold as a general rule so it is not likely to be useful to enforce it.
|
|

03-31-10, 06:40
|
|
Registered User
|
|
Join Date: Mar 2010
Posts: 7
|
|
Quote:
Originally Posted by dportas
A candidate key must be both unique and irreducible. Is that the case for your proposed composite key?
|
Are you saying that the composite key is the same as the candidate key then? I can find many definitions of a candidate key, but none for a composite key.
The purpose of the exercise is to teach us Normalisation, we're meant to take the data provided to 3rd NF, but the issue you've identified has caused me confusion, and then I start to over think the data and get my self in a mess.
I think the FD's I'm going to go for are:
> Title --- Description
> Media ID --- Description, Title, Format
> Returned By --- Name, House, Address, City, County, Post Code, Phone
> Status ID --- Status Description
> Status Description --- Status ID
Looking at the possible data entries for the attributes I think the rule will hold.
|
|

03-31-10, 06:58
|
|
Registered User
|
|
Join Date: Dec 2007
Location: London, UK
Posts: 732
|
|
Quote:
Originally Posted by whitebear
Are you saying that the composite key is the same as the candidate key then? I can find many definitions of a candidate key, but none for a composite key.
|
A composite key (also called a compound key) is a candidate key with more than one attribute.
I suggest you ask your tutor if you need more help with the exercise.
|
|

03-31-10, 08:09
|
|
King of Understatement
|
|
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
|
|
<ot>I only learned this recently, but compound key and composite key are not interchangeable terms</ot>
|
|

03-31-10, 08:14
|
|
Registered User
|
|
Join Date: Dec 2007
Location: London, UK
Posts: 732
|
|
Quote:
Originally Posted by pootle flump
<ot>I only learned this recently, but compound key and composite key are not interchangeable terms</ot>
|
In what way? Do you have a reference for that?
|
|

03-31-10, 08:36
|
|
King of Understatement
|
|
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
|
|
I'll confess I don't have an online source that I can hold up as authoritative, however there are several references around e.g.
Compound Key
Composite Key
The difference is subtle and I admit I use them interchangeably, but it is the kind of detail I suspect you would be interested in.
|
|

03-31-10, 09:02
|
|
Registered User
|
|
Join Date: Nov 2003
Posts: 2,407
|
|
Quote:
Originally Posted by whitebear
Have I identified the correct FD's, and if so is the composite PK correct too?
|
What does FD stand for?
|
|

03-31-10, 09:03
|
|
Registered User
|
|
Join Date: Dec 2007
Location: London, UK
Posts: 732
|
|
Quote:
Originally Posted by pootle flump
I'll confess I don't have an online source that I can hold up as authoritative, however there are several references around e.g.
Compound Key
Composite Key
|
Thanks. I think this is based on the ER modelling idea of distinguishing between identifying and non-identifying relationships: the compound key (in ER modelling terms) being the key on the end of an identifying relationship, which means its attributes include a key from another table. In relational model terms there is no difference between one candidate key and another and therefore composite and compound can safely be used interchangeably I would have thought.
|
|

03-31-10, 09:12
|
|
King of Understatement
|
|
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
|
|
Quote:
Originally Posted by shammat
What does FD stand for?
|
Functional Dependency
|
|

03-31-10, 09:52
|
|
vaguely human
|
|
Join Date: Jun 2007
Location: London
Posts: 2,519
|
|
Quote:
Originally Posted by pootle flump
<ot>I only learned this recently, but compound key and composite key are not interchangeable terms</ot>
|
what does the <ot> stand for?
PS I wonder if we were all as keen to do our own coursework, when we were at college, as we appear to be now to do other peoples
|
|

03-31-10, 10:01
|
|
King of Understatement
|
|
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|