DB Exercises 3 Lab 3 Problems Data Modeling
DB Exercises 3 Lab 3 Problems
Data Modeling Exercises : 1. DB Lab 3 -2 extended Create an appropriate E-R diagram (with cardinalities) from the following business rules. A company division operates up to four departments. Each department is operated by one division. Each department employs many employees. An employee works for a single department. Each employee may have one or more dependents. A dependent must belong to an employee. Each employee may have many employment histories. An employment history must be about an employee. Each department has a manager (is managed by an employee). An employee may manage a department. DIVISION 1 (1, 4) operates M (1, 1) 1 DEPARTMENT (1, 1) (1, N) 1 manages employs claims DEPENDENT M (1, 1) (0, N) 1 EMPLOYEE (0, 1) 1 (0, N) 1 has M (1, 1) EMP_HIST Database Design 2
Data Modeling Exercises : 2. DB Lab 3 -3 Draw a fully-labeled E-R diagram that include entities, relationships, connectivities and cardinalities from the business rule described below. Each dinner is based on a single entree, but each entree can be served at many dinners. Each dinner invitation can be mailed to many guests, and each guest can receive many invitations. A guest can attend many dinners, and each dinner can be attended by many guests. Requirements: A dinner must have at least one guest attending. In other words, the database needs not keep track of the dinners that no one attended. ENTREE 1 (1, N) is served at M (1, 1) DINNER 1 (1, N) 1 INVITATION, similar to ATTENDANCE, is a bridge entity that decomposes M: N "invite" relationship between DINNER and GUEST. By bridging DINNER and GUEST, INVITATION keeps track of what dinner invitation was sent to which guest. DINNER invitation must be sent out to at least once, and a guest has to receive at least 1 invitation. DINNER must be attended by at least one guest, but a guest may not attend any dinner after receiving invitations. M ATTENDANCE (1, N) (1, 1) M Database Design INVITATION M 1 (1, 1) (0, N) GUEST (1, N) 1 (1, 1) M 3
- Slides: 3