I am learning database designing and got acquainted with basic terminologies like ER diagrams
, relationships between Entities
etc.
I came across terms like Parent , child tables
. It is these terminologies where I am not able to understand; I did search similar questions asked earlier in SO, but I am not still clear.
Parent - Child
terminologies makes sense in Object oriented
programming, where we literally have parent - child classes
; how does this make sense in `RDBMS'?
Can anyone help me understand parent - child table
relationship between tables in RDBMS
?
The terms are so general that you have to figure out what is meant from context. There are parents & children when a relation(ship)/association describes a tree/hierarchy/network. It just means there is an edge from one node to another in some graph representation of some relationship. That includes diagrams with conceptually directed lines. Often the terms are used in a relational or information modeling context for the referenced & referencing tables in the meta-relation(ship)/association on tables that a parent table "is referenced by" a child table meaning there is a foreign key (FK) from the child to the parent. This is related to FKs wrongly being called "relationships". But tables/relations represent business/application relation(ship)s/associations on values (possibly identifying entities) in relational databases. Hence the "Relational Model" and the "Entity-Relationship Model".