{"id":9688,"date":"2011-09-01T13:58:53","date_gmt":"2011-09-01T13:58:53","guid":{"rendered":"https:\/\/www.techopedia.com\/definition\/relation\/"},"modified":"2011-09-01T13:58:53","modified_gmt":"2011-09-01T13:58:53","slug":"relation","status":"publish","type":"definition","link":"https:\/\/www.techopedia.com\/definition\/21677\/relation","title":{"rendered":"Relation"},"content":{"rendered":"
Relation is sometimes used to refer to a table in a relational database but is more commonly used to describe the relationships that can be created between those tables in a relational database.<\/p>\n
In relational databases, a relationship exists between two tables when one of them has a foreign key that references the primary key of the other table. This single fact allows relational databases to split and store data in different tables, yet still link the disparate data items together. It is one of the features that makes relational databases such powerful and efficient stores of information.<\/p>\n
The ability to define relationships is so fundamental and so important that this is what differentiates relational databases from other types of databases, such as flat-file databases. Relation, therefore, is the defining feature of relational databases. <\/p>\n
Relation may also be known as relationship.<\/p>\n
Consider a bank\u2019s database. You have a CUSTOMER_MASTER table that stores customer data, with a primary key column called CustID, as well as an ACCOUNTS_MASTER table for holding information about various bank accounts and which customer owns them. To link these two tables together, that is to tie each customer to his or her bank account, a corresponding CustID column is required in the ACCOUNTS_MASTER table that references an already-existing customer ID in the CUSTOMER_MASTER table. In this case, the CustID column in ACCOUNTS_MASTER is a foreign key that references the column of the same name in CUSTOMER_MASTER. This scenario refers to the relation between the two tables.<\/p>\n","protected":false},"excerpt":{"rendered":"
What Does Relation Mean? Relation is sometimes used to refer to a table in a relational database but is more commonly used to describe the relationships that can be created between those tables in a relational database. In relational databases, a relationship exists between two tables when one of them has a foreign key that […]<\/p>\n","protected":false},"author":7813,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","format":"standard","meta":{"_acf_changed":false,"_lmt_disableupdate":"","_lmt_disable":"","om_disable_all_campaigns":false,"footnotes":""},"definitioncat":[227,222],"class_list":["post-9688","definition","type-definition","status-publish","format-standard","hentry","definitioncat-data-management","definitioncat-database"],"acf":[],"yoast_head":"\n