Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. For each of the following descriptions, indicate the entity types and the rel

ID: 3816278 • Letter: 1

Question

1. For each of the following descriptions, indicate the entity types and the relationship types between them by identifying the nouns, verbs and prepositions as appropriate.You do not need to draw an ER diagram.

a. A hotel chain has a number of hotels. Each hotel has a number of rooms to rent to customers.

b. An airline employs pilots, flight attendents, and mechanics. The airline has a number of aircraft that it owns. The pilots fly the aircraft. The flight attendants serve on the aircraft. The mechanics repair the aircraft. Customers book an aircraft for travel.

2. Identify attributes for the entity types in each scenario and identify the primary key for each entity, unless the entity type is a weak entity type that is dependent on a strong entity type..

a. A hotel chain has a number of hotels. Each hotel has a number of rooms to rent to customers.

b. An airline employs pilots, flight attendents, and mechanics. The airline has a number of aircraft that it owns. The pilots fly the aircraft. The flight attendants serve on the aircraft. The mechanics repair the aircraft. Customers book an aircraft for travel.

Explanation / Answer

Ans: Entity types and relation types :

Entity can be identified by the word that represents the" noun". It can be any real world object , school database, employee database .

Relationship defines how each entity is associated with each other .

a) In hotel chain database ,hotels (contain rooms) and customers are two entities .

-Customers stay in hotel rooms .In this the stay in shows how customers and hotels are related to each other or associated with each other.

b) In an Airline database

Entities: pilots , flight attendents , mechanics , aircraft , customers.

Relationship : pilots and aircraft are associated with each other by "fly".

Flight attendents and aircraft are associated with each other by " serve".

mechanics and aircraft are associated with each other by "repair".

customers and aircraft are associated with each other by " book ".

2 . The property of entity is known as attribute. Primary keys are the keys that uniquely identifies each row .

It cannot be null

a and b

Customername ,Cus_num , Cus_place, Num_stay

mech_id, mech_name ,mech_type.

cus_id ,cus_name, cus_place, airname.

Entity Possible Attributes Primarykey Hotel Hotel_name ,Hotel_add ,Room_Num Room_Num Customer

Customername ,Cus_num , Cus_place, Num_stay

Cus_num pilots pilotname, pilod_id, age , pdoj.(date of join) pilot_id flightattendents fa_name ,fa_id No pk as flight attendents is weak entity that is dependent on aircraft entity,which includes flight attendents.Without aircraft flightattendants has no meaning. aircraft airname ,air_arrival,air_dep airtype, airid airname mechanics

mech_id, mech_name ,mech_type.

mech_id Customers

cus_id ,cus_name, cus_place, airname.

cus_id