MACROMEDIA DREAMWEAVER MX 2004-USING DREAMWEAVER Use Manual page 744

Hide thumbs Also See for DREAMWEAVER MX 2004-USING DREAMWEAVER:
Table of Contents

Advertisement

How many passengers will accompany the shareholders?
How much luggage will they bring—light (carry-on), normal (one suitcase per passenger), or
heavy (more than one suitcase)?
What are the shareholder's catering needs?
What is the occupied hourly fee for the plane?
Where can I contact the shareholder to confirm the flight and the fee estimate?
Choosing the tables that belong in the database
After learning the questions users will ask the database, you think about how your database
should be structured to best answer their questions. The first step is to choose the tables in
the database.
In a relational database, all data is represented in the rows and columns of tables. Each table
describes a collection of related entities such as persons, objects, or events. Each row describes one
occurrence of the entity and each column describes one property of the entity—for example, a
person's last name, an object's color, or an event's date.
You choose the following five tables for the Arrow Aircraft database:
An aircraft table describing all of the business jets managed by Arrow Aircraft
An aircraft bookings table listing all the dates the jets are booked or otherwise unavailable to fly
A shareholders table describing all the corporations and individuals who own shares in the jets
An itineraries table describing all the itineraries requested by the shareholders
A flights table describing all the legs ("flights") of the itineraries.
Choosing the columns in each table
The next step is to choose the columns in each table. The columns describe the properties of each
entity in the table.
A good rule of thumb when choosing columns is to avoid duplicating data. For example, in the
Arrow Aircraft application, you know shareholder names will have to be used in association with
the itinerary data to answer the following Flight Ops question: "What are the shareholder's
catering needs for a particular itinerary?"
One approach is to have shareholder first and last name columns in both the shareholders table
and the itineraries table. However, this would require not only duplicating the name data in two
tables, but also several times in the itineraries table (you would have to enter the shareholder's
name in the itineraries table every time the shareholder requested a new itinerary). This approach
increases data-entry effort, introduces opportunities for errors, and threatens the data's integrity (a
change in one part of the database must be done in other parts).
A much better solution is to enter the shareholder's first and last name a single time in a single
table, the shareholders table. When the time comes to answer the Flight Ops question above, you
can join the shareholders table with the itineraries table using a SQL expression.
Make sure each of your tables has a primary key column. A primary key column contains values
that are unique for each row. This allows you to zero in on the exact row you want when searching
the database. Most primary key columns consist of ID numbers, but you can use natural primary
keys such as government form numbers or aircraft serial numbers.
744
Appendix A: Beginner's Guide to Databases

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DREAMWEAVER MX 2004-USING DREAMWEAVER and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Dreamweaver mx 2004

Table of Contents