Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What is the best way to look up/learn table relationships in a database that I'm not familiar with and I don’t have any Logical/Physical models available? Is there a tool that I can use?

I’ve been using SQL Server Business Intelligence tool and there is an option when creating a new report called Query Analyzer which kind of helps me, but I was wondering if there is a better way within SQL Server maybe?

share|improve this question

closed as unclear what you're asking by Kin, StanleyJohns, Michael - sqlbot, Paul White, Mark Storey-Smith Aug 21 '13 at 7:10

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

Which DBMS are you using? Postgres? Oracle? Every DBMS has a system catalog that shows this information. – a_horse_with_no_name Aug 20 '13 at 20:27
If the database uses constraints for foreign key relationships that will be a big help. Otherwise you will need to match names of columns try to figure out the relationships. – RLF Aug 20 '13 at 21:02
I'm using sql server 2008. This is a data warehouse db with foreign key relationships. How can I access system catalog? thank you. – Pawel85 Aug 21 '13 at 12:19
I typically go in the database diagram in SSMS, add a table, right click it and choose "Add Related Tables" ... If there is a foreign key relationship, it will add the related tables and you can learn the relationships that way. If there are no foreign keys, then you have to do it through old fashioned analysis and maybe a bit of guesswork. – efesar Aug 22 '13 at 16:36