Database Reference
In-Depth Information
5.8 Innovation: The Object/Entity Specification Grid
This section introduces an innovative approach to database design specification that has
been successfully used by the author on a number of major projects. The approach may
be construed as an extension of the UML model, but is applicable to any database model.
As mentioned in chapter 3 (section 3.6), for large complex projects (involving
huge databases with tens of entities or object types), unless a CASE or RAD tool which
automatically generates the ORD or ERD is readily available, manually drawing and
maintaining this important aspect of the project becomes virtually futile. Even with a
CASE tool, perusing several pages of O-R (E-R) diagram may not be much fun. In such
cases, an
object/entity specification grid
(O/ESG) is particularly useful. In a relational
database environment, the term
entity specification grid
(ESG) is recommended; in an
object-oriented environment, the term
object specification grid
(OSG) is recommended.
The O/ESG presents the specification for each object type (or entity) as it will be
implemented in a database consisting of normalized relations. The conventions used for
the O/ESG are shown in Figure
5-13
; a summary of these conventions follows:
•
Each object type (or entity) is identified by a reference code, a
descriptive name, and an implementation name (indicated in
square brackets).
•
For each object type (or entity), the attributes (data elements) to
be stored are identified.
•
Each attribute is specified by its descriptive name, the
implementation name indicated in square brackets, a physical
description of the attribute (as described below), and whether the
attribute is a foreign key.
•
For physical description, the following letters will be used to
denote the type of data that will be stored in that attribute,
followed by a number which indicates the maximum length of
the field: (A) alphanumeric, (N) numeric, or (M) memo. This is
specified within square braces. For instance, the notation [Dept#]
[N4] denotes a numeric attribute of maximum length 4 bytes.
In the case of an attribute that stores a memo (M), no length is
indicated because a memo field can store as much information
as needed. If a real number value is being stored with a decimal
value, two numbers will be used: the first number will indicate
the length for the whole number part and the second number will
indicate the field length of the decimal part (e.g. [N(9,2)]).
•
An attribute that is a foreign key is identified by a comment
specifying what object type (or entity) is being referenced. The
comment appears in curly braces.
•
For each object type (or entity) a comment describing the data to
be stored is provided.