Home > Common Problem > What is the data model using tree structure?

What is the data model using tree structure?

青灯夜游
Release: 2023-01-13 00:31:12
Original
9527 people have browsed it

The data model that uses a tree structure to represent various types of entities and the relationships between entities is a hierarchical model. The hierarchical model organizes data into a one-to-many relationship structure, using a tree structure to represent entities and the relationships between entities.

What is the data model using tree structure?

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

The data model using tree structure is: hierarchical model.

The database model describes the method of structuring and manipulating data in the database. The structural part of the model specifies how the data is described (such as trees, tables, etc.); the manipulation part of the model specifies how the data is Add, delete, display, maintain, print, search, select, sort and update operations.

Database models can be divided into conceptual models and data models. Data models can be divided into hierarchical models, network models and relational models.

  • A data model that uses a tree structure to represent entity types and relationships between entities is called a hierarchical model.

    The restrictions in the hierarchical model are: there is and is only one node and no parent node. This node is the root of the tree; other nodes have and have only one parent node. The characteristic of the hierarchical model is that the connection between records is realized through pointers, and the query efficiency is high. The disadvantage is that it can only represent 1:N connections.

  • A data structure model that uses a directed graph structure to represent entity types and relationships between entities is called a network model. The data structure of the network model mainly has the following two characteristics:

    (1) Allows more than one node to have no parents;

    (2) A node can have more than one parent.

    Both the hierarchical model and the network model use pointers to represent the relationship between elements.

  • The relational model uses two-dimensional tables to represent the relationship between data. A two-dimensional table corresponds to a relationship, the rows are usually called records, and the columns are called fields or attributes.

For more related articles, please visit: mysql video tutorial

The above is the detailed content of What is the data model using tree structure?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template