You are on page 1of 6

Advance Database Management System

Pre-Mid Assignment

Submited to:
Prof: Atif Naeem

Submited by:
WASIF (#008)

Department:
ADP-CS

Subject:
Advance Database Management System
Advance Database Management System

What Are Student Management Systems?


A student management system (also known as a student information system or SIS)
helps a school manage data, communications, and scheduling.

A school system generates and uses a large amount of data. This data must be
communicated appropriately to students, faculty, and parents. A student
management system helps schools to store, manage, and distribute this information.

Some student management systems are designed to serve all of a school’s data
management needs. Other student management systems are specialized. These
specialized solutions target specific needs, such as school applications or student
behavior tracking.

Student Management Systems Features & Capabilities


There are many students who take up various courses. All courses are run
by lecturers. We have ID numbers for students, courses and lecturers. When a new
student comes, we need to know their first name, last name and date of birth.
When a new lecturer comes, we write down their first name, last nameand
their date of employment. All courses have names and descriptions so that
students know what they cover. We also store the date when the course starts.

Relational Diagram

1
Advance Database Management System

TABLES

Table For Student:-


Student-ID F-name L-name Born Course-ID

S1 Zara Khan 02-03-1998 001

S2 Summaya Nasir 25-08-1997 002

S3 Areesh Khan 18-01-2000 003

S4 Zohaib Zafar 04-09-1999 004

S5 Nayab Arshad 10-11-2001 005

S6 Laiba Mehtab 10-05-1998 006

S7 Zain Akmal 11-07-1997 007

Table For Course:-


Course-ID Name Date Started

001 Software Eng 02-02-2016

002 RDBMS 08-12-2018

003 English 24-05-2015

004 C++ 12-06-2016

005 Urdu 4-02-2018

006 Islamiyat 29-03-2014

007 DLD 6-17-2019

Table For Lecturer:-


Lecturer-ID F-name L-name D.Join Course-ID

L01 Hassan Ali 02-02-2016 001

L02 Zunaira Amjad 08-12-2018 002

L03 Zara Abbas 24-05-2015 003

1
Advance Database Management System

L04 Aaliya Khan 12-06-2016 004

L05 Adeel Jabbar 4-02-2018 005

L06 Zahid Iqbal 29-03-2014 006

L07 Akmal Khan 6-17-2019 007

Different types of SQL JOINS


Here are the different types of the JOINs in SQL:

 (INNER) JOIN: Returns records that have matching values in both


tables

INNER join syntax:


Select student.student-ID, student.f-name, course.name

From student

Inner join course ON student.course-id=course.course-id

Output:
Student-ID F-name Name

S1 Zara Software Eng

S2 Summaya RDBMS

S3 Areesh English

S4 Zohaib C++

S5 Nayab Urdu

S6 Laiba Islamiyat

S7 Zain DLD

1
Advance Database Management System

 LEFT (OUTER) JOIN: Returns all records from the left table, and the
matched records from the right table

Left outer join syntax:

Select student.student-ID, student.f-name,student.L-name course.name

From student

Left join course ON student.course-id=course.course-id

Output:
Student-ID F-name L-name Name

S1 Zara Khan Software Eng

S2 Summaya Nasir RDBMS

S3 Areesh Khan English

S4 Zohaib Zafar C++

S5 Nayab Arshad Urdu

S6 Laiba Mehtab Islamiyat

S7 Zain Akmal DLD

 RIGHT (OUTER) JOIN: Returns all records from the right table, and
the matched records from the left table

1
Advance Database Management System

Right outer join syntax:

Select course.course-id,course.name,student.F-name

From course

Right join student ON student.course-id=course.course-id

Output:
Course-ID Name F-name

001 Software Eng Zara

002 RDBMS Summaya

003 English Areesh

004 C++ Zohaib

005 Urdu Nayab

006 Islamiyat Laiba

007 DLD Zain

You might also like