Note: this article is published on 06/12/2024.

This series of articles is about relationship between entity or datasets.

A - Introduction

A relationship in DBMS is the way in which two or more data sets are linked. This article will give a conceptual discussion about this topic. The content of this article:

B - Types of Relationsip in DBMS

In a relational database, the data in one table is related to the data in other tables. In general, tables can be related in one of three different ways:

Demo

One to One Relationship:

In restaurant, each customer (Table A) has one and only one order (Table B):

One to Many Relationship:

Each Customer (Table A) could have multiple Orders (Table B)

Many to Many Relationship:

Each employee could have multiple Project assigned,

Each Project chould be worked by multiple employees.

C - Implementations in database

Linked by a Middle Connection Table

References