News for hackers. Stuff that matters.
Re:The surprisingly difficult problem of user-defined order ... by avmich on Friday January 15, 2021 @10:21PM (#25799728)
String used for indexing can be further used for sorting not only a flat list, but whole trees of nodes. Similar technique was used before (at least in 1997) to answer queries about the order at a particular time in the past.
Re:The surprisingly difficult problem of user-defined order ... by spiffytech on Saturday January 16, 2021 @12:26AM (#25800291)
Can you share any keywords I can research for your technique? I've looked into string-based tree sorting before, but the only answers I can come up with involve recursive queries, or encoding the entire tree path into each item, which means updating many records if an item with many descendants gets repositioned.
Re:The surprisingly difficult problem of user-defined order ... by avmich on Saturday January 16, 2021 @01:21AM (#25800505)
Don't know about keywords; development was for a particular application. Updating many records might be necessary, agree, but for balanced trees the number of records to update could likely be logarithmic. No recursive queries was used (e.g., no Oracle's "CONNECT BY").