0% found this document useful (0 votes)
77 views2 pages

Punjab University College of Information Technology (Pucit) : Database Systems Lab 2

This document contains instructions for a database systems lab assignment. It provides definitions for several database relations and 12 queries to solve using the given relations. The relations include tables for employees, departments, salary grades, students, courses, and grades. The queries ask to retrieve various data fields from the relations by applying selection, restriction, and join clauses as specified.

Uploaded by

Lyeba Ajmal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
77 views2 pages

Punjab University College of Information Technology (Pucit) : Database Systems Lab 2

This document contains instructions for a database systems lab assignment. It provides definitions for several database relations and 12 queries to solve using the given relations. The relations include tables for employees, departments, salary grades, students, courses, and grades. The queries ask to retrieve various data fields from the relations by applying selection, restriction, and join clauses as specified.

Uploaded by

Lyeba Ajmal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

PUNJAB UNIVERSITY COLLEGE OF

INFORMATION TECHNOLOGY (PUCIT)

Database Systems Lab 2


IT Morning Fall-15 (New Campus)

Date: 14-03-2017
Instructions:

 Sharing is strictly not allowed in lab work.(As of course it will go in your benefit)
 To seek any help, consult with TAs.
 Solve this lab on a paper.
 Use Signs for Select, Where and Join Clauses.
 Solve the lab on blank paper and write your roll number and name… Lots of Luck! 

You are given with database relation as follows:

EMP (EMPNO, ENAME,DNAME)

1. Create a query to display employee name and department name for employee number
75600.

EMP(EMPNO, ENAME, SAL, HIREDATE, COMMISION, MANAGER, DEPTID)

DEPT(DEPTID, DNAME, LOC)

SALG(SALGRADE, MAXSAL, MINSAL)

(Assume the symbol Π denotes Selection, Ϭ denotes Restriction and Ʃ denotes join in this
document)

Write solution of the given queries considering above relations.

2. Give department ID of all employees.


3. Give salary grade, manager of all employees whose name is “Michel”.
4. Give employee number, department name, hire date and location of only those employees
who hired after 2011.

Teaching Assistants: Instructor:


 Abdul Moid – BSEF14A524 Farhan Ahmad Ch.
 Sonia Hayat – BSEF14M515
5. Give employee number, name, hire date, commission, department id, department name,
location, salary grade of all employees those names are Hassan, salary is less than 50000,
commission is 2% of the half of their salary and hire date is greater than 2005.
6. Give names of all those employees who work in “Manchester”, take no commission
under manager 3323 and hire before 2002.
7. Give the name and minsal of employees those salgrade is 15.
8. Give salary grade of employees those Salary is less than the maxsal and name is Osama.
9. Give employee number and name of employees that department id is less than 50 and their
commission is less than 15% of their salary.
10. Give employee number, hire date, department name and commission of all employees those
commission is less than 30% of the half of their salary.

Student (ID, FNAME, LNAME, DEGREE, MARKS, CGPA, SEMESTER, COURSE_ID)

Course (COURSE_ID, COURSE_NAME, GPA, CREDIT_HOUR)

Grade (GRADE, MAX_MARKS, MIN_MARKS)

11. Give fname and semester of employees if CGPA is 3.00 and marks are between
max_marks and min_marks.
12. Give name of student who are not taking course of “Physics”.

Best of Luck

Teaching Assistants: Instructor:


 Abdul Moid – BSEF14A524 Farhan Ahmad Ch.
 Sonia Hayat – BSEF14M515

You might also like