Online College Courses for Credit

Adding Attributes

Adding Attributes

Author: Sophia Tutorial

Recognize correctly defined and named attributes that have been added to an entity.

See More

what's covered
This tutorial explores the creation of attributes to add to entities in an ERD.
  1. Movie Rating Example
  2. Defining Attributes

1. Movie Rating Example

Let us take a look at our scenario again to get started.

An organization would like to create a movie rating application where users rate movies on a numeric scale and provide feedback about the movie. The date that the review was submitted should also be stored. There are details about the movie including the actors, movie title, description, and release date. A movie can belong to multiple genres while a genre can also have multiple movies. The user should log into the system using a username/password combination and the system would also store their first name, last name, and date of birth.

We have already defined in the prior tutorial that our entities are the following:

Entity Example

2. Defining Attributes

We should now define what the attributes of each of the entities are. In looking at our scenario, we can define what those immediate ones are.

From the User entity, we can define based on the details that the attributes should consist of the username, password, first name, last name, and date of birth. With attributes, in Chen’s notation, we signify those by an oval with a line that connects the attribute to the entity like:

User Entity

The Rating entity would consist of the numericRating and has the textualRating:

Rating Entity

The movie entity would consist of the title, description, and release date.

Movie Entity

The genre would consist of the genre_name.

Genre Entity

The actor would have the first name and last name as attributes:

Actor Entity

Altogether, the ERD with just the entities and attributes would look like the following:

ERD Example

Visually, we can still determine which items are entities and which items are attributes. However, the Chen notation can get very busy with too many attributes and entities. It’s a great starting point, but if needed, switching to Crow’s foot notation would make it visually easier to follow.

Attributes will be drawn using ovals in the Chen notation with a line between them and the entities to indicate their relationship.

Source: Authored by Vincent Tran