Computer Science – 8.1 Database Concepts | e-Consult
8.1 Database Concepts (1 questions)
Login to see all questions.
Click on a question to view the answer
Entities:
- Student: Attributes: StudentID (PK), Name, Date of Birth, Email
- Course: Attributes: CourseID (PK), Course Name, Credits
- Lecturer: Attributes: LecturerID (PK), Name, Department
- Address: Attributes: AddressID (PK), Street, City, Postcode
Relationships:
- Student 1 Course: Many-to-many relationship. Implemented with a linking table StudentCourse.
StudentCourse Attributes: StudentID (FK to Student entity), CourseID (FK to Course entity), Grade
- Course 1 Lecturer: One-to-many relationship. A course is taught by one lecturer.
Cardinality: 1:N
- Student 1 Address: One-to-many relationship. A student can have multiple addresses.
Cardinality: 1:N
- Course 1 Course: Many-to-many relationship (prerequisites). Implemented with a linking table CoursePrerequisite.
CoursePrerequisite Attributes: PrerequisiteCourseID (FK to Course entity), CourseID (FK to Course entity)
Diagram (Conceptual):
The diagram would include rectangles for each entity, ovals for attributes, and diamonds for relationships. Lines would connect the entities, with symbols indicating cardinality. The prerequisites relationship would be represented by a diamond with a 'many' and 'many' symbol on each end.