1/44
45 question-and-answer flashcards reviewing supertype/subtype concepts, examples, and diagramming practices from the lecture notes.
Which entity acts as the supertype in an educational-institution EER diagram that includes Faculty, Staff, and Students?
MEMBER
Which shared attributes belong inside the MEMBER rectangle?
Member ID, Name, Email
Identify the subtypes for the MEMBER supertype.
FACULTY, STAFF, STUDENT
Which attribute is unique to the FACULTY subtype?
Department
Which attribute is unique to the STAFF subtype?
Position
Which attribute is unique to the STUDENT subtype?
Major
In a vehicle EER diagram, what is the supertype and what are its subtypes?
Supertype: VEHICLE; Subtypes: CAR, TRUCK, MOTORCYCLE
Which attributes belong to the CAR subtype?
Number of Doors, Trunk Size
Which attributes belong to the TRUCK subtype?
Payload Capacity, Number of Axles
Which attributes belong to the MOTORCYCLE subtype?
Engine Capacity, Type
How do CAR, TRUCK, and MOTORCYCLE inherit attributes?
Each subtype inherits Vehicle ID, Manufacturer, and Model from the VEHICLE supertype
In a hospital model, what is the supertype for Inpatients and Outpatients?
PATIENT
Which attributes are stored in the PATIENT supertype?
Patient ID, Name, Admit Date
Which attributes are unique to the INPATIENT subtype?
Room Number, Discharge Date
Which attributes are unique to the OUTPATIENT subtype?
Visit Date, Doctor ID
How are PATIENT, INPATIENT, and OUTPATIENT connected in the EER diagram?
Via a circle attached to PATIENT with lines to INPATIENT and OUTPATIENT
When should supertype/subtype relationships be used in data modeling?
When some, but not all, instances share certain attributes
Give an example where a supertype/subtype relationship is beneficial in a university database.
Separating students into graduate and undergraduate, each with different attributes
Which attributes are common to both graduate and undergraduate students?
Student ID, Name, Enrollment Date
Which attributes are specific to graduate students?
Thesis Topic and Advisor
How do supertypes reduce redundancy in data modeling?
By letting attributes be associated only with the relevant subtypes
In an organization model, what is the supertype for Full-time, Part-time, and Interns?
EMPLOYEE
Which attributes are common to all employees?
Employee ID, Name, Date of Joining
Which attributes are unique to Full-time employees?
Salary and Benefits
Which attribute is unique to Part-time employees?
Hourly Rate
Which attributes are unique to Interns?
Stipend and Internship Duration
How do the subtypes Full-time, Part-time, and Intern relate to EMPLOYEE regarding attribute inheritance?
They inherit all attributes from EMPLOYEE
In a retail company, what is the supertype for Perishable and Non-perishable products?
PRODUCT
Which attributes belong to the PRODUCT supertype?
Product ID, Name, Price
Which unique attribute belongs to the PERISHABLE subtype?
Expiry Date
Which unique attribute belongs to the NON-PERISHABLE subtype?
Warranty Period
How is the relationship between PRODUCT, PERISHABLE, and NON-PERISHABLE shown in an EER diagram?
Rectangle PRODUCT connected to a circle, which connects to rectangles PERISHABLE and NON-PERISHABLE
What general entity type covers LAPTOP, DESKTOP, and TABLET?
DEVICE
Which attribute is specific to the LAPTOP subtype?
Battery Life
Which attribute is specific to the DESKTOP subtype?
Form Factor
Which attribute is specific to the TABLET subtype?
Screen Size
What is the correct supertype/subtype relationship for DEVICE and its variants?
DEVICE with subtypes LAPTOP (Battery Life), DESKTOP (Form Factor), TABLET (Screen Size)
For EMPLOYEE specialized into FULL-TIME and PART-TIME, which attributes apply to all employees?
Employee ID, Name, Salary, Department
Which attribute is specific to FULL-TIME EMPLOYEE?
Benefits
How should the EMPLOYEE specialization be depicted in an E-R diagram?
EMPLOYEE with subtypes FULL-TIME EMPLOYEE (Benefits) and PART-TIME EMPLOYEE (Hourly Rate)
Which attributes are common to both ELECTRONIC PRODUCT and FURNITURE PRODUCT?
Product ID, Product Name, Price
What should be the supertype for ELECTRONIC PRODUCT and FURNITURE PRODUCT?
PRODUCT
Which attributes belong in the ELECTRONIC PRODUCT subtype?
Warranty Period, Power Consumption
Which attributes belong in the FURNITURE PRODUCT subtype?
Material, Dimensions
How should the supertype/subtype relationship be represented for PRODUCT, ELECTRONIC PRODUCT, and FURNITURE PRODUCT?
PRODUCT with attributes Product ID, Product Name, Price; subtypes ELECTRONIC PRODUCT (Warranty Period, Power Consumption) and FURNITURE PRODUCT (Material, Dimensions)