You are on page 1of 4

Example 1 on Chapter 6

21. Given the sample records in the CHARTER table shown in Table below, write the relational schema and draw the dependency diagram for the table structure. Make sure that you label all dependencies. CHAR_PAX indicates the number of passengers carried. The CHAR_MILES entry is based on round-trip miles, including pickup points. (Hint: Look at the data values to determine the nature of the relationships. For example, note that employee Melton has flown two charter trips as pilot and one trip as copilot.) Attribute Name Sample Value Sample Value 10233 15-Jan-2006 MIA 1,290 231 Hanson 12 18,940 lbs. Chen Henderson OShaski Benkasi 1234Q PA31-350 10 $2.79 3456Y CV-580 38 $23.36 1234Q PA31-350 10 $2.79 1234Q PA31-350 10 $2.79 Sample Value 10234 16-Jan-2006 TYS 524 544 Bryana 2 348 lbs. Henderson Melton Sample Value 10235 17-Jan-2006 ATL 768 784 Brown 5 155 lbs. Melton

CHAR_TRIP CHAR_DATE CHAR_CITY CHAR_MILES CUST_NUM CUST_LNAME CHAR_PAX CHAR_CARGO PILOT COPILOT FLT_ENGINEER LOAD_MASTER AC_NUMBER MOD_CODE MOD_SEATS MOD_CHG_MILE

10232 15-Jan-2006 STL 580 784 Brown 5 235 lbs. Melton

CHAR_TRIP CHAR_DATE CHAR_CITY CHAR_MILES CUST_NUM

CUST_LNAME CHAR_PAX CHAR_CARGO

Transitive dependency

PILOT COPILOT FLT_ENGINEER LOAD_MASTER AC_NUMBER MOD_CODE

MOD_SEATS MOD_CHG_MILE

Transitive dependencies

The relational schema is written as follows:

CHARTER(CHAR_TRIP, CHAR_DATE, CHAR_CITY, CHAR_MILES, CUST_NUM, CUST_LNAME, CHAR_PAX, CHAR_CARGO, PILOT, COPILOT, FLT_ENGINEER, LOAD_MASTER, AC_NUMBER, MODEL_CODE, MODEL_SEATS, MODEL_CHG_MILE)

22. Decompose the dependency diagram in Problem 21 to create table structures that are all in 3NF and write the relational schema. Make sure that you label all dependencies. CHARTER (CHAR_TRIP, CHAR_DATE, CHAR_CITY, CHAR_MILES, CUST_NUM, CHAR_PAX, CHAR_CARGO, PILOT, COPILOT, FLT_ENGINEER, LOAD_MASTER, AC_NUMBER) CUSTOMER (CUST_NUM, CUST_LNAME) AIRCRAFT (AC_NUMBER, MODEL_CODE, MODEL_SEATS, MODEL_CHG_MILE)

Decompose the dependency diagram further:

CHARTER (CHAR_TRIP, CHAR_DATE, CHAR_CITY, CHAR_MILES, CUST_NUM, CHAR_PAX, CHAR_CARGO, PILOT, COPILOT, FLT_ENGINEER, LOAD_MASTER, AC_NUMBER) CUSTOMER (CUST_NUM, CUST_LNAME) AIRCRAFT (AC_NUMBER, MODEL_CODE) MODEL (MODEL_CODE, MODEL_SEATS, MODEL_CHG_MILE)
CHARTER table

CHAR_TRIP CHAR_DATE CHAR_CITY CHAR_PAX CHAR_MILES CUST_NUMBER

PILOT

Continued .

COPILOT

FLT_ENGINEER LOAD_MASTER

CUSTOMER table

AIRCRAFT table

MODEL table

CUST_NUMBER

CUST_LNAME

AC_NUM

MOD_CODE

MOD_CODE MOD_SEATS MOD_CHG_MILE

23. Draw the Crows Foot ERD to reflect the properly decomposed dependency diagrams you created in Problem 22. Make sure that the ERD yields a database that can track all of the data shown in Problem 21. Show all entities, relationships, connectivities, optionalities, and cardinalities.