All pastes #128396 Raw Edit

Miscellany

public text v1 · immutable
#128396 ·published 2006-08-12 23:04 UTC
rendered paste body
For the sake of argument, I'll use a forum as an example.

//chainid 0. or 'root'
Thread 1           //chainid 0.1. id 0, full id 0.1.0
-Thread 1_1        //chainid 0.1. id 1, full id 0.1.1
-Post 1_1          //chainid 0.1. id 2, full id 0.1.2

Thread 2           //chainid 0.2. id 0, full id 0.2.0
-Thread 2_1        //chainid 0.2. id 1, full id 0.2.1
-Post 2_1          //chainid 0.2. id 2, full is 0.2.2

Thread 3           //chainid 0.3. id 0, full id 0.3.0
-Thread 3_1        //chainid 0.3. id 1, full id 0.3.1
--Thread 3_1_1     //chainid 0.3.1. id 0, full id 0.3.1.0
--Post 3_1_1       //chainid 0.3.1. id 1, full id 0.3.1.1
-Thread 3_2        //chainid 0.3. id 2, full id 0.3.2

Using this example, you can see how easy it would be to get trees using fulltext search. For example,

Get all children of Thread 3_1, fulltext on 0.3.1.* and get 0.3.1.0 and 0.3.1.2

Get all children of Thread 3, fulltext on 0.3.* and get 0.3.0, 0.3.1, 0.3.2, 0.3.1.0, and 0.3.1.1

There are other issues that sorta make this system a bit of a logistical nightmare, but I'm confident that it would be extremely fast and still keep fairly small tables.