Quote:
Originally Posted by legion
DBA wanna-be here.
I'd think you'd have to know the data model to automate that kind of thing. If it were even possible to do what you are asking, all of the keys would have to be named the same in each table they are used. One deviation could throw everything off.
I don't know of any tool that you can feed a database and it will generate a data model. We use the Rational suite around here to do the opposite (use the data model to generate the database).
|
I would second this... the code I provided will hopefully get you started on establishing relationships between the tables based on the column names only.
I should also say, that I'm not in any way a DB professional either... so my advice is probably only worth what it cost you!