Chapter 8: 2. Introduction to Search

This article refers to "Dahua Data Structure", thanks to the author Mr. Cheng Jie.

Chapter 8: 2. Find an introduction:

One: Searching:
According to a given value, determine a data element whose key is equal to the given value in the lookup table.

Search Table: It
is a collection of data elements (or records) of the same type, as shown in the figure below.
Insert picture description here

Key: It
is the value of a data item in the data element, also known as the key value, which can be used to identify a data element.
It can also identify a certain data item (field) of a record, called a key code, as shown in (1) and (2).

If this key can uniquely identify a record, it is called a primary key (Primary Key), as shown in (3) and (4).

The key for multiple data elements (or records) is called a secondary key, as shown in (5).

Two:
static search table (static search table): a lookup table that only performs search operations.
The main operations are:
* Query whether a certain "specific" data element is in the lookup table.
* Retrieve a "specific" data element and various attributes.

Three:
Dynamic Search Table (Dynamic Search Table):
insert data elements that do not exist in the lookup table at the same time during the search process,
or delete an existing data element from the lookup table.

The main operations are:
*Insert data elements
when searching ; *Delete data elements when searching;

Guess you like

Origin blog.csdn.net/yanghangwww/article/details/111410821