answersLogoWhite

0

Relationships happen between two tables.

One to Many means that one objects (called tuples, or rows) of Table A is related to one or more objects in Table B.

For example, if a doctor can work only in one hospital, and we have a table of hospitals and a table of doctors, Hospitals has a One to Many relationship with Doctors, because for each hospital you will have one or more doctors working at it.

Many to Many means that for each object in Table A, one or more objects in Table B are associated, and viceversa.

In the example, if doctors are allowed to work in different hospitals, the table Hospitals and the table Doctors have a Many to Many relationship.

Now, how to implement this in a relationship DB, that is another question.

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

MaxineMaxine
I respect you enough to keep it real.
Chat with Maxine
JudyJudy
Simplicity is my specialty.
Chat with Judy
ProfessorProfessor
I will give you the most educated answer.
Chat with Professor

Add your answer:

Earn +20 pts
Q: What are one to many and many to many Relationship in database?
Write your answer...
Submit
Still have questions?
magnify glass
imp