One to Many Relationship: Describing the Tables

foreign keyrelations

If we have two tables in a One-to-Many relation ship, is there a standard name to properly refer to the tables?

For example if I have a table of books, and a table of authors (ignoring for now the possibility of joint authorship), how can we generically refer to the two tables in the relationship.

I have come to refer to the authors as the Parent table, and the books as the Child table, arguing that the books may be regarded as the brain-children of the authors. This description doesn’t work as well for, say, a table of sales and saleitems.

I have sometimes seen them referred to as the one and many tables, but I wonder whether there is a more useful way of referring to them.

Is there a standard way of referring to the tables?

Best Answer

The typical nomenclature for this type of table design would be "class-subclass". In your example of Books and Authors, Books is a subclass of the Author class. Any book automatically has an author, since no book can ever be written without having an author write it. Same goes for Sales and SalesItems; each SalesItem must have an associated Sales object.

However, "parent-child" may be employed where it makes sense. As is so often typical, the answer is It Depends™.

Using nomenclature that makes sense for the specific domain in question, and is easily and readily understood by the stakeholders, ensures future comprehension.

One-to-many is a typical term used to describe the relationship between rows in each table. The relationship might also be one-to-one or many-to-one or even many-to-many, depending on domain requirements.