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

Periodictest22017 18xiip

Uploaded by

alirida20071
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)
25 views2 pages

Periodictest22017 18xiip

Uploaded by

alirida20071
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

KENDRIYA VIDYALAYA NO.

3 GWALIOR
Periodic Assessment 2017-18
CLASS:- XI SUB:- IP
TIME: 1 ½ HRS MM- 40
----------------------------------------------------------------------------------------------------------------------------------
Q 1) Define and explain with example:- (5x2 = 10)

i) Explain DBMS and any two advantage of Database System.


ii) Referential Integrity Constraint
iii) Database Abstraction
iv) What is Cardinality and degree?
v) Domain and tuple of a relation.

Q2) Difference between:- (5 x 2 = 10)

i) Primary key Vs Foreign key


ii) Candidate key Vs Alternate key
iii) DDL Vs DML
iv) Physical data independence Vs Logical data independence
v) Char Vs Varchar data types

Q3) Given the details for the table EMPLOYEE , write the queries for the following problems:-

Column EmpID EmpName EmpAddress EmpPhone EmpSal DeptID


Name
Key Type PRIMARY Foreign
Nulls/Unique NOT NULL
Fk Table Department
Fk column DeptId
Datatype NUMBER VARCHAR VARCHAR VARCHAR NUMBER VARCHAR
length 6 20 30 10 9,2 2

a) Create the table EMPLOYEE on the basis of the above information with all constraints. (2)

b) Add a new column Gender to the table EMPLOYEE with datatype as Varchar and size 1. (2)
c) Insert a new record to the table EMPLOYEE with the details :- (1)
(101,”AGNI”,”KALYANI”, 912345678, 50000,10)
d) Delete the entire table EMPLOYEE from the database (1)
e) To open the database named MYDB (1)
f) To increase the Empsal by 1000 for every record in employee table (1)
Q4) Consider the table EMP as given below and answer the following. Write SQL query for Q (i) to (viii)
and show the output for (ix) to (xii) (1 x 12 = 12)

EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO


8369 SMITH CLERK 8902 1990-12-18 800 NULL 20
8499 ANYA SALESMAN 8698 1991-02-20 1600 300 30
8521 SETH SALESMAN 8698 1991-02-22 1250 500 30
8566 MAHADEVAN MANAGER 8839 1991-04-02 2985 NULL 20
8654 MOMIN SALESMAN 8698 1991-09-28 1250 1400 30
8698 BINA MANAGER 8839 1991-05-01 2850 NULL 30
8882 SHIAVNSH MANAGER 8839 1991-06-09 2450 NULL 10
8888 SCOTT ANALYST 8566 1992-12-09 3000 NULL 20
8839 AMIR PRESIDENT NULL 1991-11-18 5000 NULL 10
8844 KULDEEP SALESMAN 8698 1991-09-08 1500 0 30
8886 ANOOP CLERK 8888 1993-01-12 1100 NULL 20
8900 JATIN CLERK 8698 1991-12-03 950 NULL 30
8902 FAKIR ANALYST 8566 1991-12-03 3000 NULL 20
8934 MITA CLERK 8882 1992-01-23 1300 NULL 10
Write the QUERY for the following:-
i) Display all the records from employee table.
ii) Display Ename, sal, deptno who are not getting commission from table EMP.
iii) List the details of employees who earn more commission than their salaries.
iv) Display employee number, name, salary and annual salary. Assuming that the salary provided is the
monthly salary.
v) How many job types are offered to employees
vi) List the details of all employees whose salary ranges from 2500 to 3500.
vii) To display the name of the employees whose name contains ‘A’ as third letter.
viii) Display a report of employee table with all records sorted in descending order of their hiredate.
Give the OUTPUT for the following on the basis of the above table
ix) Select ename, job, deptno from emp whose job = ‘SALESMAN’;
x) Select * from emp where ename NOT LIKE ‘%A%’;
xi) Select ename,sal from emp where job IN(‘MANAGER’,’ANALYST’) order by sal;
xii) Select ename, hiredate, sal from emp where sal between 2000 and 3000;

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy