Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table relations 1

Status
Not open for further replies.

Olaf Doschke

Programmer
Oct 13, 2004
14,847
1
0
DE
I'm not the frequent FAQ writer, but I just published faq183-7763 I wrote earlier today.

This is part of writing some schema extraction, which rather should be the job of some third party tool, nevertheless it's easy enough to get out tables, fields etc from INFORMATION_SCHEMA and several sys tables and views. I had one harder case of a compound foreign key, to which solutions I found from google didn't worked out, so I investigated a bit deeper in the depths of constraints and indexes to get the involved columns of child and parent table in case of a compound foreign key and this also works for usual relations.

I hope you find this helpful at some point in time documenting your databases or databases of someone else.
Feel free to rate,comment and/or enhance this. And of course to make use of it.

Bye, Olaf.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top