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

Database lab (2)

The document is a Master Manual for the Database Systems course at Hamdard University for the Spring 2025 semester. It outlines the course structure, including prerequisites, learning outcomes, marks distribution, and a list of experiments to be conducted. The manual also includes specific lab exercises focused on SQL and database design principles.

Uploaded by

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

Database lab (2)

The document is a Master Manual for the Database Systems course at Hamdard University for the Spring 2025 semester. It outlines the course structure, including prerequisites, learning outcomes, marks distribution, and a list of experiments to be conducted. The manual also includes specific lab exercises focused on SQL and database design principles.

Uploaded by

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

FACULTY OF ENGINEERING SCIENCES AND TECHNOLOGY

Hamdard University

DATABASE SYSTEMS
Master Manual
Spring 2025

Semester IV

Musawir ALi
NAME:

ROLL NO: 2661-2023

BSCS/BSSE/BSAI

Department of Computing
Hamdard University

Faculty of Engineering & Technology, Hamdard University SharaeMadinat Al-


Hikmah, Muhammad Bin Qasim Avenue, Karachi 74
Program: BSCS

Instructor: Aijaz Ali

Prerequisites: -

Mapping of LLOs and PLOs

Sr. No Lab Learning Outcomes PLOs Blooms


Taxonomy
P3 (Guided
LLO_1 Be able to produce Conceptual & Logical database PLO_2 Response)
design

Be able to write & execute SQL queries using Database P4 (Mechanism)


LLO_2 tools & techniques. PLO_5

Work effectively as an individual or in team to solve real A4 (Organizing)


LLO_3 world problems PLO_6

Credit Hours: 0+1

Contact Hours: 0 + 3 Hours Learning


Outcomes:

Teaching Methodology

Practical Demo

Marks Distribution

Final Lab 30%


Final Viva Project 20%
OEL 20%
Lab Manual 30%
Tool

SQL (Server & Management Studio)

List of Experiments

Exp
No. Date Experiment CLO-PLO Signature

1 Introduction to Databases and IDE PLO_2

2 Database Manipulation Language PLO_5

3 Arithmetic and relational operators in SQL PLO_5

4 Logical Conditions and Order by Clause PLO_5

5 Implementation of Scalar Functions in SQL PLO_5

6 Aggregate functions in SQL PLO_5

7 Learn and implement SQL joins PLO_5

8 Convert ERD to Physical Database Design PLO_2

9 Learn and implement sub-queries in SQL PLO_5

10 Learn and implement Indexes in SQL PLO_5

11 Learn and implement Views in SQL PLO_5

Learn conditional processing with CASE and


12 PLO_5
combining results from multiple queries with Union

13 Learn and Implement Triggers in SQL PLO_5


14 Learn and implement stored procedures in SQL PLO_5

Faculty of Engineering Sciences & Technology, Hamdard University


SharaeMadinat Al-Hikmah, Muhammad Bin Qasim Avenue, Karachi 74600, Pakistan.

Marks Evaluation

Marks

Experiment No. Class Experiment Experiment Total


Participation Performance Reporting (1)
(0.3) (0.5) (0.2)

10

11
12

13

14

Total

Instructor’s Signature

Faculty of Engineering Sciences & Technology, Hamdard University


SharaeMadinat Al-Hikmah, Muhammad Bin Qasim Avenue, Karachi 74600, Pakistan.
Lab # 1

1. Install Microsoft SQL Server in your PC and show step by step

installation with screenshot.


2. Create two tables & Identify following from these tables:

a) Candidate key

b) Primary key
c) Alternate key

d) Foreign Key

ANS)

TABLE 1:


Primary Key: StudentID


Alternate Key: Email

TABLE 2:
Primary Key: CourseID

Foreign Key: StudentID (References Students.StudentID)


Lab # 2

1. Create database ‘EMPLOYEE’ and then create table ‘tbl_Employee’

2. Write a query to insert values from given table into tbl_Employee table.
3. Write a query to add new columns ‘Salary’ & ‘WorkingHours’ in ‘tbl_Employee’ table.
(WorkingHours 8 or 10, Salary 20000 to 40000)

4. Select ‘EmpID’, ‘FirstName’ and ‘Title’ whose ‘Salary = 30000’

5. Select ‘FirstName’, ‘Title’ and convert ‘WorkingHours’ in Minutes using arithmetic operator.
6. Display ‘EmpID’, ‘FirstName’, ‘LastName’ and add new column named ‘Increment’ by multiplying
‘Salary’ * 10%.

7. Display only those record whose ‘DeptID = 3’.


8.Update values ‘DeptID = 4’ where ‘EmpID = 3’.

8. Drop record where ‘Phone = 5833’.


9. Back up your database in D:\drive

Lab # 3

1. Create table named ‘tbl_student’ and insert data from above table.
2. Find all the details where ‘St_Name’ are ‘Maaz’ and ‘Jibran’.

3. Select Student details where ‘St_Name’ has ‘T’.


4. Find the St_Name whose GPA are between 2 to 3.

5. Find the details about Student where the St_name has ‘A’ in the beginning and ‘R’ in the end.
6. Find the details about the Student where the ‘City’ name has a ‘Islamabad’

7. Find all the details of Student, whose ‘City’ are null.


Lab # 4
1. Show all the customers who belong to ‘Country Pakistan’ and lives in ‘City Karachi’.

2. Select

all from

customers who live in ‘Country India’ or ‘Address Model Town’ or ‘City London’.

3. Show all
the

customers who don’t live in ‘City Karachi’ and ‘City Lahore’.


4. Display

‘CustomerName, Area, City, Country’ where customer doesn’t belong to ‘Country India’
or ‘Country UK’ and lives at ‘Gulshan.’

5. Find the

‘CustomerID’, ‘CustomerName’, ‘Age’ and ‘Country’; arrange ‘Age’ by descending order.


6. Find the

‘CustomerName’,’Age’, ‘City’ and ‘Country’ where ‘Age’ between 25 to 35. Arrange them
by ‘CustomerName’.

7. Find the ‘CustomerID’, ‘CustomerName’ and join City and Country

You might also like