0% found this document useful (0 votes)
3 views4 pages

Solution Rdbms Worksheet

This worksheet covers various concepts related to databases, specifically focusing on relational database management systems (RDBMS). It includes questions about keys, integrity, SQL queries, and characteristics of relations. Additionally, it asks for explanations of terms and practical SQL query writing based on given tables.

Uploaded by

jaijithpratyush
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)
3 views4 pages

Solution Rdbms Worksheet

This worksheet covers various concepts related to databases, specifically focusing on relational database management systems (RDBMS). It includes questions about keys, integrity, SQL queries, and characteristics of relations. Additionally, it asks for explanations of terms and practical SQL query writing based on given tables.

Uploaded by

jaijithpratyush
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

CLASS XII

WORKSHEET
DATABASE
1 What do you understand by the term Foreign key? How many foreign keys can be added to any
table?
2 What is Primary Key? How many primary key can be added to any table?
3 What are the main restrictions enforces by Primary Key if applied on any column?
4 Write short notes on following relational terms:
a. Tuple
b. Attribute
c. Relation
d. Domain
5 What is referential Integrity? How it is implemented in any table?
6 Expand the term: RDBMS
7 RDBMS is a collection of:
a. Fields
b. Tables
c. Columns
d. Keys
8 The term attribute refers to of a table:
a. Record
b. Key
c. Tuple
d. Column
9 “Address” field of a table cannot be a part of Primary key as it is likely to?
a. Dependent
b. Changed
c. Too Long
d. Not Changed
10 In RDBMS referential integrity can be specified with the help of
a. Primary Key
b. Secondary Key
c. Foreign Key
d. None of these
11 How would you return all the rows from a table named "Item" sorted in descending
order on the column "IName"?
(b) SELECT * FROM Item ORDER BY IName DESC ;
c) SELECT * FROM Item ORDER IN IName desc;
d) SELECT * FROM Item SORT BY 'IName' DESC;
(d) SELECT * FROM Item SORT 'IName' DESC;
12 Table T1 contains 10 Rows and 4 Columns; Table T2 contains 20 Rows and 3 Columns. After
performing Cartesian product of T1 and T2, What will be the degree and cardinality of
Resultant output?
13 Count(*) method count
(a) NULL values only (b)Empty Values
(c) ALL the values (d) None of these
14 What is the difference between Primary Key and Candidate Key?
15 Which statement is used to modify data in a table?
(a) CHANGE (b) MODIFY (c) UPDATE (d) ALTER
16 What is alternate Key?
17 Give any 2 advantages of using Database?
18 Horizontal subset of table is known as
a. Attribute
b. Doman
c. Tuple
d. Keys
19 For each attribute of a relation, there is a set of permitted values, called the of that
attribute.
a. Dictionaries
b. Domain
c. Directory
d. Relation
20 in a table represent relationship among a set of values.
a. Column
b. Keys
c. Row
d. Entry
21 Tuples of a table can be of order
a. Any
b. Same
c. Sorted
d. Constant
22 Write any 2 characteristics of a Relation
23 Who invented the term “Relational Database”?
a. Blaise Pascal
b. Dr. E. F. Codd.
c. Charles Babbage
d. Tim Berners Lee
24 Column names of any table must be:
a. Must be numeric type
b. Must be unique
c. Must be in sorted order
d. Must not be greater than 40 characters
25 Based on the given table “SALE” answer the question (i) and (ii)
(i) Can we take QTY column of the above table as Primary Key? If no give reason
Which column is best suitable for applying Primary Key?
PRODID QTY RATE AMOUNT
1 10 100 1000
2 5 50 250
3 10 20 200
4 20 100 2000
26 Observe the following table TEACHER and TASK carefully and write the names of the RDBMS
operation out of (i) EQUI JOIN (ii) NATURAL JOIN (iii) SELECTION (iv) CARTESIAN
PRODUCT, which has been used to product the output as shown below. Also find the Degree
and Cardinality of final RESULT.
TABLE: TEACHER
TEACHER_CODE TEACHER_NAME SUBJECT
T001 AMIT BIOLOGY
T002 ANAND HINDI
T003 MOHAN PHYSICS

TABLE: TASK
TASKNAME COMPLETION_DATE
SBSB 30-04-2020
EBSB 31-05-2020
GANGA_QUEST 30-04-2020

FINAL RESULT
27 Observe the following table and answer the question (i) , (ii) and (iii)
TABLE: VISITOR
VisitiorID VisitorName ContactNumber
V001 ANAND 9898989898
V002 AMIT 9797979797
V003 SHYAM 9696969696
V004 MOHAN 9595959595
(i) Write the name of most appropriate columns which can be considered as Candidate
keys
(ii) Out of selected candidate keys, which one will be the best to choose as Primary
Key?
(iii) What is the degree and cardinality of the table
28 Write the output of the queries (i) to (iv) based on the table, TECH_COURSE given below:

A) Write the following queries:

(i) To display the details of the courses with names starting with ‘D’.
(ii) To display the fees of courses in descending order.
(iii) Display the sum of fees of all the courses for which TID is not null.
(iv) To display the course name with fees less than 15000.

B) Write the output of following queries:


(i) SELECT DISTINCT TID FROM TECH_COURSE;
(ii) SELECT TID, COUNT(*), MIN(FEES) FROM TECH_COURSE GROUP BY TID HAVING
COUNT(TID)>1;
(iii) SELECT CNAME FROM TECH_COURSE WHERE FEES>15000 ORDER BY CNAME;
(iv) SELECT AVG(FEES) FROM TECH_COURSE WHERE FEES BETWEEN 15000 AND 17000;

29 Write the output of the queries (i) to (iv) based on the table, TECH_COURSE given below:

A) Write the following queries:


(i) To display the details of the courses with names starting with ‘D’.
(ii) To display the fees of courses in descending order.
(iii) Display the sum of fees of all the courses for which TID is not null.
(iv) To display the course name with fees less than 15000.
B) Write the output of following queries:
(i) SELECT DISTINCT TID FROM TECH_COURSE;
(ii) SELECT TID, COUNT(*), MIN(FEES) FROM TECH_COURSE GROUP BY TID HAVING
COUNT(TID)>1;
(iii) SELECT CNAME FROM TECH_COURSE WHERE FEES>15000 ORDER BY CNAME;
(iv) SELECT AVG(FEES) FROM TECH_COURSE WHERE FEES BETWEEN 15000 AND 17000;

30 Salman has been entrusted with the management of Airlines Database. He needs to access some
information from Airports and Flights tables for a survey. Help him extract the following information
by writing the desired SQL queries as mentioned below.
Table – Airports

Table – Flights

(i) To display airport name, city, flight id, flight number corresponding flights whose departure
is from delhi
(ii) Display the flight details of those flights whose arrival is BOM, MAA or CCU
(iii) To delete all flights whose flight number starts with 6E.
(iv) To display Cartesian Product of two tables
(v) To display airport name,city and corresponding flight number

You might also like