Datasheet
You’ll also notice that the field names have been defined using Pascal casing. Pascal casing is where the
first letter of each word is in uppercase, such as FirstName. You can choose to use a field name with
spaces in it, such as First Name, or with an underscore in it, such as First_Name. Whichever method you
choose to use is fine. However, keep in mind that using field names containing spaces forces you to use
special coding conventions to encapsulate the field name so that the database recognizes it as a single
name and not two separate names. Therefore, it’s a good practice to not use spaces in field names.
Tables 1-3 and 1-4 illustrate the information that you need, but there is no relationship between the
employee and manager. Therefore, you need to create another table that ties the information from these
two tables together. Let’s call this new table Manager Employees. This will enable you to assign employees
to managers.
Figure 1-3 shows the new table, which will form the relationships between the Employee and Manager
tables. Because a manager can be responsible for more than one employee, the Manager Employees table
contains four employee fields.
Figure 1-3
This is the start of your relational database design. At this point, your database design is relational
because the tables relate to one another; however, your design is not yet complete. To complete your
database design, you must normalize it.
Normalization
Normalization is the process of using formal methods to eliminate duplicate data, and to separate data into
multiple related tables. A normalized database offers improved database and application performance over
a database that is not normalized, and over one that has been over-normalized. A normalized database also
leads to more efficient data storage, as you eliminate repeating groups of data. Normalization also helps to
make your tables easier to maintain.
As normalization increases, so do the number of joins required to access the data; however, relational
database engines are optimized to handle normalized databases that require multiple joins. Joins are a logi-
cal relationship between two tables that enable you to access data in both tables in the same query. Joins are
usually defined in the form of foreign key constraints. Joins are covered in more detail in Chapter 12.
Normalizing a logical database design involves using formal methods to separate the data into multiple,
related tables. Each method is typically referred to as a normal form. There are three normal forms to a
normalized database: first normal form, second normal form, and third normal form. An over normalized
database is normalized to fourth and fifth normal forms (which are not covered here) and is rarely
considered practical in relational database design. The normal forms listed here are discussed in the
following sections:
Employee Table
FirstName
LastName
PhoneNumber
Location
JobTitle
Manager Table
FirstName
LastName
PhoneNumber
Location
Manager Employees Table
Manager
Employee1
Employee2
Employee3
Employee4
12
Chapter 1
04_58894x ch01.qxd 10/13/05 5:54 PM Page 12