There are various standards for documenting normalized data structures,
developed by different organizations as structured formal methods. Generally
speaking, it really doesn’t matter which method one uses as long as everyone reading
the documents understands it. Part of the documentation will always include a
listing of the attributes that make up each entity (also known as the columns that
make up each table) and an entity-relationship diagram representing graphically the
foreign to primary key connections. A widely used standard is as follows:
■ Primary key columns identified with a hash (#)
■ Foreign key columns identified with a back slash (\)
■ Mandatory columns (those that cannot be left empty) with an asterisk (*)
■ Optional columns with a lowercase “o”
Understand Relational Structures 19
The BOOKS tables can now be described as follows:
Table BOOKS
#* ISBN Primary key, required
o Title Optional
\* Publisher Foreign key, link to the PUBLISHERS table
Table AUTHORS
#* Name Together with the ISBN, the primary key
#\o ISBN Part of the primary key, and a foreign key to the BOOKS table.
Optional, because some authors may not yet be published.
Table PUBLISHERS
#* Publisher Primary key
\o Address code Foreign key, link to the ADDRESSES table
Table ADDRESSES
#* Address code Primary key
o Street
o City
o State
Comments
Post a Comment