Page 298 - Information_Practice_Fliipbook_Class11
P. 298
b. SELECT TNO, TName FROM TRAINS
WHERE Journey_Time
ORDER BY TNO;
c. SELECT Start, End FROM TRAINS
WHERE Journey_Time AND COUNT(*)=2;
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): Each attribute in a database must have at least one constraint specified with it.
Reasoning (R): A constraint specifies the restrictions imposed on the stored data.
2. Assertion (A): If any row or column is added to a relation, its relational schema changes.
Reasoning (R): A relational schema describes the structure of a relation.
3. Assertion (A): The set of tuples in a relation is known as the entity set.
Reasoning (R): Deleting a record modifies the entity set of a relation.
4. Assertion (A): The value of spouse name for an unmarried candidate will be NULL in a database.
Reasoning (R): If a value for an attribute is not known for a tuple, the DBMS uses a NULL value.
5. Assertion(A): DDL commands are used to describe the structure of a database.
Reasoning(R): The attributes of tables that are already existing can be added, deleted, or modified in a database.
Case-based Questions
Consider a Food and Beverage department having Dept_No 6 located in Pune. Also, consider the following tuple for an
employee with id E0011 who is the manager of this department:
+-------+---------+-----------+----+---------------------------------------------+------+--------+------------+-------+-------+
| E0011 | Rashmi | Singhania | F | 7, First Floor, MSFC Building, Shivajinagar | Pune | 411016 | 1990-10-08 | 90000 | 1 |
+-------+---------+-----------+----+---------------------------------------------+------+--------+------------+-------+-------+
You need to insert a tuple both for a new employee and a new manager. Now if you attempt to insert a tuple for a new department
first, it will be rejected by DBMS since it violates referential integrity constraint as there is no employee with id E0011. Similarly,
adding employee entry working in department 6 will also be rejected since there is no department with this number. Propose a
solution for this problem that does not violate referential integrity constraints.
1. Lakshmi studies in class 10. Her teacher has just introduced her to databases. She has asked them to create a table,
myClass to store details of their classmates such as name, father’s name, contact number, birth date, hobbies, etc. Design
a relational schema for the table. Also, specify the primary key.
2. Joseph has just come to know about database applications that help to organize data for efficient storage and retrieval of
data. His school is organizing an Annual Athletics Meet. He wants to design a database for maintaining records of players
participating in various events. His database will have two tables:
Table1: to store details of various events such as Event Id, Event Name, and Event Date.
Table 2: To store the details of players such as Player Id, Player Name, Age, Event in which he is participating, and result.
Design a relational schema for both tables, giving appropriate names ot tables and attributes. Also, specify the primary key
and foreign key in each table.
284 Touchpad Informatics Practices-XI

