Presentation is loading. Please wait.

Presentation is loading. Please wait.

Database Systems: A Practical Approach to Design, Implementation and Management International Computer Science S. Carolyn Begg, Thomas Connolly Lecture.

Similar presentations


Presentation on theme: "Database Systems: A Practical Approach to Design, Implementation and Management International Computer Science S. Carolyn Begg, Thomas Connolly Lecture."— Presentation transcript:

1 Database Systems: A Practical Approach to Design, Implementation and Management International Computer Science S. Carolyn Begg, Thomas Connolly Lecture Seventeen Methodology – Monitoring and Tuning the Operational System Based on Chapter Seventeen of this book:

2 2 Lecture 17 - Objectives u Meaning of denormalization. u When to denormalize to improve performance. u Importance of monitoring and tuning the operational system.

3 3 Overview of Physical Database Design Methodology u Step 8 Consider the introduction of controlled redundancy u Step 9 Monitor and tune the operational system

4 4 Step 8 Consider the Introduction of Controlled Redundancy To determine whether introducing redundancy in a controlled manner by relaxing the normalization rules will improve the performance of the system.

5 5 Step 8 Consider the Introduction of Controlled Redundancy u Result of normalization is a logical database design that is structurally consistent and has minimal redundancy. u However, sometimes a normalized database design does not provide maximum processing efficiency. u It may be necessary to accept the loss of some of the benefits of a fully normalized design in favor of performance.

6 6 Step 8 Consider the Introduction of Controlled Redundancy u Also consider that denormalization: –makes implementation more complex; –often sacrifices flexibility; –may speed up retrievals but it slows down updates.

7 7 Step 8 Consider the Introduction of Controlled Redundancy u Denormalization refers to a refinement to relational schema such that the degree of normalization for a modified relation is less than the degree of at least one of the original relations. u Also use term more loosely to refer to situations where two relations are combined into one new relation, which is still normalized but contains more nulls than original relations.

8 8 Step 8 Consider the Introduction of Controlled Redundancy u Consider denormalization in following situations, specifically to speed up frequent or critical transactions: –Step 8.1 Combining 1:1 relationships –Step 8.2 Duplicating nonkey attributes in 1:* relationships to reduce joins –Step 8.3 Duplicating foreign key attributes in 1:* relationships to reduce joins

9 9 Step 8 Consider the Introduction of Controlled Redundancy –Step 8.5 Introducing repeating groups –Step 8.6 Merging lookup tables with base relations –Step 8.7 Creating extract tables.

10 10 Sample global relation diagram

11 11 Sample relations

12 12 Step 8.1 Combining 1:1 relationships

13 13 Step 8.2 Duplicating nonkey attributes in 1:* relationships to reduce joins u List all property details, including owner’s last name, for properties at branch B003 –SELECT p.*, o.lName FROM PropertyForRent p, PrivateOwner o WHERE p.ownerNo = o.ownerNo AND branchNo = ‘B003’

14 14 Step 8.2 Duplicating nonkey attributes in 1:* relationships to reduce joins

15 15 Step 8.2 Duplicating nonkey attributes in 1:* relationships to reduce joins u List all property details, including owner’s last name, for properties at branch B003 u Use expanded PropertyForRent relation –SELECT * FROM PropertyForRent WHERE branchNo = ‘B003’

16 16 Step 8.3 Duplicating foreign key attributes in 1:* relationship to reduce joins u List the last name of all private owners whose property is handled by branch B003 –SELECT o.lName FROM PropertyForRent p, PrivateOwner o WHERE p.ownerNo = o.ownerNo AND branchNo = ‘B003’

17 17 Step 8.3 Duplicating foreign key attributes in 1:* relationship to reduce joins

18 18 Step 8.3 Duplicating foreign key attributes in 1:* relationship to reduce joins u List the last name of all private owners whose property is handled by branch B003 u Use expanded PrivateOwner relation –SELECT lName FROM PrivateOwner WHERE branchNo = ‘B003’

19 19 Step 8.4 Duplicating attributes in *:* relationships to reduce joins

20 20 Step 8.5 Introducing repeating groups

21 21 Step 8.6 Merging lookup tables with base relations

22 22 Step 8.7 Creating extract tables u Reports can access derived data and perform multi-relation joins on same set of base relations. However, data the report is based on may be relatively static or may not have to be current. u Possible to create a single, highly denormalized extract table based on the relations required by the reports, and allow the users to access extract table directly instead of the base relations.

23 23 Step 9 Monitor and Tune the Operational System To monitor operational system and improve performance of system to correct inappropriate design decisions or reflect changing requirements. DreamHome wish to hold pictures of properties, and comments that describe main features of property.


Download ppt "Database Systems: A Practical Approach to Design, Implementation and Management International Computer Science S. Carolyn Begg, Thomas Connolly Lecture."

Similar presentations


Ads by Google