Stef Mientki wrote:
thanks guys,
for the fast and different responses,
I really appreciate that.
... now I need a couple hours to study all your ideas.

After studying all your suggestions, I must conclude
that my knowledge of SQL is too low to create a real fool proof solution.
For the moment I've it working for simple visual designs, with the following algorithm

- find all connected tables
- find all links between tables
- order the table-boxes, the most left table will get the highest number
- search all top tables, i.e.tables that have no left join to another table
- put all top tables in the "FROM" clause
- walk to the tree of tables and put them in a "JOIN" clause
- check if there are joins between top tables, if found, connect them through the "WHERE" clause
- add the user "WHERE" to the "WHERE" clause

You can see an example here
http://oase.uci.kun.nl/~mientki/data_www/pic/jalcc/help/jalcc_sqlite.html#visual_link_design (btw this page, although messy, gives an idea of the db-manager I'm working on)

thanks again for all your support,

--
cheers,
Stef Mientki
http://pic.flappie.nl


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to