Atitit. Types of data indexes and principle implementation Mechanism index common storage structure

Source: Internet
Author: User

Atitit. Data Index the types and principle Realization Mechanism index A common storage structure

1 .  Classification of Indexes 1

1 . 1. type of index Split by Find, two, block index vs numbered index 1

1 . 2. the order of search by index and data can be divided into positive and inverted indexes 1

.3.  index and multicolumn index 2

1 . 4. Partitioning Index and Global Index 2

2 .  index Establishment, the updated process uses events that trigger the update of the index 2

3 .  index A common storage structure B- tree file called " indexed sequential access methods "(Indexed Sequential accessmethod) , abbreviated as ISAM. 2

4.  trie Treegenerally refers to a dictionary tree also called the word search tree,Trie Tree , is atree-shaped structure, is a kind of hash tree variant. Typical applications are used for statistics, sorting and saving a large number ofcharacterString (but not limited to strings), so it is often used by search engine systems for text frequency statistics3

5 .  merge issues for index files 4

6 .  Reference 4

1.Classification of Indexes

Uniq

Full-Text Indexing

Norma

Hash Index (numbered index)

L

1.1.type of index  by the way of search, two kinds,Chunking Indexvsnumbered Index

a type is a block of blocks: One is non -chunked, numbering sequence type

1.2.the search order by index and data can be divided into positive row and inverted index

Inverted index

1.3.single RowIndexand multi-column indexes

1.4.PartitioningIndexand GlobalIndex 

author ::  nickname old Paws full name::  akbar al rapanui  Attilax   Akbar   al   Rapa Nui  ) Kanji name: Ayron,    email:[email protected]

Reprint please indicate source: http://www.cnblogs.com/attilax/

2.index Establishment, the updated process uses events that trigger the update of the index

1 when large amounts of data are inserted, consider dropping the index first and then rebuilding the index. The disadvantage of this is that the business cannot be

The description index is similar to the trigger, with each additional record triggering the process of creating an index

3.index A common storage structure B- tree file  called " indexed sequential access methods "(Indexed Sequential accessmethod), abbreviated to ISAM.

b tree file. Suppose there is a " employee table " b tree format to store names, Each name is followed by its location in the database (that is, the first few records). When looking for a name, the corresponding first record is found in the index and then read from the table.

This index lookup method, called " Indexed Sequential access method "(Indexed sequential accessmethods), is abbreviated as ISAM . It already has many implementations (such as the c-isam Library and the d-isam Library), so you can write your own simplest database by using the codebase.

4. trie Treegenerally refers to a dictionary tree also called the word search tree,Trie Tree , is atree-shaped structure, is a kind of hash tree variant. Typical applications are used for statistics, sorting and saving a large number ofcharacterString (but not limited to strings), so it is often used by search engine systems for text frequency statistics

. It has the advantage of reducing query time by using the common prefix of the string, minimizing unnecessary string comparisons and higher query efficiency than the hash tree.

Trie tree, also known as the Dictionary tree, the word search tree or the prefix tree, is a multi-fork tree structure for fast retrieval, such as the English Letter Dictionary tree is a 26-fork tree, the number of the dictionary tree is a 10-fork tree.

The word trie from re trie ve, pronounced as/tri:/ "Tree" was also read as/tra?/"Try".

The trie tree can use the common prefix of a string to conserve storage space. As shown, the Trie tree holds 6 string tea,ten,to,in,inn,int with 10 nodes:

In the trie tree, the common prefix of the string in,inn and int is "in", so you can save space by storing only one copy of "in". Of course, if there are a large number of strings in the system and these strings do not have a common prefix, then the corresponding trie tree will consume memory very much, which is also a disadvantage of the trie tree.

The basic properties of the trie tree can be summed up as:

(1) The root node does not contain characters, and the root node unexpectedly contains only one character per node.

(2) from the root node to a node, the characters that pass through the path are concatenated to the corresponding string for that node.

(3) All child nodes of each node contain different strings.

5.merge issues for index files

, need distributed storage on multiple incremental index files Merge or do not merge .....

or use 2 incremental storage in binary mode ..

6.Reference

Paip. Types of indexes and implementation Attilax Summary-attilax's Column-Blog channel-CSDN.NET.htm

Dictionary tree _ Baidu Encyclopedia. htm (with code implementation

Atitit. Types of data indexes and principle implementation Mechanism index common storage structure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.