Procedure for linking to another record (captured with example over Country, City table - depicting Country has-many cities relationship & City belongs-to country relationship)
- A Table record in first table is related to only one record of second table.
- Example: Country has a capital city
- One to many
- A Table record in first table is related to more than one record of second table. But second table record maps to only one entry of first table
- NocoDB refers to this category of relationship as **has many**
- For every **has many** relation defined, NocoDB augments **belongs to** relationship column in the other table automatically
- Example: Country **has many** Cities. (other way mapping > City **belongs to** Country )
- Many to many
- A Table record in first table is related to more than one record of second table; second table record can also map to more than on record of first table.
- NocoDB refers to this category of relationship as **many to many**
- For every **many to many** relation defined between tables, NocoDB augments **many to many** relationship column in the other table automatically
- Example: Film **has many** Actors. Actor **has many** Films (works on many films)
Further details of relationship types can be found [here](https://afteracademy.com/blog/what-are-the-different-types-of-relationships-in-dbms)
Relationships between table records can be established by using **LinkToAnotherRecord** column type.