Database Reference
In-Depth Information
tribute of several entities. In this case, we should add the EIN domain to
the data model, specifying its name, its data type, and its length. Then, as
we begin adding attributes, we can usually drag and drop the domain onto
the attribute, and it will automatically configure the attribute appropriately.
Even if you aren't using a data modeling tool that can store and add do-
mains with the click of a mouse, documenting your domains is important.
It will help when you're adding attributes to multiple entities; you'll al-
ready know what the specifications are, and you'll have somewhere to look
for them if you forget.
Attributes
Finally, we are ready to add the list of attributes to the entities. We've al-
ready added several attributes when we added primary keys and then rela-
tionships. Now we are adding the attributes that are specific to each entity.
When adding attributes, you may need to be picky about the order in
which you enter them. For readability, it is important to order the attri-
butes in a way that makes sense for the entity. One common example is the
Employees entity, as shown in Figure 7.8.
F IGURE 7.8 The Employees entity for Mountain View Music, with primary keys
and all attributes added
 
Search WWH ::




Custom Search