More useful than one to one relationships are one to many and many to one relationships.
This is the most commonly used type of relationship in a one to many relationship a rijkaard from one
table can be related to one or more records in another table.
In our cmf Example This means a category can belong to more than one article one category can have many
articles hence the one to many relationship in the opposite direction.
Many articles can belong to one category which is a many to one relationship.
In the database in the article table we currently have a unique index on the category idae far in key
field to model a one to many relationship.
We need to change this index to a non unique index.
Like that.
This will now allow duplicate values in the category idees field.
If we look at the current Ricardos in the database we can see the first rijkaard has a category of one.
If we add it to the second rijkaard and select the same category.
Now we can save this successfully.
An article can only be related to 0 are 1 category.
But a category can be related to 0 1.
Are more articles.