Results 1 to 15 of 15
  1. #1
    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

  2. #2
    Join Date
    Jun 2007
    Location
    London
    Posts
    2,527
    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

  3. #3
    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.

  4. #4
    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

  5. #5
    Join Date
    Jun 2007
    Location
    London
    Posts
    2,527
    Let's do it step by step.

    Think really hard and try and list the entities (types of things) involved.

  6. #6
    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?

  7. #7
    Join Date
    Jun 2007
    Location
    London
    Posts
    2,527
    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).

  8. #8
    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!

  9. #9
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    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:
    pootle flump
    ur codings are working excelent.

  10. #10
    Join Date
    Jun 2007
    Location
    London
    Posts
    2,527
    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.

  11. #11
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    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:
    pootle flump
    ur codings are working excelent.

  12. #12
    Join Date
    Jun 2007
    Location
    London
    Posts
    2,527
    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.

  13. #13
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    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:
    pootle flump
    ur codings are working excelent.

  14. #14
    Join Date
    Jun 2007
    Location
    London
    Posts
    2,527
    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

  15. #15
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •