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 > Is this wrong/correct conversion?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-05-09, 05:13
cindrella cindrella is offline
Registered User
 
Join Date: May 2009
Posts: 10
Is this wrong/correct conversion?

NIN cntact# Hrs Ename hotel# hotel Loc
1135 C1024 0016 Smith H25 East kill
1057 C1024 0024 hocine H25 East Kill
1068 C1025 0028 white H4 Glasgow
1135 C1025 0015 smith H4 Glasgow

An agency called instant cover supllies part-time/temporary staff to hotels within scotland.this table shows lists the time spent by agency staff working at various hotels.the national insurance no(nin) is unique for every member of staff.
i wanna convert this to BCNF.so plz tell me that following normalization is correct.

1NF
its already in 1nf

2NF
two tables

NIN contract# Ename hours

H# Hloc


3NF
only one table

Contract#(candidate key) Ename hour


BCNF
only one table


Ename hour
Reply With Quote
  #2 (permalink)  
Old 05-05-09, 05:59
mike_bike_kite mike_bike_kite is offline
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,519
Quote:
Originally Posted by cindrella
so plz tell me that following normalization is correct.
I'm afraid that doesn't look right to me.

Why not follow the following steps:
  • Decide all the entities (types of thing) in your data - I'll start you off with staff, hotels and perhaps location.
  • See which of your fields go in to which tables ie NIN might go into staff.
  • If a field doesn't strictly go into one table or another then you'll probably need an extra joining table.
  • For each table decide the unique key or keys for that table
Reply With Quote
  #3 (permalink)  
Old 05-05-09, 07:11
cindrella cindrella is offline
Registered User
 
Join Date: May 2009
Posts: 10
Quote:
Originally Posted by mike_bike_kite
I'm afraid that doesn't look right to me.

Why not follow the following steps:
  • Decide all the entities (types of thing) in your data - I'll start you off with staff, hotels and perhaps location.
  • See which of your fields go in to which tables ie NIN might go into staff.
  • If a field doesn't strictly go into one table or another then you'll probably need an extra joining table.
  • For each table decide the unique key or keys for that table
thx but plz can u tell me the rite one i tried it many times but it always get wrong.
Reply With Quote
  #4 (permalink)  
Old 05-05-09, 07:21
cindrella cindrella is offline
Registered User
 
Join Date: May 2009
Posts: 10
I decide the unique keys for every table.NIN is a primary key in 2NF.
i think there r no limits to create tables in these forms?
if the attribute cant make a relation with anyone then we shoulc leave it or we create another table with it? im confusd
Reply With Quote
  #5 (permalink)  
Old 05-05-09, 07:36
mike_bike_kite mike_bike_kite is offline
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,519
Let's do it step by step.

Think really hard and try and list the entities (types of things) involved.
Reply With Quote
  #6 (permalink)  
Old 05-05-09, 09:35
cindrella cindrella is offline
Registered User
 
Join Date: May 2009
Posts: 10
Quote:
Originally Posted by mike_bike_kite
Let's do it step by step.

Think really hard and try and list the entities (types of things) involved.
ok i try it again this tym
it look like dis

  • 1NF


NIN Cntrct# hours Ename

  • 2NF

NIN Contrt# hrs
Cont# H# Hloc
NIN Ename

  • 3NF


NIN Contrt# Hrs

contrt H#


NIN Ename


H# Hloc



BCNF


NIN Conrt# hrs Ename

contrt# h# hloc






Is it rite or not?
Reply With Quote
  #7 (permalink)  
Old 05-05-09, 11:22
mike_bike_kite mike_bike_kite is offline
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,519
Quote:
Is it rite or not?
Not.

