Which of the following is correct?
In database design:
1. One-to-one relationship can be implemented as a single table with primary and foreign key relationships.
2. One-to-Many relationships are implemented by splitting the data into two tables with primary key and foreign key
relationships.
3. Many-to-Many relationships are implemented using a junction table with the keys from both the tables forming
the composite primary key of the junction table.
Answers
Answered by
2
Answer:
Third option is Correct.
Explanation:
There are three different types of data relationships in a database:
- one-to-one relationship: It is defined as the relationship between two tables where a row from table A is associated with at most one row in table B, and an row in table B is associated with one entity in table A.
- one-to-many relationship: It is defined as a relationship between two tables where a row from table A is associated with any number of rows in table B. This relationship can be created using Primary key -Foreign key relationship.
- Many-to-many: When you need to establish a many-to-many relationship between two or more tables, the simplest way is to use a Junction Table. A Junction table in a database, also referred to as a Bridge table or Associative Table, bridges the tables together by referencing the primary keys of each data table.
Similar questions