A
A
ADA M2019-02-12 15:50:01
MySQL
ADA M, 2019-02-12 15:50:01

MySQL file system DB structure (hierarchical)?

Can you please tell me what are the best practices for creating a MySQL DB architecture for a normal file structure.
Let's say there is an application where the user can create folders/subfolders and files. There can be a large nested hierarchy (as in any hosting control panels like cPanel).
How to store all this? In one table with a recursive link for both folders and files with a field of type (directory, document), or create two tables for folders and files with links?
Surely somewhere there is a good example of designing such a database, but I could not find anything intelligible.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lander, 2019-02-12
@usdglander

Nested Set

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question