Home  >  Article  >  In what structure is there a many-to-many relationship between the positions of data elements?

In what structure is there a many-to-many relationship between the positions of data elements?

青灯夜游
青灯夜游Original
2020-07-25 10:36:3612577browse

In the graph structure, there is a many-to-many relationship between data elements. Graph structure, also known as network structure, is a logical structure formed by a many-to-many relationship; each element has an unlimited number of direct predecessors and direct successors. Usually used to express a network relationship.

In what structure is there a many-to-many relationship between the positions of data elements?

#Data structures are the way computers store and organize data. A data structure refers to a collection of data elements that have one or more specific relationships with each other. Often, carefully selected data structures can lead to higher operating or storage efficiency. Data structures are often related to efficient retrieval algorithms and indexing techniques.

The logical structure of data refers to the data structure that reflects the logical relationship between data elements. The logical relationship refers to the before and after relationship between data elements, and they are related to the computer The storage location is irrelevant.

Logical structure includes 4 types of basic structures: set structure, linear structure, tree structure, graph structure (or mesh structure)

Features:

1) Set : The data in the structure has no other relationship except the relationship of "belonging to the same set".

2) Linear structure: There is a one-to-one relationship between the positions of data elements in the structure.

3) Tree structure: There is a one-to-many relationship between elements in the structure.

4) Graph structure: The data elements in the structure have a many-to-many relationship. Graphical structure is also called network structure.

Examples:

1) Collection: A list of students in a class, recorded in a notebook in random order.

2) Linear structure: The list of students in a class is arranged in the student list in order of student number.

3) Tree structure: the relationship between the superior unit of a certain unit and each subordinate unit.

4) Graph structure: the relationship between various bus stations in a city.

For more related knowledge, please visit: PHP Chinese website!

The above is the detailed content of In what structure is there a many-to-many relationship between the positions of data elements?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn