Database One to One Relationship with example

In most database designs, if you have a One to One relationship, there is most likely something wrong with your database design. It should be very exceptional to have One to One relationship. In general this would point out that your two entities with the one to one relationship should be combined into one single entity.

Example:

In Pakistan a person can have only one ID Card. Also, a specific ID card can belong to only one person.

Let’s look at the Person and ID Document example:

In the Person table, the column Person ID will be the Primary Key. In the ID Document table, the ID Number will be the Primary key.

Comments

Popular posts from this blog

What is Oracle Integration Cloud Service - ICS?

How to Create Packages in Oracle Database using TOAD for Oracle

How to create a Simple Scheduler Job in Oracle Database using Toad