Microsoft® SQL Server® 2012 Bible

(Ben Green) #1

148


Part II: Building Databases and Working with Data


■ (^) Usability: By placing columns in the correct table, it’s easier to understand the
database and easier to write correct queries.
■ (^) Extensibility: A non-normalized database is often more complex and therefore
more diffi cult to modify. This can be directly attributed to the distribution of the
redundant data across several tables within the database.
The Three “Rules of One”
Normalization is well defi ned as normalized forms — specifi c issues that address specifi c
potential errors in the design. (There’s a whole section on normal forms later in this chap-
ter.) Therefore, when designing databases, you should implement normalization design
principles from the onset. This approach can help minimize design errors and produce a
highly stable and performing database.
You should follow three rules known as the “Rules of One,” when designing a database. One
type of item is represented by one entity (table). The key to designing a schema that avoids
update anomalies is to ensure that each single fact in real life is modeled by a single data
point in the database. Three principles defi ne a single data point:
■ (^) One group of similar things is represented by one entity (table).
■ One thing is represented by one tuple (row).
■ (^) One descriptive fact about the thing is represented by one attribute (column).
Learn these three simple rules to help you design a properly normalized database.
Identifying Entities
The fi rst step to designing a database conceptual diagram is to identify the entities
(tables). Because any entity represents only one type of thing, it takes several entities
together to represent an entire process or organization.
Entities are usually discovered from several sources:
■ (^) Examining existing documents (order forms, registration forms, patient fi les, and
reports)
■ (^) Interviews with subject-matter experts
■ Diagramming the process fl ow
At this early stage the goal is to simply collect a list of possible entities and their facts.
Some of the entities will be obvious nouns, such as customers, products, fl ights, materials,
and machines.
Other entities will be verbs: shipping, processing, assembling parts to build a product. Verbs
may be entities, or they may indicate a relationship between two entities.
c07.indd 148c07.indd 148 7/30/2012 4:18:11 PM7/30/2012 4:18:11 PM
http://www.it-ebooks.info

Free download pdf