Question
1.Dormitory management system at a campus
A.create entity and their attributes
B.identify the degree of their relationship
C.identity their cardinalities
D.constraints
A.create entity and their attributes
B.identify the degree of their relationship
C.identity their cardinalities
D.constraints
Answers
Answered by
GPT 3.5
A.
1. Dormitory:
- Dormitory name (attribute)
- Dormitory address (attribute)
- Dormitory capacity (attribute)
2. Student:
- Student ID (attribute)
- Student name (attribute)
- Student age (attribute)
- Student gender (attribute)
3. Room:
- Room number (attribute)
- Room capacity (attribute)
- Room type (attribute)
4. Bed:
- Bed number (attribute)
- Bed type (attribute)
B.
- Dormitory and Room have a one-to-many relationship. One dormitory can have multiple rooms, but each room belongs to only one dormitory.
- Room and Bed have a one-to-many relationship. One room can have multiple beds, but each bed belongs to only one room.
- Dormitory and Student have a many-to-many relationship. One dormitory can have multiple students, and one student can be assigned to multiple dormitories.
C.
- Dormitory cardinality: One dormitory to many rooms; Many dormitories to many students.
- Room cardinality: One room to many beds; Many rooms to one dormitory.
- Bed cardinality: One bed to one room; One bed to one student.
- Student cardinality: Many students to many dormitories; One student to one bed.
D. Constraints:
- The number of students assigned to a dormitory cannot exceed its capacity.
- Each student can be assigned to only one bed.
- Each bed can accommodate only one student.
- The number of beds in a room cannot exceed its capacity.
- The number of rooms in a dormitory cannot exceed its capacity.
1. Dormitory:
- Dormitory name (attribute)
- Dormitory address (attribute)
- Dormitory capacity (attribute)
2. Student:
- Student ID (attribute)
- Student name (attribute)
- Student age (attribute)
- Student gender (attribute)
3. Room:
- Room number (attribute)
- Room capacity (attribute)
- Room type (attribute)
4. Bed:
- Bed number (attribute)
- Bed type (attribute)
B.
- Dormitory and Room have a one-to-many relationship. One dormitory can have multiple rooms, but each room belongs to only one dormitory.
- Room and Bed have a one-to-many relationship. One room can have multiple beds, but each bed belongs to only one room.
- Dormitory and Student have a many-to-many relationship. One dormitory can have multiple students, and one student can be assigned to multiple dormitories.
C.
- Dormitory cardinality: One dormitory to many rooms; Many dormitories to many students.
- Room cardinality: One room to many beds; Many rooms to one dormitory.
- Bed cardinality: One bed to one room; One bed to one student.
- Student cardinality: Many students to many dormitories; One student to one bed.
D. Constraints:
- The number of students assigned to a dormitory cannot exceed its capacity.
- Each student can be assigned to only one bed.
- Each bed can accommodate only one student.
- The number of beds in a room cannot exceed its capacity.
- The number of rooms in a dormitory cannot exceed its capacity.