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 > Functional Dependency Question-Answer (Revision)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-29-09, 17:10
makko187 makko187 is offline
Registered User
 
Join Date: Nov 2008
Posts: 16
Functional Dependency Question-Answer (Revision)

Hi,

Is it ok for me to post some revision work and ask for it to be corrected here?
I am revising for a repeat exam atm and I have nobody to correct my work..

Here goes:

Question:
Table for question
Using the following example business rules and the example table of Appendix A (at the back of this exam paper):
List four functional dependencies using the standard notation you have studied. (You must refer to one of the above rules or state an assumption to qualify each functional dependency you list)
• Rule 1: A supplier number uniquely identifies a real-world supplier.
• Rule 2: A part number uniquely identifies a part.
• Rule 3: The (supplier number, part number) combination can be used to uniquely identify how a supplier supplies a given part (i.e. quantity supplied and any other details about a shipment)
• Rule 4: The city in which a supplier is located determines the status value for that supplier.

Answer:
sNum -> sName (Rule 1)
pNum-> pName (Rule 2)
sNum,pNum -> qtyDelivered (Rule 3)
sCity -> sStatus (Rule 4)

Fingers crossed..

Thanks Guys..this really means a lot. I've to repeat this exam early August and I have nobody else to correct my work..

Last edited by makko187; 08-03-09 at 19:06.
Reply With Quote
  #2 (permalink)  
Old 07-30-09, 04:54
dportas dportas is offline
Registered User
 
Join Date: Dec 2007
Location: London, UK
Posts: 732
You haven't told us what the question is. The final dependency in your answer isn't implied by any of the rules.
Reply With Quote
  #3 (permalink)  
Old 07-30-09, 05:17
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
Nor the second.
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #4 (permalink)  
Old 08-03-09, 19:20
makko187 makko187 is offline
Registered User
 
Join Date: Nov 2008
Posts: 16
Quote:
Originally Posted by dportas
You haven't told us what the question is. The final dependency in your answer isn't implied by any of the rules.

My bad guys, sorry.

I did a bad copy and paste job.

I have corrected my answer also, that was also a silly copy error.

Thanks guys for looking at this.. I have an exam soon and have nobody to check my work.
Reply With Quote
  #5 (permalink)  
Old 08-04-09, 02:44
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
Looks fine.
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #6 (permalink)  
Old 08-04-09, 15:37
makko187 makko187 is offline
Registered User
 
Join Date: Nov 2008
Posts: 16
Normalisation Question

Thanks pootle_flump..

Ok, well here's a question onNormalisation that I did.. I'm pretty sure i'm correct but need some reassurance.

I'm happy with it but I'd just like to know for sure if i'm doing it right.. The amount of marks going or each question seems kind of odd.. 2 marks for part (i) even though I did a lot of work to get there.. Decompose table to 1NF and then 2NF. That brings me to my main query, am I doing too much here? Is it jst a one or two line answer that is required?
Part (ii) and part (iii) seem to be the same questions asked in slightly different ways but they have most amount of marks..

What am I missing here?

---------------------
Here's my work: (PK is underlined)
---------------------
Table:here

Questions:
Using the single-table of Appendix A as a start point
(i) Decompose an example of a 2NF table.(2 marks)
(ii) State why the table you specified as your answer to part (i), is in 2NF and not in 3NF.(4 marks)
(iii) Decompose an example of a 3NF table.(2 marks)
(iv) State why the table you specified as your answer to part (iii), is in 3NF and not in 2NF.(4 marks)

Answers:
(i)
1NF:
SingleTableDB(sNum,sName,sStatus,sCity,pNum,pName, pColour,pWeight,pQtyDelivered)

Dependencies:

sNum->sName,sStatus,sCity (Partial Dep)
pNum->pName,pWeight,pColour (Partial Dep)
sNum,pNum->pQtyDelivered (Full Dep)
sCity->sStatus (Transitive Dep)

Dependency Diagram: here

2NF:
Suppliers(sNum,sStatus,sCity)
Parts(pNum,pName,pWeight,pColour)
Delivieries(sNum,pNum,pQtyDelivered)

** Dependency Diagram for each new table here **
** Suppliers shows transitive dependency between sStatus and sCity **

(ii)

Because a transitive dependcy exists (???) Enough for 4 marks?

(iii)


sCity -> sStatus
Suppliers (sNum, sName, sCity)
Parts(pNum, pName, pColour, pWeight)
Deliveries(pNum,pName,pQtyDelivered)
Status(sCity,sStatus)

(iv)

Because the transitive dependency between sCity and sStatus no longer exists. I have made a new table Status that stores the relevant sStatus for each sCity. (???) Enough for 4 marks?

What is non-loss decomposition?
Non-Loss Decomposition happens during normalisation. It means that during normalisation (decomposing tables) no data is sacrificed due to the restructuring of tables.


Do you guys mind looking over this stuff??
Reply With Quote
  #7 (permalink)  
Old 08-05-09, 02:35
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
Looks fine and I agree the marking appears imbalanced.
You did lose one column when you normalised to 2NF though....
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #8 (permalink)  
Old 08-05-09, 02:54
makko187 makko187 is offline
Registered User
 
Join Date: Nov 2008
Posts: 16
Oop, forgot to put in sName.. Silly me, I do usually count up the number of attributes after each step.

Thanks for checking it over. It seems i'm not doing as bad as I had thought!
Reply With Quote
  #9 (permalink)  
Old 08-05-09, 03:27
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
I suppose for ii) you could give details about specifically what the transitive dependency is rather than just saying one exists. Without even looking at the model anyone could come up with that answer to the question.

That marking scheme is really odd - ii and iV are effectively the same question.
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #10 (permalink)  
Old 08-09-09, 12:34
makko187 makko187 is offline
Registered User
 
Join Date: Nov 2008
Posts: 16
Quote:
Originally Posted by pootle flump
I suppose for ii) you could give details about specifically what the transitive dependency is rather than just saying one exists. Without even looking at the model anyone could come up with that answer to the question.

That marking scheme is really odd - ii and iV are effectively the same question.
Taken into consideration..thanks.

Thanks for you help.
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