Project Deliverable #2: Sample Entity-Relationship Model

This model is intended to capture the requirements for the Swapaholic.com website. Refer to the project proposal document for the original client requirements.

Entity-Relationship Diagram

First attempt:

Swapaholic.com E-R Model

Convert the Borrows relationship into an associative entity:

Swapaholic.com E-R Model

Entity-Relationship Dictionary

BORROW_INFO Entity

A future, current, or past loan of a single item to a single swapper. Future loans are known as "requests". This entity is involved in the following relationships:

  1. An item may be borrowed many times, or none at all, but each borrow request must be for a single item.
  2. Each borrow must be for a single swapper, and a swapper may make many borrows, or none at all.
  3. The "Returned" relationship reads as: "An item is returned in a specific condition, or has not yet been returned, and a returned condition may apply to many borrows, or none at all."

Attributes

CONDITION Entity

A reference entity that records the possible conditions in which an item may be returned.

Attributes

GROUP Entity

A group that a swapper must join to swap items with the group's other members.

Attributes

ITEM Entity

An item that can be swapped amongst members of a group.

The "Owns" relationship reads: "An item owned by a single swapper, and a swapper may own many items, or none at all." The "ListedAs" relationship reads: "An item is of a single media category, and a category may apply to many items, or none at all."

Attributes

CATEGORY Entity

A reference entity that records the possible types of media categories.

Attribute

SWAPPER Entity

The "Belongs" relationship reads: "A swapper may join many groups, or none at all, and a group must contain at least one swapper, and possibly many."

The join_date attribute of this relationship specifies the date on which a swapper joined a specific group.

Attributes