You are on page 1of 7

Name : Zerin Tasnim

Id: 2013285147
Semester: 5th
Institute of Business Administration,
University of Rajshahi

Topic : Relationship and Its Types


Relationship

Relationship is a link between two


tables of a database
We can match primary key from one
table to with an entry in the foreign
key of other related table
Types of Relationship

One-To- One-To-
One many

Many-To-
Many
Person passport

One-To-One Passport table


Person table
ID INT(10)
Id INT(10) Password_no VARCH
Password_id INT(10) AR(20)
First_name VARCH AR (50) Valid_date DATE
Last_name VARCH AR (50)
dob VARCH AR (50)

One record in a table is associated with one and only record in another
table.
One-To-Many

Associate one record in one table


with many records in the other table
Customer makes Order

Many-To-
Many
Order for Customer

Customer Order
Product
Customer id Order id
Customer id Product id
Name Product name
Age Product id
Price
Mobile no Mobile no
date

Exists when one or more items in one table can have a relationship to one
or more items in another table
Thank You

You might also like