0% found this document useful (0 votes)
12 views5 pages

PT Test-1

Uploaded by

Shibhi Siddarth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views5 pages

PT Test-1

Uploaded by

Shibhi Siddarth
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

AKR ACADEMY SCHOOL(CBSE)

PERIODIC TEST-1 (JUNE)

GRADE:XII COMPUTER SCIENCE(083) MARKS:40

I.ANSWER THE FOLLOWING 5*1=5

1. In MYSQL database, if a table, Alpha has degree 5 and cardinality 3, and another table, Beta has
degree 3 and cardinality 5, what will be the degree and cardinality of the Cartesian product of Alpha
and Beta?
a. 5,3 b. 8,15 c. 3,5 d. 15,8
2. Which of the following statements is FALSE about keys in a relational database?
a. Any candidate key is eligible to become a primary key.
b. A primary key uniquely identifies the tuples in a relation.
c. A candidate key that is not a primary key is a foreign key.
d. A foreign key is an attribute whose value is derived from the primary key of another relation.
3. ______________ is number of relation in a table
a. Attribute b. Degree c. Domain d. cardinality
4. ________________clause used with SELECT statement to display data in sorted form with respect to
a specified column
a. WHERE b. ORDER BY c.HAVING d.DISTINCT
5. _________ statement of SQL is used to insert new records in a table.
(a) ALTER (b) UPDATE (c) INSERT (d) CREATE

II. ANSWER THE FOLLOWING 6*2=12

6. Explain the concept of “ALTERNATE KEY” in a Relational Database Management System with an
appropriate example
7. Differentiate between CHAR and VARCHAR data types in SQL with appropriate example.
8. Name any 2 DDL and DML commands.
9. Differentiate between delete and drop commands.
10. Differentiate between count () and count (*) .
11. Explain the usage of HAVING clause in GROUP BY command in RDBMS with the help of an
example.

III. ANSWER THE FOLLOWING 5*3=15

12. Consider the table CLUB given below and write the output of the SQL queries that follow.
(i) SELECT COUNT(DISTINCT SPORTS) FROM CLUB;

(ii) SELECT CNAME, SPORTS FROM CLUB WHERE DOAPP<"2006-04-30" AND CNAME LIKE
"%NA";

(iii) SELECT CNAME, AGE, PAY FROM CLUB WHERE GENDER = "MALE" AND PAY BETWEEN
1000 AND 1200;

13. Consider the table Personal given below:

Based on the given table, write SQL queries for the following:
(i) Increase the salary by 5% of personals whose allowance is known.
(ii) Display Name and Total Salary (sum of Salary and Allowance) of all personals. The column
heading ‘Total Salary’ should also be displayed.
(iii) Delete the record of personals who have salary greater than 25000
14. A) Consider the following tables –LOAN and BORROWER:
b)

15. A) Write the outputs of the SQL queries (i) to (iv) based on the relations COMPUTER and SALES
given below
16. A) Which of the following is NOT a DML command
DELETE, DROP, INSERT UPDATE

B)

III. ANSWER THE FOLLOWING: 2*4=8


17. Consider the tables PRODUCT AND BRAND given below:

Write SQL queries for the following:


(i) Display product name and brand name from the tables PRODUCT and BRAND.
(ii) Display the structure of the table PRODUCT.
(iii) Display the average rating of Medimix and Dove brands
(iv) Display the name, price, and rating of products in descending order of rating
18.

You might also like