Presentation is loading. Please wait.

Presentation is loading. Please wait.

Physical Database Design Chapter 6. Physical Design and implementation 1.Translate global logical data model for target DBMS  1.1Design base relations.

Similar presentations


Presentation on theme: "Physical Database Design Chapter 6. Physical Design and implementation 1.Translate global logical data model for target DBMS  1.1Design base relations."— Presentation transcript:

1 Physical Database Design Chapter 6

2

3 Physical Design and implementation 1.Translate global logical data model for target DBMS  1.1Design base relations for target DBMS  1.2Design integrity rules for target DBMS 2.Design and implement physical representation  2.1Analyze transactions  2.2Choose file organizations  2.3Chose secondary indexes  2.4Consider introduction of controlled redundancy  2.5Estimate disk space 3.Design and implement security mechanisms  3.1Design and implement user views  3.2Design and implement access rules 4.Monitor and tune the operational system

4 1. Translate global logical data model for target DBMS  Objective  To produce a working relational database schema from the global logical data model  Examine whether the system supports:  definition of primary keys, foreign keys, alternate keys ;  definition of required fields ( option NOT NULL ) ;  definition of domains ;  definition of enterprise constraints 1993 ISO SQL standard (SQL2) Triggers, database procedures Unique indexes  Verify how to create base tables

5 Design base relations for target DBMS

6 2. Design and Implement Physical Representation  Objective  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.  Factors used to measure efficiency:  Transaction throughput  Response time (elapse time for completion of a single transaction)  Disk storage  This leads to a Query Execution Plan (QEP)  related to query optimizer and supported by some DBMS.

7 2.1 Analyze Transactions  Objective  To understand the functionality of the transactions that will run on the database and to analyze the important transactions  For each transaction type we should determine:  the expected frequency;  relations and attributes accessed by the transactions and the type of access (insert, delete, update);  attributes used as predicates in SQL (these are candidates for access structures);  attributes involved in a join of two or more relations  time constraints on the transactions.

8 2.2 Choose file organization  Objective  Determine an efficient file organization for each base table.  Heap when:  data is bulk-loaded into the relation  relation is only a few pages long  every tuple in a relation is to be retrieved  Hash when:  tuples are only to be retrieved based on a hash field  B-tree when:  retrieval based on exact key match or ranges of values  Inverted file when:  multiple search criteria and few updates

9 2.3 Choose secondary indexes  Objective  Determine whether adding secondary indexes will improve the performance of the system.  The overhead involved should be balanced against the performance improvement.  Guidelines:  index the primary key if it is not the key of the file organization  no indexes on small relations  add secondary indexes on heavily used attributes  add secondary indexes to a foreign key  avoid keys on attributes that are frequently updated  avoid indexes on long attributes

10 2.4 Consider introduction of controlled redundancy  Objective  Determine whether introducing redundancy in a controlled manner by relaxing the normalization rules will improve the system performance.  Denormalization makes implementation more complex;  Denormalization often sacrifices flexibility;  Denormalization speeds up retrieval but slows down updates;  Derived data.  Duplicating attributes or joining relations together.  Introduction of redundancy should be fully documented

11 2.5 Estimate disk space  We estimate the amount of disk space that the database requires.  Calculation is important to ensure sufficient disk space for the database when it goes live, and during the lifetime of the system.

12 3. Document design of security measures and user views  We document the design of the individual user views and security mechanisms of the database.

13 4. Monitor and Tune the Operational System  Example new requirements  Ability to hold pictures of the properties for rent, together with comments that describe the main features of the property.  Ability to publish a report describing properties available for rent on the World-Wide Web (WWW).

14 Microsoft Access Startup window and Microsoft Access dialog box

15 Microsoft Access Database window for DreamHome database

16 New Table dialog box

17 Design View of Property_for_Rent table - Field Properties for Property_No field

18 Design View of Property_for_Rent table -Field Properties for Rooms field

19 Possible values for Type Field of Property_for_Rent table

20 Using Lookup list for Type field of Property_for_Rent table

21 Relationships window of Staff and Property_for_Rent tables joined on Staff_No

22 Relationships dialog box for the Staff and Property_for_Rent tables

23 Design Enterprise Constraints for Target DBMS - Example enterprise constraint

24 Error message indicating that an enterprise constraint has been violated


Download ppt "Physical Database Design Chapter 6. Physical Design and implementation 1.Translate global logical data model for target DBMS  1.1Design base relations."

Similar presentations


Ads by Google