0% found this document useful (0 votes)
16 views9 pages

Database Term Project

This document discusses the design of a database for pilots and airlines. It begins by outlining the key entities and their attributes. It then discusses functional dependencies and the one-to-many relationship between pilots and airlines. The document goes on to describe how to normalize the data by taking it through first, second, and third normal form. Finally, it provides the SQL code to create tables for pilots, pilot-airline assignments, and airlines at each normal form level.

Uploaded by

Sham vv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views9 pages

Database Term Project

This document discusses the design of a database for pilots and airlines. It begins by outlining the key entities and their attributes. It then discusses functional dependencies and the one-to-many relationship between pilots and airlines. The document goes on to describe how to normalize the data by taking it through first, second, and third normal form. Finally, it provides the SQL code to create tables for pilots, pilot-airline assignments, and airlines at each normal form level.

Uploaded by

Sham vv
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 9

1

Database Term Project

Student’s Name

Course Name

Professor’s Name

Date
2

1. Assumptions I felt are appropriate were:

a) All data is represented as mathematical n-ary relations

b) An n-ary relation being a subset of the Cartesian product of n domains.

The initial entities include: Pilot ID, First Name, Last Name, Job Title, Salary, Airline ID,

N planes, N routes and N pilots.

2. A functional Dependency (FD) is a relationship between two attributes, typically between

the PK and other non-key attributes within a table. For any relation R, attribute Y is

functionally dependent on attribute X (usually the Primary Key), if for every valid

instance of X, that value of X uniquely determines the value of Y.

Consider the functional dependency:

AirlineID - - > NPLanes, NRoutes, NPilots

Here, Airline ID is referred to as a determinant while NPlanes, NRoutes, NPilots are

referred to as the dependents. This is because AirlineID determines all the other

entities to the right. All the entities to the right depend on the AirlineID entity which is

the primary key.


3

3. One-to-Many relationship

This is a relationship where each entry in one table may be linked to one or more records

in the other table. In our case database for example, One Airline with One Airline ID can

have many pilots associated with it hence a One-to-Many relationship.

4. Design: Tables and Fields at each Normal Form Level

Normalization is the branch of relational theory that provides design insights. It is the

process of determining how much redundancy exists in a table.

The goals of Normalization are:

i. To be able to characterize the level of redundancy in a relational schema


4

ii. To provide mechanisms for transforming schemas in order to remove redundancy

a) First Normal Form(1NF)

Here, only single values are permitted at the intersection of each row and column; hence,

there are no repeating groups.

To normalize a relation that contains a repeating group, remove the repeating group and

form two new relations.

Process for 1NF:

 In the PilotAirlines table the repeating group is the Airline information which is

removed.

 Identify the PK for your new table. The PK must uniquely identify the attribute

value(PilotID and AirlineID)

 After removing all the attributes you are left with Pilot Airline table.

 The Pilot table is now in First Normal Form

The two new tables are:

Pilot (PilotID, FName, LName, Job Title, Salary)

PilotAirline (PilotID, AirlineID, NPlanes, NRoutes, NPilots)


5

b) Second Normal Form (2NF)

For the second normal form, the relation must first be in 1NF. The relation is

automatically in 2NF if, and only if, the PK comprises a single attribute.

Process for 2NF:

 The Pilot table is already in 2NF because it has a single column PK

 When examining the PilotAirline table, we see that not all the attributes are fully

dependent on the Primary Key; specifically, all Airline information. The only

attribute fully dependent is the AirlineID


6

 Identify a new table that contains the Airline information and identify its PK. The

three new tables are:

Pilot table (PilotID, FName, LName, Job Title, Salary)

PilotAirline table (PilotID, AirlineID)

Airline table (AirlineID, NPlanes, NRoutes, NPilots


7

c) Third Normal Form (3NF)

To be in third normal form, the relation must be in second normal form. Also all

transitive dependencies must be removed

Process for 3NF:

 Eliminate all dependent attributes in transitive relationships from each of the

tables that have a transitive relationship.

 Create new table(s) with removed dependency.

The 3 new tables are:

Pilot table (PilotID, FName, LName, Job Title, Salary)

PilotAirline table (PilotID, AirlineID)


8

Airline table (AirlineID, NPlanes, NRoutes, NPilots

5. Pilot Table

CREATE TABLE PILOT TABLE AS SELECT PILOT ID, F NAME, L NAME, JOB TITLE,

SALARY FROM REPORT TABLE;

PilotAirline Table

CREATE TABLE PILOTAIRLINE TABLE AS SELECT PILOT ID, AIRLINE ID FROM REPORT

TABLE;

Airline Table

CREATE TABLE AIRLINE TABLE AS SELECT AIRLINE ID, N PLANES, N ROUTES, N PILOTS

FROM REPORT TABLE;

References
9

Ordonez, C. (2005). Integrating K-means clustering with a relational DBMS using SQL. IEEE

transactions on Knowledge and Data engineering, 18(2), 188-201.

Mohan, C. (1993). IBM's relational DBMS products: features and technologies. ACM SIGMOD

Record, 22(2), 445-448.

Wang, M. (2001). Implementation of object-relational DBMSs in a relational database

course. ACM SIGCSE Bulletin, 33(1), 367-370.

Chang, S. K., Deufemia, V., Polese, G., & Vacca, M. (2007). A normalization framework for

multimedia databases. IEEE Transactions on Knowledge and Data Engineering, 19(12),

1666-1679.

Kroha, P. (2005). Shortcomings and extensions of relational DBMS. Information Management

in Computer Integrated Manufacturing: A Comprehensive Guide to State-of-the-Art CIM

Solutions, 50-69.

You might also like