You have to learn to break questions down into parts that are small enough so that you can answer them. Identifying what the entities (types of things) are in your original question is the first and simplest stage. I thought I made this bit reasonably easy to answer by giving you the answer in a previous post (look up 5 posts). If this part of the question appears difficult then you should honestly consider changing your course (I'd avoid any English based subjects too).
Reply With Quote
  #8 (permalink)  
Old 05-05-09, 12:24
cindrella cindrella is offline
Registered User
 
Join Date: May 2009
Posts: 10
Quote:
Originally Posted by mike_bike_kite
Not.
If this part of the question appears difficult then you should honestly consider changing your course (I'd avoid any English based subjects too).
tnx i ill try to do my best.if i talk abt dis course then only this normalization topic creates prob for me otherwise i understand all of db concepts.but u never tell me the rite one!
Reply With Quote
  #9 (permalink)  
Old 05-05-09, 12:49
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
You would want, at all stages, to account for ALL attributes. You appear to just show changes at each stage, though it is hard to tell to be honest.
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #10 (permalink)  
Old 05-05-09, 12:59
mike_bike_kite mike_bike_kite is offline
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,519
Quote:
Originally Posted by cindrella
i understand all of db concepts
OK let's start at the basics. Databases store data about things. What are the things we're storing data about here? I honestly can't make it any simpler than this - I even gave you the names of the tables a few posts back for gods sake!

I'm not going to do your homework for you but I don't mind helping you in the right direction and I promise you it's far harder for me to try and teach you than it is to just give you the answer.

If we ever get past this stage then we can try to decide which fields go in which tables.
Reply With Quote
  #11 (permalink)  
Old 05-05-09, 15:32
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
Mike - I am not certain about this as it is quite some time since I did modelling for academic purposes, but IIRC the idea with these homework questions is to identify entities as they normalise the data (i.e. identify dependencies and decompose).
If the OP correctly identifies all entities and attributes immediately, there's no evidence of the work that has been done. Obviously, this is rather counter to how you and I would model a business problem, but we have modelled a CD collection or two by now so don't need to demonstrate our prowess at solving each normal form in turn for every model.

As said, I'm happy to be contradicted.
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #12 (permalink)  
Old 05-05-09, 15: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
Mike - I am not certain about this as it is quite some time since I did modelling for academic purposes, but IIRC the idea with these homework questions is to identify entities as they normalise the data (i.e. identify dependencies and decompose).
If the OP correctly identifies all entities and attributes immediately, there's no evidence of the work that has been done. Obviously, this is rather counter to how you and I would model a business problem, but we have modelled a CD collection or two by now so don't need to demonstrate our prowess at solving each normal form in turn for every model.
You might be right - I can only show how I'd go about normalising the data. I certainly can't see any sense in what Cindrella is producing and can't see how it's going to come to a final solution. I'm more than happy to let you show the way

You'd think it would be better to teach a more logical approach to students, one that makes the process of normalising the data easier rather than one that makes the process of marking the course work easier.
Reply With Quote
  #13 (permalink)  
Old 05-05-09, 16:06
pootle flump pootle flump is offline
King of Understatement
 
Join Date: Feb 2004
Location: One Flump in One Place
Posts: 14,905
I think it is the same principle as the rest of the sciences - the answer is only a small part of the solution, showing your working is the key.

I agree that I don't see what Cindrella is producing. My understanding with these things is to show ALL attributes and relations at each stage, not the odd thing here and there. The final outcome should be the same of course.

I think this is logical for a teaching mechanism, as it is entirely process driven and does not allow for the leaps of reasoning that we would make as a matter of course.

This is also one of the reasons that students would be better speaking with their tutors than enlisting professionals on forums - we have our own rules and methods of working.
__________________
Testimonial:
Quote:
pootle flump
ur codings are working excelent.
Reply With Quote
  #14 (permalink)  
Old 05-05-09, 16:17
mike_bike_kite mike_bike_kite is offline
vaguely human
 
Join Date: Jun 2007
Location: London
Posts: 2,519
I still think I'll stay clear on this thread all the same, the answer seems obvious but lord knows what method you have to follow to get there.

If it's any consolation Cindrella then the process of normalising databases becomes far more straightforward as time goes by.

mike
Reply With Quote
  #15 (permalink)  
Old 05-05-09, 16:30
cindrella cindrella is offline
Registered User
 
Join Date: May 2009
Posts: 10
I agreed with pootle.If i see the correct solution of dis thread then i understand more easily and I post thread 1st tym on dis site.but its ok thx mike and pootle.
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