Database Reference
In-Depth Information
Entities
In Figure 7.1, you can see the Products entity. Notice that it is plural
(Products), and not singular (Product). Why? It is because the entity rep-
resents the kind of information that is being stored. It is a collection of
products—the description of information stored about our company's
products. As a naming standard, we prefer to use plural entity names to re-
flect that the given entity describes all the attributes stored for a given sub-
ject: Employees, Customers, Orders.
It's likely that your model will contain entities whose sole purpose is to
describe a complicated relationship and cardinality. We discuss these types
of entities in Chapter 2: subtypes and supertypes, along with many-to-
many relationships, where additional attributes are associated with the
joining entity. In the case of subtypes, the entity will still be named ac-
cording to the data being stored. When it comes to naming entities that
help model many-to-many relationships, the entity name describes what is
being modeled. For example, in Figure 7.2, you can see the entity we've
used to model the relationship between Products and Vendors.
F IGURE 7.2 The Product Vendors entity from the Mountain View Music data model,
showing a M:M relationship
 
Search WWH ::




Custom Search