How do you find relation between tables in a database? |
There are two generic types of relationships that are found between tables in existing databases, those that are explicit (or defined) and those that are implicit (or undefined.)
The explicit relationships are defined differently in each database management system, so finding these relationships will depend on which type of database you're using. Typically they can be found via the user interface when designing one of the two tables in the relationship, viewing a relationship option, or by applying SQL against specific system tables.
The explicit relationships usually enforce referential integrity in the database, so they are strongly encouraged over implicit relationships, but still implicit relationships will be found in the real world in existing databases.
Implicit relationships are relationships where the primary key in one table can be clearly identified in another table as a foriegn key, but there is no explicit relationship defined. Because the name of the foriegn key matches or is similar in pattern to the the the primary key in the other table, you can imply that there should be a relationship between those tables. These relationships can be identified by foriegn key names and by looking at existing SQL and queries in the database system to see what fields tables are joined on.
First answer by ID1078037946. Last edit by ID1078037946. Question popularity: 0 [recommend question]
|
Research your answer: |


