Professional Documents
Culture Documents
Design and Create Relational Schema For Employee Project Management System
Design and Create Relational Schema For Employee Project Management System
Design and Create Relational Schema For Employee Project Management System
Page No.:
Aim:
Description:
Code:
b) Insert the records as per the input given with proper constraint
specification
ID No.:09100469
KL University
Page No.:
--->
--->
--->
--->
--->
ID No.:09100469
KL University
Page No.:
--->
--->
ID No.:09100469
KL University
Page No.:
c) List the details from each table data with select statement
ID No.:09100469
KL University
Page No.:
DEPT_LOCATION DNUMBER
---------------------------- -------------------------
houston 1
stafford 4
bellaire 5
houston 5
sugarland 5
ID No.:09100469
KL University
Page No.:
123456789 33 1
123456789 8 2
666884444 40 3
453453453 20 1
453453453 20 2
333445555 10 2
333445555 10 3
333445555 10 6
333445555 10 8
999887777 30 9
999887777 10 6
987987987 35 6
987987987 5 9
987654321 15 8
987654321 20 9
888665555 8
ID No.:09100469
KL University
Page No.:
productx 1 bellaire 5
producty 2 sugarland 5
product z 3 houston 5
computerisation 6 stafford 4
reorganisation 8 houston 1
ID No.:09100469
KL University
Page No.:
Aim:
Code:
SSN
-------------------
123456789
333445555
453453453
666884444
888665555
987654321
987987987
999887777
ID No.:09100469
KL University
Page No.:
DOB ADDRESS
----------------- -----------------------------------
c) List the details of all employees who are working in the department
number 4
ID No.:09100469
KL University
Page No.:
f 888665555 4 43000
e) List the details of all employees working for the project ProductX.
ID No.:09100469
KL University
Page No.:
f) Retrieve the name and Address of all employees who work for the
'Research' department.
g) For every project located in 'Stafford', list the project number, the
controlling department number, and the department manager's last
name, Address, and birthdate.
ID No.:09100469
KL University
Page No.:
h) For each employee, retrieve the employee's name, and the name
of his or her immediate supervisor.
james borg -
COUNT (DEPENDENTNAME)
-------------------------------------------
ID No.:09100469
KL University
Page No.:
FNAME LNAME
---------------- ----------------
john smith
ahmad jabbar
james borg
joyce english
k) Retrieve all employees who were born during the 1950s. (Here, '5'
must be the 8th character of the string (according to format for
date).
FNAME LNAME
-------------- --------------
franklin wong
ID No.:09100469
KL University
Page No.:
l) Show the effect of giving all employees who work on the 'ProductX'
project a 10% raise.
computerization 6 stafford
ID No.:09100469
KL University
Page No.:
Aim:
Code:
union
PNUMBER
----------------------
ID No.:09100469
KL University
Page No.:
b) Retrieve the name and Address of all employees who work for the
'Research' department.
no rows selected
ID No.:09100469
KL University
Page No.:
select FName, LName from Employee where SSN in (select ESSN from
Works_On where PNo in (select PNumber from proj0377 where
DNum=5));
FNAME LNAME
---------------- -----------------
john smith
franklin wong
ramesh narayan
joyce English
FNAME LNAME
------------------- ---------------------
joyce english
ramesh narayan
james borg
ID No.:09100469
KL University
Page No.:
ahmad jabbar
Charan zelaya
ESSN
----------
123456789
333445555
453453453
666884444
FNAME LNAME
------------------------------ ------------------------------
james borg
h) Find the maximum Salary, the minimum Salary, and the average
Salary among all employees.
ID No.:09100469
KL University
Page No.:
i) Find the maximum Salary, the minimum Salary, and the average
Salary among employees who work for the 'Research' department.
COUNT(*)
-----------------
COUNT(*)
ID No.:09100469
KL University
Page No.:
-------------------
select DNo, count (*), avg (Salary) from Employee group by DNo;
1 1 55000
5 4 33250
4 3 31000
l) For each project, retrieve the project number, project name, and
the number of employees who work on that project.
3 product z 2
6 computerisation 3
1 productx 2
ID No.:09100469
KL University
Page No.:
2 producty 3
9 new benefits 3
8 reorganisation 3
m) For each project on which more than two employees work, retrieve
the project number, project name, and the number of employees
who work on that project.
6 computerisation 3
2 producty 3
9 new benefits 3
8 reorganisation 3
ID No.:09100469
KL University
Page No.:
Aim:
Code:
ID No.:09100469
KL University
Page No.:
STUDNO STUD_NAME
------------------ ------------------------------
1 Charan
2 Vijay
3 Bharghava
4 Srujan
5 Prem
ID No.:09100469
KL University
Page No.:
6 Mukesh
MEMNO STUDNO
------------------ ----------------
123456789 1
222334444 2
333445555 3
444556666 4
555667777 5
666778888 6
ID No.:09100469
KL University
Page No.:
ID No.:09100469
KL University
Page No.:
Queries
STUDNAME MEMNO
------------------- -----------------
Charan 123456789
Vijay 222334444
Bharghava 333445555
ID No.:09100469
KL University
Page No.:
Srujan 444556666
Prem 555667777
Mukesh 666778888
CJDATE
STUD_NAME STUDNO
------------------------------ ---------------
Vijay 2
COUNT(ISSNO)
----------------------
ID No.:09100469
KL University
Page No.:
BOOKNAME BOOKNO
----------------- -------------
dbms 123
webtech 456
daa 111
mp 222
probability 333
ID No.:09100469
KL University
Page No.:
Code:
ID No.:09100469
KL University
Page No.:
CUST_NO CUST_NAME
----------------- -------------------
446 Vijay
481 Charan
ID No.:09100469
KL University
Page No.:
458 Prem
427 Mukesh
436 Srujan
469 Bharghava
MEM_NO CUST_NO
------------------ -----------------
123456789 446
333445555 458
999887777 427
987654321 481
666884444 469
888665555 436
ID No.:09100469
KL University
Page No.:
ID No.:09100469
KL University
Page No.:
Queries
CUST_NAME MEM_NO
------------------------------ ----------
ID No.:09100469
KL University
Page No.:
Vijay 123456789
Prem 333445555
Mukesh 999887777
Charan 987654321
Srujan 888665555
Bharghava 666884444
CUST_NO CUST_NAME
---------------- -------------------
436 Srujan
Customer469.
ID No.:09100469
KL University
Page No.:
COUNT(ISS_NO) MEM_NO
------------- ----------
2 123456789
1 987654321
2 333445555
1 888665555
1 999887777
f) Give a list of book which has been taken by the Student469 with
mem_no as 5
no rows selected.
CASS_NO ISSDATE
-------------- ---------------
4916 14-MAR-11
ID No.:09100469
KL University
Page No.:
Code:
ID No.:09100469
KL University
Page No.:
--->
ID No.:09100469
KL University
Page No.:
--->
--->
ID No.:09100469
KL University
Page No.:
1 Charan ce
2 ramesh ece
3 elizabeth cse
4 ahmad csit
5 james eee
monday 1 102
thrusday 4 105
tuesday 3 101
wednesday 2 103
friday 5 104
CLASS DESCRIP
------------ --------------------
ce civil
cse computers
eee electrical
ece electronics
Queries
c) List all the machine allotments with the Student469 names, lab and
Machine numbers
ID No.:09100469
KL University
Page No.:
COUNT(MACH_NO) DAYOFWEEK
---------------------------- --------------------
1 friday
1 monday
1 wednesday
1 thursday
1 tuesday
ID No.:09100469
KL University
Page No.:
COUNT(MACH_NO)
-----------------------------
COUNT(MACHNO)
-------------------------
ID No.:09100469