D
D
Denis2016-01-13 18:03:50
Database
Denis, 2016-01-13 18:03:50

How to organize the storage of a tree-like catalog in a database?

It is necessary to import a directory with an unlimited level of nesting into the database.
I do it based on rsdn.ru/article/db/Hierarchy.xml and use the Level option.
The question is the following. When importing, what should I do? I see that it is necessary to import for each level, starting from the 1st, otherwise parent_id simply cannot be obtained. But maybe there are more efficient options, how to do this in one pass of the file?
Raw data in CSV. Has anyone come across something similar?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Kitaev, 2016-01-13
@snedi

Store like this: www.ibase.ru/devinfo/DBMSTrees/sqltrees.html
Import depending on the structure you have in CSV.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question