Writing due Nov 7

Writing due Nov 7

by Zac Finn -
Number of replies: 0

Indexing is used to help speed up searching in a database. For example, indexing can be used to find all rows and columns in a specific query. Using a “where” clause to can help find matches. The index can also help prevent duplicate values in a column. When using MySQL, you can use “explain” in front of the “select” statement, to see if the query you are trying to use will work effectively with any index. Indexing may be confusing for some to understand, so an example on the web compares an index in a database to an index in the back of a book. Moreover, if you are trying to reference a certain topic in the book, you go to the index in the back of the book to find specific page numbers. It is similar with databases, by using the “select” statements  and “where” clauses, creating an index can be very effective and beneficial.

There are many different types of indexes, one type of an index is a single-column index. Single column indexes are created based on only one table column.  Furthermore, there are implicit indexes, which are automatically created by the database server when an object is created. There are also unique indexes, which prevents duplicate values to be inserted into the table. Another type is a composite index. A composite index is an index on two or more columns of the table. To briefly recap, single column indexes are created based on only one column, while composite indexes are indexes created from two or more columns.