The logical database F1S is used in this user guide to demonstrate the options available to users in SAP Query. Although it is a very simple model, this logical database contains all the important aspects of logical databases.
Logical database F1S contains data for flight bookings. The database contents are updated each time a booking is made. Any evaluation of this database therefore always reflects the current state of flight bookings.
Structure of the Logical Database
Logical database F1S contains three tables:
Information about individual flight connections
Information about individual flights for each flight connection
Information about bookings for a flight
The tables are arranged in a hierarchy as follows:
For each record (flight connection) in SPFLI, there are several records (flights for each flight connection) in SFLIGHT. For each record in SFLIGHT, the table SBOOK contains one record for each booking made.
Structure of Table SPFLI
The table SPFLI contains information about individual flight connections.
A flight connection is identified by the airline carrier (short name) and a flight number (code) which together form the table key. For each flight connection, the table contains information about departure and destination (city, airport, and time) distance and flight duration. A local currency is also specified for each flight connection. This is the currency which the airline carrier uses for its invoices.
Structure of Table SFLIGHT
The table SFLIGHT contains information about individual flights for each flight connection.
A flight is identified by the flight connection (airline carrier and flight number) and the flight date, which together form the table key. For each flight, the table contains information about the plane (type and number of seats), the price, and some other compressed data about bookings already made. The price of a flight is normally specified in the currency used at a flight connection's point of departure.
The data about bookings already made covers the number of bookings and the total amount taken. Since individual bookings can be made in different currencies, this total is always specified in the local currency of the airline carrier.
Structure of Table SBOOK
The table SBOOK contains information about individual bookings.
A booking is identified by the flight connection (airline carrier and flight number), the flight date, and a booking number, which together form the table key. For each booking, the table contains information about the customer (customer number, business or private customer, with or without invoice creation), the booked seat (class, smoker), the amount paid, and the weight of the luggage.
The amount paid for the booking is specified in two currencies - first in the currency in which payment was actually made and second in the local currency of the airline carrier. Discounts that can be negotiated when a booking is made can mean that the amount paid can be less than the fare specified in the table SFLIGHT.
Tables with Additional Information
The tables of logical database F1S also contain a range of information only in short form. Only short names are given for the airline carriers, for example LH for Lufthansa. Detailed information about an airline carrier (for example its full name) is stored in a table that is not part of the logical database.
The reason for this is as follows. The airline carrier is not the only key in table SPFLI. It occurs several times in this table - once for each flight connection it runs. Saving more detailed information in table SPFLI would be largely redundant. Only space-saving short codes are therefore used in table SPFLI. Whenever detailed information is needed, you can retrieve it by accessing an additional table. The key for this additional table is the short code of the airline carrier.
The same applies for a range of further information. Airport information, technical data about aircraft, and customer information is also stored in this way. This is how logical databases usually operate. SAP Query provides utilities that enable you to access all this information.
Listed below are the most important tables, which contain additional information to that in the logical database F1S.
This table contains additional information about an airline carrier, particularly the full name (long text). The table key is the airline carrier short code, which is stored in all of the logical database tables.
This table contains additional information about airports, particularly a long text. The table key is the airport short code. These short codes for airports occur in the table SPFLI twice for each record (for departure airport and destination airport).
This table contains the technical data of a plane such as number of seats, fuel capacity, fuel consumption, dimensions, manufacturer and the like. The table key is the plane type short code. This short code occurs in the table SFLIGHT for each record. It indicates which aircraft is used on particular flight.
This table contains data about the customer such as name, address, telephone number, and other information. The table key is the customer number. Each record in SBOOK contains the number of the customer who made the booking.