M
M
m1rvi2020-10-21 02:37:31
MySQL
m1rvi, 2020-10-21 02:37:31

How to make a hierarchical table structure?

Good day! Need to make a table with display

levels
5f8f73aca4a81085527047.jpeg
.
That is, the levels here mean those whom you invited and those who were invited by the one you invited .. so .. How to do this?
Are there any plugins or something?

Thanks in advance

Answer the question

In order to leave comments, you need to log in

2 answer(s)
B
bkosun, 2020-10-21
@bkosun

To store tree-like (hierarchical) data in relational databases, the following structures are usually used:

  • materialized path
  • Nested Set
  • Adjacency List

I
Ivan Shumov, 2020-10-21
@inoise

Clumsily it becomes in the form of self reference communications. In the real world, graph databases are used for this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question