Sie sind auf Seite 1von 4

Student Declaration

I_RAMISHA FATIMA ___Registration No.___19-ARID-335_, hereby declare that by

attempting the paper for the course Database Management System, I will not be involved in

any kind of cheating/copying/plagiarizing in solving the short questions based paper of

Final Term Examination Fall 2020. I take full responsibility of my conduct and if I found

involved in any kind of such activity of cheating/copying/plagiarizing, then Institute reserves

the right to reject my paper and take any disciplinary action against me.

Student Signature
Final Exam / Fall 2020 (Paper Duration 24 hours)
(Online Short Questions Based Paper)

Course No.: CS- 400 Course Title: Database Systems


Total Marks: 20 Date of Exams:
Degree: BSCS Semester: 4th Section:
Marks
Q.No. 1 2 3 4 5 6 7 8 9 10 Obtained/
Total Marks
Marks
Obtaine
d
Total Obtained Marks in Words:
Name of the Teacher: Hina Umbrin
Who taught the course: Signature of Teacher / Examiner:

To be filled by Student

Registration No.: 19-ARID-335 Name:RAMISHA FATIMA

(PRACTICAL EXAMINATION)

Answer the following questions.


Q No. 1: Normalize the below table into 2nd and 3rd Normal Form (Marks=8)

Answer:
 NORMALIZE 2nd NORMAL FORM :

Employee -ID NAME ROLE SALARY


E42 Mark Web Dev E22K
E33 Kevin Web Dev E34K
 NORMALIZE 3rd NORMAL FORM :

Project-ID Project-name Employee-ID EST-TIME


P1 Mark E42 1 Month
P2 Kevin E33 2 day’s
P3 Mark E42 1 week
P4 Kevin E33 1 day
P5 Mark E42 1 year
P6 Kevin E33 1week

Q No. 2: Create two tables and name them “Employ”(ID, Name, DeptName) and

“Department” (DepId, DeptName, comment). (Marks=12)

 Apply Inner Join


 Apply Left outer joins.
 Apply right outer joins.
 Apply full orbit joins.

Answer:

 /* TABLE EMPLOYEE*/

Create table employ(


ID int,
Name varchar(60),
Dept-name varchar(60)
);

 /*Table Department*/

Create table department(


Dept-id int,

Dept -name varchar (60),


Comment varchar (60)
);
Select * from employ;
Select *from department;

 /*INNER JOIN*/
Select Employ ,ID,Department .Dept-id ,Department.dept-name
from Employ inner join Department
ON Employ .ID =Department.Dept-id;

 /*Left join*/
Select Employ ,ID,Department,Dept-id,Department. DeptName,Department.Name
From Employ left join Department
ON Employ.id=Department.Dept-id;

 /*RIGHT JOIN*/
Select Employ. ID, Department. Dept Id, Department. DeptName
From Employ Right join Department
ON Employ . ID = Department. Dept Id;

 /*FULL OUTER JOIN*/


Select Employ. ID, Department. Dept ID ,Department. Dept Name
From Employ FULL OUTER JOIN Department
ON Employ.ID=Department. Dept Id

Das könnte Ihnen auch gefallen