title: Undefined relationship (foreign key) in SQL Server database
body: <p>I am working with a SQL Server database which contains almost 850 tables. It has many defined relationships and plenty of undefined relationships(FK), undefined primary keys etc. It is a mess. I don't have access to the application source code, so I can't track down the undefined relations through code. </p>
  
  <p>Is there any software or query by which I can just look at the data and figure out the relationships between the tables? To be more specific, every fields(columns) in each tables are mapped (join) against every columns of all other tables and provide me with a report of some sort. Almost 60% of the cases the column names would be similar in related tables but many tables have same column name for primary key(for example item_id). </p>
  
  <p>I need all those undefined relationships which is making my life miserable everyday!! :(</p>