Database Reference
In-Depth Information
attributes in a logical model. For example, it is common for customer in-
formation to be physically stored with order information. This practice
could lead to the belief that customer data, such as address or phone num-
ber, is an attribute of an order. However, customer is an entity in and of it-
self, as is an order. Storing the customer attributes with the order entity
would complicate storage and data retrieval and possibly lead to a design
that is difficult to scale.
To model the attributes of your entities, you need to understand a few
key concepts: data types, keys, domains, and values. In the next few sec-
tions we talk about these concepts in detail.
Data Types
In addition to the descriptive information, the definition of an attribute
contains its data type. The data type, as the name implies, defines the type
of information that is being stored in the attribute. For example, an attri-
bute might be a string, a number, or a representation of a true or false
condition.
In logical models, the specification of data types for attributes is not
strictly required. Because a data type is a specification of the physical stor-
age of data, sometimes you decide which data types to use when you cre-
ate the physical model. However, there are benefits to specifying the data
type during the logical modeling phase.
Developers will have a guide to follow when building the physical
model without having to research requirements (something that
would be a duplication of effort).
You will discover inconsistencies across multiple entities that con-
tain the same type of data (e.g., phone numbers) before you create
the physical model.
To help facilitate the creation of the physical database, you can spec-
ify types that are specific to your RDBMS. You do this only when
the target RDBMS is known before the data modeling process has
begun.
Most available data modeling software allows you to select from the
available data types of your RDBMS. Because we are working with
Microsoft SQL Server, we reference its known data types. Now let's take a
look at the various data types used in logical data modeling.
Search WWH ::




Custom Search