Figure 1 shows an example of an EER diagram for a small private airport database that is used to keep track of airplanes, their owners, airport employees and pilots.  From the requirements for this database, the following information was collected. Each airplane has a registration number [Reg#], is of a particular plane type [OF- TYPE], and is stored in a particular hangar [STORED-IN]. Each plane type has a model number [Model}, a capacity [Capacity], and a location [Location]. The  database also keeps track of the owners of each plane [OWNS]and the employees who have maintained the plane [MAINTAIN]. Each relationship instance in OWNS relates an airplane to an owner and includes the purchase data [Pdate]. Each relationship instance in MAINTAIN relates an employee to a service record [SERVICE]. Each plane undergoes service many times; hence, it is related by [PLANE-SERVICE] to a number of service records. A service record includes as attributes the date of maintenance [Date], the number of hours spent on the work [Hours], and the type of work done [Workcode].  We use a weak entity type [SERVICE] to represent airplane service, because the airplane registration number is used to identify a serVice record. An owner is either a person or a corporation.  Hence, we use a union category [OWNER] that is a subset of the union of corporation [CORPORATION] and person [PERSON] entity types. Both pilots [PILOT] and employees [EMPLOYEE] are subclasses of PERSON.  Each pilot has specific attributes license number [Lic-Num] and restrictions[Restr]; each employee has specific attributes salary [Salary] and shift worked [Shift].  All person entities in the database have data kept on their social security number [Ssn], name [Name], address[Address], and telephone number [Phone}.For corporation entities, the data kept includes name [Name}, address[Address], and telephone number [Phone}. The database also keeps track of the types of planes each pilot is authorized to fly [FLIES] and the types of planes each employee can do maintenance work on [WORKS-ON]. 

 Image

 

Advertisements