A relationship can be One-to-Many or Many-to-One in DBMS. Let us see what that means with examples −
One-to-Many relationship in DBMS is a relationship between instances of an entity with more than one instance of another entity.
The relation can be shown as −
Let us see an example −
A student can work on more than one project. Student and Project are entities here. An individual student working on 2 projects at a time would be considered as One-to-Many relationship in DBMS as shown below:
Many-to-One relationship in DBMS is a relationship between more than one instances of an entity with one instance of another entity.
The relation can be stated as −
A project can have more than one student working on it. A team of five students in a college in assigned a project that they need to complete in let us say one month. This states a relationship between two entities Student and Project.