1.

What are the types of relationships used in MySQL?

Answer»

There are three categories of relationships in MySQL:

  • ONE-to-One: USUALLY, when two items have a one-to-one relationship, you just include them as columns in the same table.
  • One-to-Many: One-to-many (or many-to-one) relationships OCCUR when one row in one table is linked to many ROWS in another table.
  • Many-to-Many: In a many-to-many relationship, many rows in one table are linked to many rows in another table. To create this relationship, add a third table containing the same KEY column from each of the other tables


Discussion

No Comment Found