352 CHAPTER 15 Denormalization
Analysis of Update 15.4
The strategy to execute the second transaction, Update 15.4, using the same schema, is
to scan each table (order and customer) and rewrite both tables in the new order.
Block accesses = scan order table + scan customer table
+ rewrite order table + rewrite customer table
= 4,369 + 37 + 4,369 + 37
= 8,812.
I/O time = 8,812 block accesses × 2.2 ms
= 19.4 seconds.
Defining the Denormalized Table orderCust
If we combine the customer and order tables to avoid the join in Query 15.3, the result-
ing schema will have a single table orderCust, with primary key orderNum and nonkey
attributes custNum and jobTitle, instead of separate tables order and customer. This not
only avoids the join, but also the sort ...