I know what are the one-to-one and one-to-many relationships in table records. But I couldn't understand the concept of many-to-one and many-to-many. Can anyone please explain this for me, please?
I hope that helps
You are right about moving: this looks like a database design question, so I shall move you to the JDBC forum.
Remember in database design always avoid many-to-many relationships. 1-to-1 and 1-to-many and many-to-1 are permitted.
I would argue that even though my father has passed away, he is still my father, and the only one I ever had.
Now, you left out an example of many-to-one.
This is the opposite of one-to-many. for example, children to biological father. There is a one-to-many relationship between a father and his children, but there is a many-to-one relationship between those children and their father.
Treimin Clark wrote:Dear Campbell,
Thanks a lot for your great explanation.
By the way, as you said with the child-to-parent example, it seems that every many-to-one relationship has an opposite one-to-many relationship too. Am I correct on this?
I think you have to be a little careful here... a bank has a one-to-many relationship to it's account holders. But any of those account holders may have accounts at other banks. So it's a one-to-many one way, but it could be many-to-many going back.
at least, that's what I think.