From the course: Programming Foundations: Databases

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Indexes, transactions, and stored procedures

Indexes, transactions, and stored procedures

From the course: Programming Foundations: Databases

Start my 1-month free trial

Indexes, transactions, and stored procedures

- Indexes, transactions, and stored procedures are all features offered by most DBMS tools. How they are used and how you choose to apply them will vary based on the software and your needs. Just like in a book, tables in a database can have indexes, where you can look up information quickly. A primary key acts as an index, but sometimes, especially on large tables, you may want to look up other fields. Normally, this involves scanning the whole table for matching terms. For example, on a table with many customers, we might want to look up customers directly by name. We could search using the first name and last name fields. On a large table, this kind of search might take a while, as the database compares those fields in each row with the search term. But with an index on those fields, the database stores a reference to what each value is in those fields and where it's located, and using that index, the database can return information much faster, but when we add indexes, it…

Contents