dragonchild has asked for the wisdom of the Perl Monks concerning the following question:
I'm writing Yet Another SQL Generator (YASG) and the basic concept is as follows:
The runfor and groupby could be for any tables in the schema, as can the report query. I have figured out the tables needed for the runfor and the groupby. (I already know the tables from the report query.)
What module(s) would be useful to figure out what path I need to take to the schema in order to join the runfor and groupby tables to the report tables. What I'm looking for is something like "To connect tables A and D, you need to go this path: A->B->C->D".
I'm going to be caching the generated SQL when mod_perl starts up, so runtime isn't a major concern. Ideally, I'd like the shortest path, determined by number of elements in the path. (I'm not worried about table sizes or anything like that. Optimization comes later, if necessary.)
------
We are the carpenters and bricklayers of the Information Age.
Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Path computation for SQL generation
by hardburn (Abbot) on Jan 26, 2004 at 16:52 UTC | |
|
Re: Path computation for SQL generation
by biosysadmin (Deacon) on Jan 26, 2004 at 17:51 UTC | |
|
Re: Path computation for SQL generation
by thor (Priest) on Jan 26, 2004 at 19:21 UTC | |
by bean (Monk) on Jan 26, 2004 at 20:01 UTC | |
by dragonchild (Archbishop) on Jan 26, 2004 at 20:39 UTC |