Writing 11/7

Writing 11/7

by Amber Frazier -
Number of replies: 0

Indexing is a data structure technique used in databases that makes it easier to find and access data. An index is created using a search key column that is just a copy of the primary key, and a data reference column which has the location of the key value on the disk block. Indexing has access types, access time, insertion time, deletion time and space overhead. There are typically two methods to storing the data, sequential file organization where the index is based on a sorted order of values and hash file organization where the index is based on values distributed over buckets. There are also three ways to index: clustered indexing, secondary indexing, and multilevel indexing. The clustering index is a method where two or more columns are grouped together to get unique values that can be turned into an index. Secondary indexing is when the data is in no particular order but there is an ordered contents page that gives the location of the data. Multilevel indexing splits up the main block into multiple smaller blocks.

In MySQL indexes are formed by concatenating values in columns. By using CREATE INDEX, you can select a table and column in a table and give it an index. 

CREATE INDEX [index name] ON [table](column);