+ All Categories
Home > Documents > Chapter 16

Chapter 16

Date post: 31-Dec-2015
Category:
Upload: frederick-corbin
View: 31 times
Download: 1 times
Share this document with a friend
Description:
Chapter 16. Methodology Physical Database Design Transparencies. Chapter 16 - Objectives. The purpose of physical database design. How to map the logical database design to a physical database design. How to design base relations for the target DBMS. 2. Chapter 16 - Objectives. - PowerPoint PPT Presentation
Popular Tags:
41
Chapter 16 Methodology Physical Database Design Transparencies
Transcript
Page 1: Chapter 16

Chapter 16

MethodologyPhysical Database Design

Transparencies

Page 2: Chapter 16

2

Chapter 16 - Objectives

The purpose of physical database design.

How to map the logical database design to a physical database design.

How to design base relations for the target DBMS.

Page 3: Chapter 16

3

Chapter 16 - Objectives

How to design enterprise constraints for the target DBMS.

How to select appropriate file organizations based on analysis of transactions.

When to use secondary indexes to improve performance.

Page 4: Chapter 16

4

Chapter 16 - Objectives

When to denormalize to improve performance.

How to design security mechanisms to satisfy user requirements.

Page 5: Chapter 16

5

Logical and Physical Database Design

Sources of information for the physical design process includes global logical data model and documentation that describes model.

Logical database design is concerned with the what, physical database design is concerned with the how.

Page 6: Chapter 16

6

Physical Database Design

The process of producing a description of the implementation of the database on secondary storage.

Describes the storage structures and access methods used to achieve efficient access to the data.

Page 7: Chapter 16

Overview of Physical Database Design Methodology

Step 1

Translate global logical data model for target DBMS

Step 2

Design physical representation Step 3

Design security mechanisms

Page 8: Chapter 16

7

Step 1: Translate global logical data model for target DBMS

To produce a basic working relational database schema from the global logical data model

– Design base relations for target DBMS– Design enterprise constraints for target DBMS

Page 9: Chapter 16

Step 1: Translate global logical data model for target DBMS (continued)

Design base relations for target DBMS– To decide how to represent the base

relations we have identified in the global logical data model in the target DBMS.

Design enterprise constraints for target DBMS– To design the enterprise constraints for the

target DBMS.

Page 10: Chapter 16

SQL to create Property_for_Rent Relation

Page 11: Chapter 16

Step 2 : Design physical representation

To determine the file organizations and access methods that will be used to store the base relations; that is, the way in which relations and tuples will be held on secondary storage.

– 2.1 Analyze transactions– 2.2 Choose file organizations– 2.3 Choose secondary indexes– 2.4 Consider the introduction of controlled

redundancy– 2.4 Estimate disk space requirements

Page 12: Chapter 16

16

Step 2 Design Physical Representation

Step 2.1 Analyze transactions– To understand the functionality of the

transactions that will run on the database and to analyze the important transactions.

Step 2.2 Choose file organizations– To determine an efficient file organization

for each base relation.

Page 13: Chapter 16

Typical Disk Configuration

Page 14: Chapter 16

Step 2.1 Analyze transactions

For each Transaction associated with the components of the data model (usually predefined queries including view, trigger, procedure, function and package), it needs to be broken down into further smaller units of work:

Page 15: Chapter 16

Transactions Analysis (continued)

A.    Transformation Rules: Describe the rules (R,U,I, D) or algorithms used to transform data received into data generated.

B.    Edit and Error Rules: Define the rules validating data received and the method of processing erroneous data.

C.    Sequence Analysis: Describe under what conditions this transaction is performed and what rules determine which transaction will be performed next.

Page 16: Chapter 16

Cross-referencing Transactions and Relations

Page 17: Chapter 16

Transactions Analysis (continued)

D.    Audit Rules: Describe the rules required to audit the activity performed within this transaction.

E.    Security Rules: Define the security required to invoke the transaction or various facets of the transaction.

Page 18: Chapter 16

Transactions Analysis (continued)

F.    Frequency of execution: Define the number of times this transaction is performed in a fixed period of time.

G.    Type of transaction mode: Describe whether the transaction is batch, on demand, or interactive.

Page 19: Chapter 16

17

Example - Sample Transactions

(A) Insert details for a new member of staff, given the branch address.

(B) List rental properties handled by each staff member at a given branch address.

(C) Assign a rental property to a member of staff, checking that a staff member does not manage more than 10 properties already.

(D) List rental properties handled by each branch office.

Page 20: Chapter 16

18

ER Model for Sample Transactions showing Expected Occurrences

Page 21: Chapter 16

20

Analysis of Selected Transaction A

Page 22: Chapter 16

21

Analysis of Selected Transaction B

Page 23: Chapter 16

22

Analysis of Selected Transaction C

Page 24: Chapter 16

23

Step 2 Design Physical Representation (continued)

Step 2.3 Choose secondary indexes– To determine whether adding secondary indexes will

improve the performance of the system.

Step 2.4 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.

Page 25: Chapter 16

Step 2.3 Choose secondary indexes

Data File: The file contains the logical record.

Index File: The file contains the index file.

  The values in the index file are ordered per the

indexing field which is usually based on a single attribute.

 

Page 26: Chapter 16

Indexes

Primary index: The indexing field is guaranteed to have a unique value.

Secondary Index: An index that is defined on a non-ordering field of of the data.

Clustering index: If the index field is not a key field of the file, so that there can be more than one record corresponding to a value of the indexing field.

Page 27: Chapter 16

Step 2.4 Consider the introduction of controlled redundancy

Simplified Relation with Derived Attribute Duplicating Attribute Setting up Lookup Table Duplicating Foreign Key

Page 28: Chapter 16

25

Simplified Staff Relation with Derived Attribute No_of_Properties

Page 29: Chapter 16

26

Original Renter and Interview Relations

Page 30: Chapter 16

27

Combined Renter and Interview Relations

Page 31: Chapter 16

28

Original Property_for_Rent and Owner Relations

Page 32: Chapter 16

29

Duplicating LName Attribute in the Property_for_Rent Relation

Page 33: Chapter 16

30

Lookup Table for Property_Type Attribute

Page 34: Chapter 16

31

Modified Property_for_Rent Relation with Duplicated Description Attribute

Page 35: Chapter 16

32

Duplicating Foreign Key Bno in Owner Relation

Page 36: Chapter 16

33

Original Property_for_Rent, Renter, and Viewing Relations

Page 37: Chapter 16

34

Duplicating Street Attribute in Viewing Relation

Page 38: Chapter 16

37

Step 2 Design Physical Representation (Continued)

Step 2.5 Estimate disk space requirements– To estimate the amount of disk space that

will be required by the database.

Page 39: Chapter 16

39

Step 3 Design Security Mechanisms

To design the security measures for the database as specified by the users.

Page 40: Chapter 16

40

Step 3 Design Security Mechanisms

Step 3.1 Design user views– To design the user views that were identified

in Step 1 of the conceptual database design methodology.

Step 3.2 Design access rules– To design the access rules to the base

relations and user views.

Page 41: Chapter 16

41

Staff3 View Listing


Recommended