May 2005
Beginner
480 pages
11h 1m
English
Recall from “Tables, Columns, and Rows” in Chapter 2 that rows stored in a table are unordered, as required by the relational model. This lack of order makes it easy for the DBMS to INSERT, UPDATE, and DELETE rows quickly, but its unfortunate side effect is that it makes searching and sorting inefficient. Suppose that you run this query:
SELECT * FROM authors WHERE au_lname = 'Hull';
To execute this query, the DBMS must search the entire table authors sequentially, comparing the value in each row's au_lname column to the string Hull. Searching an entire table in a small database is trivial, but production database tables can have millions of rows.
DBMSes provide a mechanism called an index that has the same purpose as its book ...
Read now
Unlock full access