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.

 
Go Back  dBforums > General > Database Concepts & Design > Composite PK's and FD's

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-30-10, 13:12
whitebear whitebear is offline
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
Attached Files
File Type: pdf ReturnSummary.pdf (11.0 KB, 43 views)
Reply With Quote
  #2 (permalink)  
Old 03-30-10, 14:15
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
Quote:
Originally Posted by whitebear View Post
> 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 View Post
If you need any clarification on the question
there was no question in your post

__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #3 (permalink)  
Old 03-30-10, 14:43
Pat Phelan Pat Phelan is offline
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.
Reply With Quote
  #4 (permalink)  
Old 03-30-10, 15:07
whitebear whitebear is offline
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
Reply With Quote
  #5 (permalink)  
Old 03-31-10, 06:07
dportas dportas is offline
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.
Reply With Quote
  #6 (permalink)  
Old 03-31-10, 06:40
whitebear whitebear is offline
Registered User
 
Join Date: Mar 2010
Posts: 7
Quote:
Originally Posted by dportas View Post
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.
Reply With Quote
  #7 (permalink)  
Old 03-31-10, 06:58
dportas dportas is offline
Registered User
 
Join Date: Dec 2007
Location: London, UK
Posts: 732
Quote:
Originally Posted by whitebear View Post
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.
Reply With Quote
  #8 (permalink)  
Old 03-31-10, 08:09
pootle flump pootle flump is offline
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>
Reply With Quote
  #9 (permalink)  
Old 03-31-10, 08:14
dportas dportas is offline
Registered User
 
Join Date: Dec 2007
Location: London, UK
Posts: 732
Quote:
Originally Posted by pootle flump View Post
<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?
Reply With Quote
  #10 (permalink)  
Old 03-31-10, 08:36
pootle flump pootle flump is offline
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.
Reply With Quote
  #11 (permalink)  
Old 03-31-10, 09:02
shammat shammat is offline
Registered User
 
Join Date: Nov 2003
Posts: 2,407
Quote:
Originally Posted by whitebear View Post
Have I identified the correct FD's, and if so is the composite PK correct too?
What does FD stand for?
Reply With Quote
  #12 (permalink)  
Old 03-31-10, 09:03
dportas dportas is offline
Registered User
 
Join Date: Dec 2007
Location: London, UK
Posts: 732
Quote:
Originally Posted by pootle flump View Post
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.
Reply With Quote
  #13 (permalink)  
Old 03-31-10, 09:12
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
Quote:
Originally Posted by shammat View Post
What does FD stand for?
Functional Dependency
Reply With Quote
  #14 (permalink)  
Old 03-31-10, 09:52
mike_bike_kite mike_bike_kite is offline
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,519
Quote:
Originally Posted by pootle flump View Post
<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
__________________
Mike
Reply With Quote
  #15 (permalink)  
Old 03-31-10, 10:01
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
<ot>ot = off topic</ot>
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On