In the data structure, what has nothing to do with the computer used is the "logical structure of the data". Data structure includes two levels: logical structure and physical (storage) structure; logical structure describes data from a logical relationship, has nothing to do with data storage, and is independent of the computer. Logical structures include: 1. Linear structure, where elements have a one-to-one relationship; 2. Tree structure, where elements have a one-to-many relationship; 3. Graphical structure, where elements have a many-to-many relationship; 4. Sets .
The operating environment of this tutorial: Windows 7 system, Dell G3 computer.
In the data structure, what has nothing to do with the computer used is the "logical structure of the data".
Data structure is the way a computer stores and organizes 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 data structure includes two levels: logical structure and physical (storage) structure.
Logical structure
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 with It doesn't matter where they are stored in the computer.
Simply put: the logical structure describes the data in terms of logical relationships, has nothing to do with the storage of the data, and is independent of the computer.
The logical structure includes:
Set: There is no other relationship between elements in the data structure other than the mutual relationship of "belonging to the same set";
Linear structure: The elements in the data structure have a one-to-one relationship;
Tree structure: The elements in the data structure have a one-to-many relationship The mutual relationship;
Graphic structure: The elements in the data structure have many-to-many relationships.
Physical structure
The physical structure of data is the representation of the data structure in the computer (also called the image), which includes the structure of the data elements. Internal representations and on-machine representations of relationships. Since the specific implementation methods include sequence, linking, indexing, hashing, etc., a data structure can be expressed as one or more storage structures.
In-machine representation of data elements (mapping method): Data elements are represented by bit strings of binary bits (bits). This bit string is usually called a node. When a data element consists of several data items, the sub-bit string corresponding to each data item in the bit string is called the data field. Therefore, a node is an in-machine representation (or in-machine image) of a data element.
In-machine representation of relationships (mapping method): The in-machine representation of relationships between data elements can be divided into sequential images and non-sequential images. Two commonly used storage structures: sequential storage structures and chain storage structures . A sequential map represents the logical relationship between data elements by means of their relative positions in memory. Non-sequential images represent logical relationships between data elements with the help of pointers that indicate the storage locations of elements.
For more related knowledge, please visit the FAQ column!
The above is the detailed content of What data structure is independent of the computer used?. For more information, please follow other related articles on the PHP Chinese website!