Databases Reference
In-Depth Information
Customer
Product
Figure 4-1. An entity set is represented by a named rectangle
At the end of the chapter, we'll look at how we can use the open source MySQL Work
bench tool to automatically convert the conceptual design to a MySQL database
schema.
The Entity Relationship Model
At a basic level, databases store information about distinct objects, or entities , and the
associations, or relationships , between these entities. For example, a university database
might store information about students, courses, and enrollment. A student and a
course are entities, while an enrollment is a relationship between a student and a course.
Similarly, an inventory and sales database might store information about products,
customers, and sales. A product and a customer are entities, while a sale is a relationship
between a customer and a product.
A popular approach to conceptual design uses the Entity Relationship (ER) model,
which helps transform the requirements into a formal description of the entities and
relationships that appear in the database. We'll start by looking at how the Entity
Relationship modeling process itself works, then apply it in “Entity Relationship Mod-
eling Examples” for three sample databases.
Representing Entities
To help visualize the design, the Entity Relationship Modeling approach involves
drawing an Entity Relationship (ER) diagram. In the ER diagram, an entity set is rep-
resented by a rectangle containing the entity name. For our sales database example, the
product and customer entity sets would be shown as in Figure 4-1.
We typically use the database to store certain characteristics, or attributes , of the enti-
ties. In a sales database, we could store the name, email address, postal address, and
telephone number for each customer. In a more elaborate customer relationship man-
agment (CRM) application, we could also store the names of the customer's spouse
and children, the languages the customer speaks, the customer's history of interaction
with our company, and so on. Attributes describe the entity they belong to.
 
Search WWH ::




Custom Search