Entity and Attribute Names

The most important rule to remember when naming entities is that entity names are always singular. Singular entity names facilitate reading the model with declarative statements. For example, "A FLIGHT <transports> zero or more PASSENGERs" and "A PASSENGER <is transported by> one FLIGHT." When you name an entity, you are also naming each instance. For example, each instance of the PASSENGER entity is an individual passenger, not a set of passengers.

Attribute names are also singular. "person name," "employee SSN," "employee bonus amount," for example, are correctly named attributes. Naming attributes in the singular helps to avoid normalization errors, such as representing more than one fact with a single attribute. The attributes "employee child names" or "start or end dates" are plural, and highlight errors in the attribute design.

A good rule to use when naming attributes is to use the entity name as a prefix. The rule here is:

  • Prefix qualifies
  • Suffix clarifies

Using this rule, you can easily validate the design and eliminate many common design problems. For example, in the CUSTOMER entity, you can name the attributes "customer name," "customer number," "customer address," and so on. Suppose you wanted to name an attribute "customer invoice number." Use the rule to verify that the suffix "invoice number" tells you more about the prefix "customer." Because it does not, move the attribute to a more appropriate location, such as INVOICE.

Sometimes it is difficult to give an entity or attribute a name without first giving it a definition. As a general principle, providing a good definition for an entity or attribute is as important as providing a good name. The ability to find meaningful names comes with experience and a fundamental understanding of what the model represents.

Because the data model is a description of a business, it is best to choose meaningful business names wherever that is possible. If there is no business name for an entity, assign the entity a name that fits its purpose in the model.