Page 289 - Information_Practice_Fliipbook_Class11
P. 289
(iii) +---------------+ (iv) +--------------+---------------+
| AVG(DISTANCE) | | CAT | SUM(DISTANCE) |
+---------------+ +--------------+---------------+
| 358.0000 | | HILL STATION | 340 |
+---------------+ | HISTORICAL | 224 |
| BEACH | 970 |
+--------------+---------------+
(v) +------------+------------+ (vi) +-------------+----------+
| CNAME | TRAVELDATE |
| DESTINATION | COUNT(*) |
+------------+------------+ +-------------+----------+
| ABHIMANYU | 2022-01-01 | | SRINAGAR | 1 |
| SHALOO | 2022-03-10 | | JAIPUR | 1 |
| SONIA | 2022-03-10 | | GOA | 2 |
| GURVINDER | 2022-07-18 | | CHANDIGARH | 1 |
| PENNY | 2022-08-08 | | NULL | 1 |
| SENTHIL | 2022-10-05 | +-------------+----------+
+------------+------------+
(vii) +-----------+------------+ (viii) +---------+
| CNAME | TRAVELDATE | | CNAME |
+-----------+------------+ +---------+
| SHALOO | 2022-03-10 | | SHALOO |
| SONIA | 2022-03-10 | | SONIA |
| GURVINDER | 2022-07-18 | | SENTHIL |
+-----------+------------+ +---------+
Assertion and Reasoning Based Questions
The following questions are Assertion(A) and Reasoning(R) based questions. Mark the correct choice as
a. Both A and R are true and R is the correct explanation of A
b. Both A and R are true and R is not the correct explanation of A
c. A is true but R is false
d. A is false but R is true
1. Assertion(A): SELECT is a DML command.
Reasoning(R): A DML command is used to retrieve and modify data from a table in a database.
2. Assertion(A): A table will either have a primary key or a composite key.
Reasoning(R): If a table has more than one attribute as the primary key, it is collectively known as a composite key.
3. Assertion(A): UPDATE-SET is a DDL command.
Reasoning(R): A DDL command modifies the structure of a table in a database.
4. Assertion(A): COUNT() is an example of an aggregate function.
Reasoning(R): Aggregate functions apply to a single tuple in a relation.
Case-based Questions
1. Ganesh is a whole sale trader of stationeries. He has many dealers working under him. As his business is expanding, it is
becoming difficult for him to maintain the records of each dealer. Therefore, he requests you to create a table in MySQL
that stores the details of dealers. You have created the table as given below:
Table: Dealer
DealerCode DName City ContactNo TurnOver
D001 Verma Stationers Amritsar 9898989898 9834.80
D002 Sindhi Brothers Surat 1111199999 123.45
D003 Perfect Stationers Delhi 1234567890 4092.00
D004 Roy and Sons Kolkata 7164
D005 India Stationers Delhi 9876987600 567.81
Database Concepts and the Structured Query Language 275

