Important Questions

CBSE Guess > Papers > Important Questions > Class XII > 2010 > Computer Science > Computer Science By Ravi Kiran

CBSE CLASS XII

5. (a) What do you understand by the terms Primary Key and Degree of a relation in
relational database? 2
269

(b) Consider the following tables EMPLOYEES and EMPSALARY. Write SQL
commands for the statements (i) to (iv) and give outputs for SQL queries (v) to (viii). 6
EMPLOYEES
EMPID FIRSTNAME LASTNAME ADDRESS CITY
010 George Smith 83 First Street Howard
105 Mary Jones 842 Vine Ave. Losantiville
152 Sam Tones 33 Elm St. Paris
215 Sarah Ackerman 440 U.S. 110 Upton
244 Manila Sengupta 24 Friends Street New Delhi
300 Robert Samuel 9 Fifth Cross Washington
335 Henry Williams 12 Moore Street Boston
400 Rachel Lee 121 Harrison St. New York
441 Peter Thompson 11 Red Road Paris
EMPSALARY
EMPID SALARY BENEFITS DESIGNATION
010 75000 15000 Manager
105 65000 15000 Manager
152 80000 25000 Director
215 75000 12500 Manager
244 50000 12000 Clerk
300 45000 10000 Clerk
335 40000 10000 Clerk
400 32000 7500 Salesman
441 28000 7500 Salesman

(i) To display Firstname, Lastname, Address and City of all employees living in Paris from the table EMPLOYEES.

(ii) To display the content of EMPLOYEES table in descending order of FIRSTNAME.

(iii) To display the Firstname, Lastname, and Total Salary of all Managers from the tables EMPLOYEES and EMPSALARY, where Total Salary is calculated as Salary + Benefits. 270

(iv) To display the Maximum salary among Managers and Clerks from the table
EMPSALARY.

(v) SELECT FIRSTNAME, SALARY
FROM EMPLOYEES, EMPSALARY
WHERE DESIGNATION = ‘Salesman’ AND
EMPLOYEES.EMPID=EMPSALARY.EMPID;

(vi) SELECT COUNT(DISTINCT DESIGNATION)FROM EMPSALARY;

(viI) SELECT DESIGNATION, SUM(SALARY)
FROM EMPSALARY
GROUP BY DESIGNATION HAVING COUNT(*)>2;
(viii) SELECT SUM(BENEFITS)
FROM EMPLOYEES
WHERE DESIGNATION = ’Clerk’;

6. (a) State and verify Associative law in Boolean Algebra. 2

(b)
Write the equivalent Boolean expression for the following Logic Circuit : 2

(c) Write the SOP form of a Boolean Function F, which is represented by the following truth table: 1
A B C F
0 0 0 1
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 0
1 1 0 1
1 1 1 1

(d) Reduce the following Boolean expression using K - Map: 3
F (A, B, C, D) = Ð (O, 1, 2, 3, 4, 5, 10, 11, 15)

Paper By Mr. Ravi Kiran
Email Id : [email protected]