CS603 - Software Architecture and Design
Assignment# 1
BC230429981
Muhammad Abdullah
Solution:
a) As there can be multiple librarians in the staff who manage the library so the relationship
will be many-to-many.
b) many-to-many
c) Following are the tables for the given scenario
Librarian
Book
Author
Student
Course
Course_Book (junction table)
Librarian_Book (junction table)
Author_Book (junction table)
d) Following are the tables details of a & b
1. Librarian
LibrarianID (Primary Key)
Name (nvarchar)
Email (nvarchar)
2. Book
BookID (Primary Key)
Title (nvarchar)
Genre (nvarchar)
3. Course
CourseID (Primary Key)
CourseName (nvarchar)
CreditHours (int)
4. Course_Book (junction table for Courses and Books)
CourseID (Foreign Key)
BookID (Foreign Key)
5. Librarian_Book Table (associative table for Librarians and Books)
LibrarianID (Foreign Key)
BookID (Foreign Key)