Database lab (2)
Database lab (2)
Hamdard University
DATABASE SYSTEMS
Master Manual
Spring 2025
Semester IV
Musawir ALi
NAME:
BSCS/BSSE/BSAI
Department of Computing
Hamdard University
Prerequisites: -
Teaching Methodology
Practical Demo
Marks Distribution
List of Experiments
Exp
No. Date Experiment CLO-PLO Signature
Marks Evaluation
Marks
10
11
12
13
14
Total
Instructor’s Signature
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
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)
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%.
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’.
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’
2. Select
all from
customers who live in ‘Country India’ or ‘Address Model Town’ or ‘City London’.
3. Show all
the
‘CustomerName, Area, City, Country’ where customer doesn’t belong to ‘Country India’
or ‘Country UK’ and lives at ‘Gulshan.’
5. Find the
‘CustomerName’,’Age’, ‘City’ and ‘Country’ where ‘Age’ between 25 to 35. Arrange them
by ‘CustomerName’.