The notion of flight is central to (Php web hosting) this
The notion of flight is central to this system, thus we’ll have a flight table. This means that we have to determine a primary key and, at first sight, the flight number would be a good candidate but it’s not and the reason for this is that the flight number is not painted on an aircraft; it’s only a logical way of expressing the movement of a plane between two airports, and also the persons or companies related to this movement. We note that the flight number is kept short three or four digits for improved reference on all printed matter and on airport information screens; thus, this flight number is only meaningful when accompanied by supplemental information, like the airline code (AQ) or company name, and a date. Keeping in mind that there will be other tables associated with this flight table, we have two choices here for the primary key: create a surrogate key (an artificial primary key whose value is not derived from other table’s data) use a combination of columns airline_id, flight_number, departure_moment It is better to create a surrogate key, id. This id will be propagated to the related tables in just one column, which could help to speed up retrieval times because there is just one field to compare between tables. Using the flight’s id will also simplify the writing of queries. Of course we include the flight number the information known to the public in the flight table but not as a primary key. table: reservation column name sample value *flight_id 34 *passenger_id 1302 web_site_quick_reference KARTYU ticket_number 014 88417654 ticket_issued_moment 2007-01-01 12:00 booking_agency_id 1 ticket_refundability_id 1 ticket_type_id 1 seat 19A section_id 2 It would be a mistake to include columns such as passenger1, passenger2 or seat_1a, seat_1b in the flights table. This is why we use the reservation table to hold passenger information related to a specific flight. This table could also be named flight_passenger.
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check Vision professional web hosting services