Physical Database Design
Physical Database Design
Chapter 7
The following are the generic guidelines for physical design decisions; which hold for any
type of DBMS:
1. Response time: This is the elapsed time between submitting a database transaction for
execution and receiving a response. A major influence on response time that is under the
control of the DBMS is the database access time for data items referenced by the
transaction. Response time is also influenced by factors not under DBMS control, such as
system load, operating system scheduling, or communication delays.
2. Space utilization: This is the amount of storage space used by the database files and their
access path structures on disk, including indexes and other access paths.
3. Transaction throughput: This is the average number of transactions that can be
processed per minute; it is a critical parameter of transaction systems such as those used
for airline reservations or banking. Transaction throughput must be measured under
peak conditions on the system.
9. Indexing
• Inserting a single row in a table containing 1 million rows may take
2991 ms BUT
• Selecting a row from a table containing 1 million rows may take
132,499 ms
• This is because the data is not structured in any specific way, and
therefore the database needs to scan the whole table to fetch the
required rows.
• The query execution time increases with the number of rows in the
table.
…
• A database index is a data structure that improves the speed of data
retrieval operations on a database table.
• Indexes are used to quickly locate data without having to search every
row in a database table every time a database table is accessed.
• Indexes can be created using one or more columns of a database
table
• An index is a copy of selected columns of data from a table that can
be searched very efficiently that also includes low-level disk block
address or direct link to the complete row of data it was copied from.
…
• Consider the index at the back of a book where you can easily find
subjects and pages in your book.
• If you wouldn’t have an index, you would have to search over the
entire book.
B+ tree example
40 73