0% found this document useful (0 votes)
236 views23 pages

Physical Database Design

The document discusses physical database design and indexing. It provides guidelines for physical design decisions including response time, space utilization, and transaction throughput. It then discusses how indexing can improve the speed of data retrieval operations by allowing data to be located without searching every row. Indexes work by creating a copy of selected columns and storing them in a way that allows for efficient searching, such as a B-tree structure. Creating indexes can significantly improve query performance for large tables.

Uploaded by

Hildana Tamrat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
236 views23 pages

Physical Database Design

The document discusses physical database design and indexing. It provides guidelines for physical design decisions including response time, space utilization, and transaction throughput. It then discusses how indexing can improve the speed of data retrieval operations by allowing data to be located without searching every row. Indexes work by creating a copy of selected columns and storing them in a way that allows for efficient searching, such as a B-tree structure. Creating indexes can significantly improve query performance for large tables.

Uploaded by

Hildana Tamrat
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 23

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

In this example you need to


retrieve the record corresponding 10 30 55 65 85 90
to the key value 15.
You first traverse to the node 10
30 4 7 33 37
Then it traverses to the values 10
16 30
10 16 30

DBMS index
• DBMS offer a variety of special access structures to and the requested
record without reading the entire file.
• The most common one is the B+-tree.
• Every modern DBMS contains some variant of B-trees.
• In addition it may support other specialized index structures.
CREATE UNIQUE INDEX supplierNum ON supplier(snum);
/*unique index on a key*/

You might also like