Consider a library application that needs to keep track of books that have been borrowed. Suppose there is an entity type Loan that has attributes bookID, memberID, dateBorrowed and dateDue. Suppose the due date is always 2 weeks after the borrowed date. Show Loan and its attributes in an ERD.

Short Answer

Expert verified
The 'Loan' entity contains the attributes 'bookID', 'memberID', 'dateBorrowed', 'dateDue'. The ER Diagram consists of a rectangle for the 'Loan' entity and the related attributes are connected to the entity by lines.

Step by step solution

01

Understand the Problem

Interpret the problem and ascertain the requirements. This is a library system where books can be borrowed. It needs to track all the loaned books. For each loan, it needs to record the bookID, memberID, date the book was borrowed, and the due date, which is two weeks after the borrowing date.
02

Identify Entities and Attributes

In this problem, we have only one entity, that is 'Loan'. Attributes for this entity include 'bookID', 'memberID', 'dateBorrowed' and 'dateDue'. Each attribute stores significant data related to the loan entity.
03

Drawing the ER Diagram

Start by drawing a rectangle representing the 'Loan' entity. Vertically list the attributes: 'bookID', 'memberID', 'dateBorrowed', 'dateDue' in ovals, connected to the 'Loan' entity rectangle by lines.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Consider the employee entity type. 1\. Suppose the company needs to track the names of dependents for each employee. Show the dependent name as a multi-valued attribute. 2\. Modify your ERD to show empDependentName as a composite multi-valued attribute comprising first and last names and middle initials.

Suppose a company that sells products has a product entity type with the following attributes: prodNum, prodDesc, prodPrice. Suppose all three attributes are single-valued and that prodNum is a key attribute - each product has a different product number. Illustrate this information in an ERD.

Consider your educational institution or place of work. 1\. What are some of the entity types that would be useful? 2\. What relationships exist that relate entity types to one another? 3\. What attributes would be useful to describe entities and relationships? 4\. Draw an ERD.

Consider requirements for teams, players and games, and develop a suitable ERD. Each team would have a unique name, have a non-player who is the coach, and have several players. Each player has a first and last name and is identified by a number (1, 2, 3, etc.). One player is designated the captain of the team. Assume a game occurs on some date and time, and is played by two teams where one team is called the home team and the other team is called the visiting team. At the end of the game the score must be recorded.

Consider the one-to-one operates relationship in this chapter. Modify the example so that drivers have attributes: driver license, name (which comprises first name and last name), and vehicles have attributes: license plate number, VIN, year, colour, make and model. Note that VIN stands for vehicle identification number and this is unique for each vehicle. Assume that each driver must be assigned to a vehicle.

See all solutions

Recommended explanations on Computer Science Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free