What is the difference between one-to-one and one-to-many relationships?
💡 Model Answer
In a one-to-one relationship, each record in table A is linked to at most one record in table B, and each record in B is linked to at most one record in A. This is often used for splitting a table into two for normalization or security reasons, e.g., a User table and a UserProfile table. In a one-to-many relationship, a single record in table A can be linked to multiple records in table B, but each record in B is linked to only one record in A. This is common for parent-child relationships, such as an Author table and a Books table, where one author can write many books. The key distinction is the cardinality of the link: one-to-one is a 1:1 mapping, while one-to-many is a 1:N mapping.
This answer was generated by AI for study purposes. Use it as a starting point — personalize it with your own experience.
🎤 Get questions like this answered in real-time
Assisting AI listens to your interview, captures questions live, and gives you instant AI-powered answers — invisible to screen sharing.
Get Assisting AI — Starts at ₹500