Rdichpally
asked on
SQL Query
I need to find out the types of relationship between my tables in the database (1to1 or 1toMany etc).
Are there any good queries to find out the relationships between my tables in the database? Thanks.
Rajender Dichpally
Are there any good queries to find out the relationships between my tables in the database? Thanks.
Rajender Dichpally
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
If there are no fixed relationships in the database, then you are going to need to try and work it out from the columns in the table to see if they refer to other tables. I've worked with systems in the past where the relationships are not managed by the database (no idea why), rather they are managed via code in the application that owns the database. As the application support contract didn't allow direct access to the database, it didn't matter particularly.
adding to what @rawin said
you can use database diagrams to check the relationships between the tables visually and easily in one shot....
You can use the below video link to generate a database diagram in your database.
http://www.youtube.com/watch?v=wMbPRHeYvMU
you can use database diagrams to check the relationships between the tables visually and easily in one shot....
You can use the below video link to generate a database diagram in your database.
http://www.youtube.com/watch?v=wMbPRHeYvMU
ASKER
Thanks.