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 > Normal Form

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-14-05, 19:41
boing boing is offline
Registered User
 
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!
Reply With Quote
  #2 (permalink)  
Old 01-14-05, 20:39
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,605
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
Reply With Quote
  #3 (permalink)  
Old 01-14-05, 20:42
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
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
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #4 (permalink)  
Old 01-15-05, 09:50
boing boing is offline
Registered User
 
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
Reply With Quote
  #5 (permalink)  
Old 01-15-05, 10:01
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
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
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #6 (permalink)  
Old 01-15-05, 10:10
boing boing is offline
Registered User
 
Join Date: Jan 2005
Posts: 30
Quote:
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.

Quote:
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

Quote:
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!
Reply With Quote
  #7 (permalink)  
Old 01-15-05, 17:55
bdimple bdimple is offline
Registered User
 
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
Reply With Quote
  #8 (permalink)  
Old 01-16-05, 05:54
hiepnv hiepnv is offline
Registered User
 
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..
Reply With Quote
  #9 (permalink)  
Old 01-16-05, 15:14
boing boing is offline
Registered User
 
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
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