Hello, if you have any need, please feel free to consult us, this is my wechat: wx91due
CS 122A: Introduction to Data Management
Homework 1: E/R Modeling
Submission
Date / Time |
Place |
Remarks |
Thursday, April 14 (11:45 PM) |
EEE dropbox |
Due date |
Friday, April 15 (11:45 PM) |
EEE dropbox |
24hour grace period
10 points will be deducted
|
ER Schema Design [100 pts]
Currently, UCA connects cities in California (e.g., between LA and SF). It istrying to provide the lowest flight fare in the region. In order to be profitable, it is critical to properly manage flights to maximize the utilization of its limited number of planes. UCA also operates one or more lounges at the airports with departure flights. Customers with a UCA reservation can use its lounges. In the lounge, there are food menusfor customers, which bring profit to the company. UCA wants to increase the number of lounges in the future.
2. We can identify a unique flight using a flight number (e.g., “UC949”) and a projected departure datetime together, since there can be only one flight with a specific flight number per day. For example, a flight named “UC949” departs from LAX at 02:34 pm and arrives at SFO at 03:24 pm daily. The projected departure datetime and projected arrival datetime are recorded when a flight instance is created. The actual departure datetime and arrival datetime will be updated later. That is, for each flight, four datetimes are recorded at the end. A flight does not have multiple stops.
4. Each flight includes the IATA codes of its departure/arrival airports.
5. Each flight is initialized with departure/arrival airports, projected departure datetime, and projected arrival datetime. Pilots, flight attendants, and an airplane can be assigned later to finalize a flight.
7. Each employee has a unique ID (e.g., “990001”). Each employee has a phone number (e.g., “9491112222”), an address (street, city, state, and zipcode), birthdate, SSN, and job title.
9. Flight attendants ensure the safety and security of passengers during a flight. Thus, a flight must have two or more assigned flight attendants. One or more than one flight attendant can be assigned on one flight. Also, a flight attendant can be assigned to multiple flights. For each attendant, UCA keepsthe overall experience of that attendant in number of service years (e.g., “15”).
10.One type of employeesis maintenance engineers. They check airplanes before and after each flight, and conduct appropriate operations to ensure that all airplanes function properly. UCA keeps the information about each maintenance engineer’sspecialty skills (e.g., “airframes”, “engines”, and “electrical systems”). An airplane must have two or more designated maintenance engineers and a maintenance engineer maintainstwo or more planes. One or more than one maintenance engineer can be assigned to a plane. Also, a maintenance engineer can be assigned to multiple planes.
12.Due to the complexity of each employee class, an employee cannot conduct two types of tasks. For example, a pilot cannot act as a maintenance engineer.
14.Each credit card consists of a number and an expiration date.
15.A customer reserves one flight by calling UCA customer service. A customer creates a reservation that includes only one flight and quantity of tickets for that flight. A customer can make many reservations. However, a customer can make only one reservation per flight. Each reservation includes a datetime when it is booked, price, and quantity of tickets.
16.UCA has one or more lounges at an airport with a departure flight. A lounge can be identified using a unique ID (e.g., “112”). A lounge also includesthe location information at the airport (e.g., “section D32”).
17.A lounge serves many dishes. Each dish has a name and price. The name is unique within a lounge’s menu, but may not be unique across multiple lounges.
18.Each lounge serves one or more dishes.
19.A customer can place an order that contains one or more dishes from a lounge. They also need to indicate the quantity per dish (e.g., 2 chicken tenders and 3 burgers). Of course, that order can be only served by that lounge.
20.Each order will be assigned a unique ID and datetime of the order.
21.For each order, the total cost for all the dishes will be calculated by adding the prices of the dishes. This total amount must be stored in each order.
(a) [50pts] All of the relevant entities and their attributes, including keys. For entities, you can ONLY use “Employee”, “Maintenance Engineer”, “Pilot”, “Flight Attendant”, “Operation Staff”, “Airport”, “Flight”, “Airplane”, “Lounge”, “Customer”, “Dish” and “DishOrder”. Do not create more entities.
(b) [50pts] All the relevant relationships and associated attributes, appropriate cardinality constraints for the relationships, and appropriate participation constraints for the relationships.