I want to store the directories (present on the disk) into a database, maintaining their hierarchical/tree structure.
Here's a figure:
(ROOT)
/ \
Dir2 Dir3
/ \ \
Dir4 Dir5 Dir6
/
Dir7
I am using the SQLite database.
Please suggest me:
the SQL query to store above structure in SQLite database, and
a query to retrieve full path of the directory when I select one.
i.e. suppose I select
Dir7then I should get the full path likeROOT/Dir2/Dir4/Dir7