Results 1 to 9 of 9

Thread: Normal Form

  1. #1
    Join Date
    Jan 2005
    Posts
    30

    Normal Form

    Hi, ( my first post, hello everyone)

    I have a load of data and i need 2 put this into first normal form. However all the examples i see it just shows 1nf either as ONE big table or TWO tables.

    Is there any certain rule for the amount of tables/entities that 1NF can have??

    My database is to do with a flight booking system so theres loads and loads of info for the flight, then the airport details and the aircraft details and it just looks wrong in 1 big table or 2 tables.

    Thanks for your help in advance!

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    I'd shoot for third normal form rather than first normal form. There is no point trying to do real work with a design that you know is going to need overhaul before you hit production!

    As in all normal forms, the limit on the number of tables is "enough"... When you have enough tables, you are good to go. A good rule of thumb is to think of the objects you are trying to represent (airports, planes, flights, etc). You need at least that many tables.

    -PatP

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    a database that is in 1NF can have thousands and thousands of tables

    or just one

    the number of tables isn't the criterion

    if you would like to find out more about normalization, check my SQL Links page under Data Modelling
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  4. #4
    Join Date
    Jan 2005
    Posts
    30
    Thanks for your replys. The database i have to show in 1nf, 2nd and 3rd. I think straight to third normal form really and find it hard to think in 1 and 2. Does everyone reckon that for 1nf i should have 3 tables called flight, airport and aircraft? and there work from there? Below is the information that i need 2 record.

    Basically the flight has flight number, depart time, arrival time, dest airport, arrival airport

    The airport will have city, country, runway number

    Aircraft has a description of it such as number of seats, flight make etc and national or international aircraft.

    But also i need a table for completed flights and future flights, i find this weird at 1nf about where 2 add it in to those 3 tables, the tables will just be really big!!

    Then for 3nf i was going to add a table for country as some countries have more than one airport and this could become duplicate.

    I hope this makes sense to someone lol as its confusing me!

    Thanks

  5. #5
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by boing
    The airport will have city, country, runway number
    is this a single runway number, like 23R? or the count of the number of runways at that particular airport?

    Quote Originally Posted by boing
    But also i need a table for completed flights and future flights
    no, that sounds like a simple attribute of the flight entity

    Quote Originally Posted by boing
    i was going to add a table for country as some countries have more than one airport and this could become duplicate
    you could add a table for country, but you don't need to -- you can have multiple airports in a country without violating any of the normal forms
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  6. #6
    Join Date
    Jan 2005
    Posts
    30
    is this a single runway number, like 23R? or the count of the number of runways at that particular airport?
    Its the number of runways at one airport.

    But also i need a table for completed flights and future flights

    no, that sounds like a simple attribute of the flight entity
    But what if there is say a list of 5 future flights?? Is this ok in all normal forms? I cant see how, sorry i am new to database thats all

    you could add a table for country, but you don't need to -- you can have multiple airports in a country without violating any of the normal forms
    Ah i see how this one works yeah! Cos although the country may be the same the acutal aiport city will be different.

    Thanks!

  7. #7
    Join Date
    Jul 2003
    Posts
    74

    Airline Booking Kick-Start Data Model

    Hi,

    This Model on the Database Answers web site might be a good starting-point for you and help to clarify some options :-
    http://www.databaseanswers.org/data_...king/index.htm

    B.Dimple
    DBA

  8. #8
    Join Date
    Jan 2005
    Posts
    1

    Unhappy the normal forms implementation..

    I want to implement three first normal forms (1NF, 2NF, 3NF) by any program, but how to implement. I don't know much. Pls help me. If you had them, pls sent to me. thank you very very much..

  9. #9
    Join Date
    Jan 2005
    Posts
    30
    Thanks for that link for database answers, it helps, although i dont have to do anything with a customer for my database, just the flights etc

Posting Permissions

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