[thelist] XML or SQL?

Gary McPherson lists at ingenyus.net
Wed Jan 28 23:26:30 CST 2004


Joshua Olson wrote:
> But, if you are looking for a solution that will provide optimal results (in
> terms of time necessary for execution) I fear that you probably won't find
> your solution in the database.  I'd suggest that you hire a c/c++ programmer
> to build you a custom application that does this search using an internal
> structure of pointers to form a non-directed cyclic graph.  The application
> should load itself from the database (using the structure you outlined with
> nodes and edges in separate tables) and should also accept real-time updates
> to the graph.  You could tie the calls to the update into the trigger
> actions on the table so that any updates to the table would automatically
> update the internal representation of this supporting program.
> 
> When you want to get the siblings at distant x you'd call this program and
> ask it to return the list of node PK's.  It would execute very quickly since
> the entire graph would be stored in memory and the structure would optimally
> support the types of query we are asking of it.  If you hid the call behind
> a sp you could make it completely transparent to the end user within the web
> page.
> 
> Sorry if that was too much detail, but honestly, the database is probably
> not the optimal solution for this problem, though it may serve as part of
> the solution, as outlined above.


Thanks, Joshua - I like the sound of that (even though I was spooked by 
the term "non-directed cyclic graph"! :-D) and it's definitely the 
option I'll continue to investigate. Out of curiousity, is there any 
specific reason the app should be built in C/C++ as opposed to any other 
development language, e.g. VB, .NET, etc?

Thanks again,

Gary

P.S.
Any C/C++ coders up in here? ;)




More information about the thelist mailing list