good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^3: perl create database with folder system (Tree in SQL) (edit)by LanX (Saint) |
on Dec 02, 2017 at 15:36 UTC ( [id://1204746]=note: print w/replies, xml ) | Need Help?? |
I think imposing order into numerical ° IDs works only for static structures. If the max depth is fixed I can easily create a performant view where each column represents a level. SQL views on self joins are even updatetable in mysql.
editOf course there are attempts to use a path like strings as ID, ie 0_1 would be a parent of 0_1_15 , but this becomes a can of worms if you need to move branches ...
Cheers Rolf
°) integers to be more precise
In Section
Seekers of Perl Wisdom
|
|