Quiz Space

Database Management Systems · End Term · 13 Apr 2025 · January 2025 term · Set QDD1

Question 6: Consider the following relational schema:\ Employee(<u>em…

Question 6

+3 marksOne correct option

Consider the following relational schema:
Employee(emp_id, first_name, last_name, dept_id)
Department(dept_id, dept_name, mngr_id)
Manager(mngr_id, mngr_name)

Questions:

  1. Find the first names of employees whose names start with 'J' and contain at least 6 characters.
  2. Find the total number of employees in each department.
  3. List the department names managed by a manager named 'Brown'.

SQL queries:

sql
a. SELECT first_name FROM Employee WHERE first_name LIKE 'J_____';
b. SELECT first_name FROM Employee WHERE first_name LIKE 'J_____%';
c. SELECT dept_id, COUNT(emp_id) FROM Employee GROUP BY emp_id;
d. SELECT dept_id, COUNT(emp_id) FROM Employee GROUP BY dept_id;
e. SELECT DISTINCT d.dept_name FROM Department d INNER JOIN Manager m
ON d.mngr_id = m.mngr_id WHERE m.mngr_name = 'Brown';
f. SELECT DISTINCT d.dept_name FROM Department d, Manager m WHERE
d.mngr_id = m.mngr_id AND m.mngr_name = 'Brown';

Match the correct SQL queries with the corresponding Questions.

  1. A

    1-a, 2-c, 3-f

  2. B

    1-b, 2-c, 3-e

  3. C

    1-a, 2-d, 3-e

  4. D

    1-b, 2-d, 3-f

Show answer

Correct answer

  • D

    1-b, 2-d, 3-f

Question 6 of 20 in the IIT Madras BS Database Management Systems (DBMS) End Term paper sat on 13 Apr 2025, in the January 2025 term (IIT M DIPLOMA AN EXAM QDD3 13 Apr 2025). It carries 3 marks.

More questions from this paper

  1. Q1Consider a B+-tree index to be built on the attribute StudentID of a table Students, with the following properties: The…
  2. Q2Consider a log of a transaction as shown below, where the immediate database modification scheme is used. | step | log …
  3. Q3Consider the following monthly backup schedule used by a company: | Monday | Tuesday | Wednesday | Thursday | Friday | …
  4. Q4Figure question
  5. Q5Figure question
  6. Q7Choose the correct statement(s).
  7. Q8Consider the instance of a relation R. Which among the following functional dependencies set(s) can be inferred from th…
  8. Q9Consider the Employee table given below: | EmpID | Name | Dept | Salary | |---|---|---|---| | 001 | Harry | IT | 80000 …
  9. Q10Figure question
  10. Q11Consider the following Entity Relationship Diagram: Choose the correct statements.
  11. Q12Figure question
  12. Q13Consider you have a file in your hard disk of size 1000 KB. Seek time of your hard disk read head is 3ms and rotational…
  13. Q14Consider a system using the Least Recently Used (LRU) page replacement policy. The system has a main memory buffer with…
  14. Q15Consider the given log records at an instance of time: Table 5: Log records | < T_0 \text{ start} > | |---| | < T_0, A,…
  15. Q16Figure question
  16. Q17Figure question
  17. Q18Consider a Block nested loop join for the two relations, instructor and department. Assuming the worst-case memory avai…
  18. Q19The instance of the table insurance and nominee is as shown below: | ins_id | policyHolderName | age | premium | |---|-…
  19. Q20The instance of the table insurance and nominee is as shown below: | ins_id | policyHolderName | age | premium | |---|-…