Database Reference
In-Depth Information
CustomerAddress
CustomerNum CustomerName
Street
City
State Zip
148
Al's Appliance and Sport
2837 Greenway
Fillmore
FL
33336
282
Brookings Direct
3827 Devon
Grove
FL
33321
356
Ferguson's
382 Wildwood
Northield
FL
33146
408
The Everything Shop
1828 Raven
Crystal
FL
33503
462
Bargains Galore
3829 Central
Grove
FL
33321
524
Kline's
838 Ridgeland
Fillmore
FL
33336
608
Johnson's Department Store
372 Oxford
Sheldon
FL
33553
272
687
Lee's Sport and Appliance
282 Evergreen
Altonville
FL
32543
725
Deerield's Four Seasons
282 Columbia
Sheldon
FL
33553
842
All Season
28 Lakeview
Grove
FL
33321
CustomerFinancial
CustomerNum CustomerName
Balance
CreditLimit
RepNum
148
Al's Appliance and Sport
$6,550.00
$7,500.00
20
282
Brookings Direct
$431.50
$10,000.00
35
356
Ferguson's
$5,785.00
$7,500.00
65
408
The Everything Shop
$5,285.25
$5,000.00
35
462
Bargains Galore
$3,412.00
$10,000.00
65
524
Kline's
$12,762.00
$15,000.00
20
608
Johnson's Department Store
$2,106.00
$10,000.00
65
687
Lee's Sport and Appliance
$2,851.00
$5,000.00
35
725
Deerield's Four Seasons
$248.00
$7,500.00
35
842
All Season
$8,221.00
$7,500.00
20
FIGURE 8-11
Result of splitting the Customer table into two tables
The DBA can also split tables for security purposes. In Figure 8-11, the CustomerAddress table contains
customer address data and the CustomerFinancial table contains customer financial data. Those users granted
access only to the CustomerAddress table have no access to customer financial data, thus providing an added
measure of security.
Although you design database tables in third normal form to prevent the anomaly problems discussed in
Chapter 5, the DBA occasionally denormalizes tables to improve performance. Denormalizing converts a table
that is in third normal form to a table that is no longer in third normal form. Usually, the conversion produces
tables that are in first normal form or second normal form. Denormalizing introduces anomaly problems but
can decrease the number of disk accesses that certain types of transactions require, thus improving perfor-
mance. For example, suppose users who are processing order lines need part descriptions. The DBA might
include part descriptions in the OrderLine table, as shown in Figure 8-12.
Search WWH ::




Custom Search