Online College Courses for Credit

+
Adding Attributes

Adding Attributes

Rating:
(0)
Author: Sophia Tutorial
Description:

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

(more)
See More
Tutorial

what's covered
This tutorial explores the creation of attributes to add to entities in an ERD.

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

An organization would like to create a movie rating application where users would be able to rate movies on a numeric scale as well as provide textual feedback about the movie. The date that the review was submitted should also be stored. As part of the movie, there are some details about it 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 but 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:

File:11511-5110-1.png

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:

File:11512-5110-2.png

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

File:11513-5110-3.png

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

File:11514-5110-4.png

The genre would consist of the genre_name.

File:11515-5110-5.png

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

File:11516-5110-6.png

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

File:11517-5110-7.png

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.


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