The DataBase Course
Exercise No. 1
Entity-Relationship, Network and Relational Models
Due on November 18th by midnight
Important Course Information:
- See the course home page on www.cs.huji.ac.il/course/db
- Subscribe to the course's newsgroup local.course.db
- Register to the course immidiately to get an oracle account, by running ~db/bin/register
Exercise Questions:
You are required to design a database containing information on university libraries. The information that the database should contain is the following:
- Students study at compuses. A student may study at several campuses.
- University libraries are situated in campuses. A campus may contain several libraries.
- Students may borrow books from certain libraries only.
- Books have identity numbers - each library maintains its own set of identity numbers. Each book belongs to one library.
- Students can borrow books using inter-library loan. This can be useful if a student wishes to borrow books from a distant library, or a library where he/she is not a member. The student orders the book through a library where he/she is a member.
- Give an entity-relationship diagram for this database:
- Define the entity sets, and their appropriate attributes.
- Define relationships and their attributes.
- Specify keys for each entity
- Specify the functionality of relationships (many-to-one, etc.)
- Denote weak entity sets (that own keys through relationships), the corresponding relationships, and their partial keys.
State explicitly any assumptions which you make for the design. Note that the attributes are not complete - you should design them yourself for each entity and relationship.
- Transform the entity-relationship diagram into a network database schema.
- Transform the entity-relationship diagram into a relational database schema.