0% found this document useful (0 votes)
21 views

Emp - No Emp - Name 1 Aslam 2 Jan 3 Asad: ONE To ONE Relationship Employee

The document describes different types of relationships in a database - one to one, one to many, and many to many. It provides examples of each with tables of employee and parking place data demonstrating a one to one relationship, department and student data demonstrating a one to many relationship, and student course registration data demonstrating a many to many relationship.

Uploaded by

AD Writes
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Emp - No Emp - Name 1 Aslam 2 Jan 3 Asad: ONE To ONE Relationship Employee

The document describes different types of relationships in a database - one to one, one to many, and many to many. It provides examples of each with tables of employee and parking place data demonstrating a one to one relationship, department and student data demonstrating a one to many relationship, and student course registration data demonstrating a many to many relationship.

Uploaded by

AD Writes
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

ONE to ONE Relationship Back to Lecture

EMPLOYEE

Emp_No Emp_Name
1 Aslam
2 Jan
3 Asad

PARKING PLACE

Emp_No Parking No
1 101
2 201
3 301

ONE to Many Relationship

DEPARTMENT

Dept_No Dept_Name
1001 Computer Science
1002 Chemistry
1003 Botany

STUDENT

Stud_ID Stud_Name Dept_No


1 Ahmad 1001
2 Ali 1001
3 Jan 1001
4 Qasim 1003
5 Salim 1003
Many to Many Relationship

STUDENT

Stud_ID Stud_Name Age


1 Ahmad 19
2 ALi 20
3 Jan 21
4 Qasim 22
5 Salim 23

REGISTRATION

Stud_ID Course Code Date


1 CS1 2-2-017
1 CS2 2-2-017
2 CS1 2-2-017
2 CS2 2-2-017
2 CS3 2-2-017

COURSE

Course Code Course_Name Credit hrs


CS1 DLD 3
CS2 Database 3
CS3 C++ 3

You might also like