Introduction to Database
Lab Task 1
Write a program to take inputs the following attributes and write on a file ([Link])
[Link]
[Link] Name
[Link] Name
[Link]
[Link]
[Link]
StudentInfo file should be like below:
1 Registration Number , F i r s t Name, L ast Name, Program , CGPA, ContactNumber
2 L1f11BSCS0001 , Sadia , Khan , BSCS , 3 . 27 , 03321234123
3 L1f11BSCS0021 , Shanya , Khan , BSCS , 3 . 77 , 03321234213
4 L1f11BSCS0031 , Goree , Khan , BSCS , 3 . 57 , 03321234143
5 L1f11BSCS0041 , Jemayma , Khan , BSCS , 3 . 85 , 03321234223
6 L1f11BSCS0022 , Samandar , Khan , BSCS , 3 . 97 , 03321234542
7 L1f11BSCS0025 , Reham , Khan , BSCS , 2 . 47 , 03321234213
Lab Task 2
Write a program that displays the name of students whose CGPA is 3.5 or above.
Lab Task 3
We have some files ([Link] and [Link]). Write a function that displays those employees who are working
in
Research department.
[Link]
1 DeptID , DeptName
2 1 , Research
3 2 , S al es
4 3 , Marketing
5 4 , Adminstra tion
6 5 , Qua lity Control
and employee file ([Link])
1 empId , EmpName, EmpJoiningDate , DeptId , Contact , Salary , M ari tal S ta tus
2 001 , Imran , 15/07/2012 , 1 , 03331222567 , 78000 , Married
3 002 , Saleem , 15/07/2012 , 1 , 03331233567 , 160000 , Married
003 , Aziz , 15/10/2011 , 1 , 03331234557 , 74000 , Married
1
Introduction to Database
5 004 , Jem Morison , 15/08/2012 , 5 , 03331244567 , 78000 , Married
6 005 , Junaid , 15/07/2013 , 3 , 03331234568 , 79000 , Married
7 006 , Jamshed , 15/01/2013 , 4 , 03001234568 , 45000 , S i ngl e
8 007 , Asim , 01/01/2011 , 1 , 03211234568 , 69000 , S i ngl e
9 008 , Javeria , 02/07/2010 , 2 , 03003001234 , 145000 , S i ngl e
10 009 , Zara , 02/01/2011 , 4 , 03010234568 , 79000 , S i ngl e
Lab Task 4
Write a function that display those employee name and salary from employee ([Link]) file, who earn 1500000 or
greater on a year.
Lab Task 5
Using above [Link] file perform the following operations:
[Link] the Name of The Person who is getting highest salary.
[Link] the name whose salary is lowest.
[Link] the total number of employees whore married.
[Link] the name of employees who are single.
5. Print the Average salary of all employees.
6. Print the name of Employees Whose Salary is greater than â
A˘ IJImranâA˘˙I. [Link] the name of Employees Whose Salary is less than â
A˘ IJAzizâA˘˙I.
[Link] and display the information of Omer.