Contents
Chapter 4 · DatabasePractice
← Return to textbook

CONCEPT PRACTICE

Original relational-operation definitions

2 related verified questions. Take them one at a time.

Filter questions
Question sources

2 of 2 questions match.

ITPEC Practice
0/1 answered
Textbook Exercises
0/1 answered

Question 1 of 2

0/2 answered

2024 Autumn · Subject A · Q20

Original exam question · Select the image to enlarge
Read the question as text

Determine the intended result of the printed SQL. EMP rows (EID, Ename, DNO, Salary): (11, John Bate, 1, 20000); (12, Mohammed Karim, 2, 40000); (13, Sadat Hossain, 1, 50000); (14, Katherine Li, 3, 20000); (15, Shuvashish Bose, 3, 40000). DEPT rows (DNO, Dname, Manager ID): (1, Admin, 11); (2, Accounts, 13); (3, Research, 15). DEPT_LOCS rows (DNO, Region): (1, L1); (1, L3); (2, L2); (3, L3); (3, L2). Literal printed SQL: SELECT EName, Salary FROM EMP WHERE DNO IN (( SELECT DNO FROM DEPT) MINUS (SELECT DNO FROM DEPT_LOCS WHERE Region=’L2’) )). Editorial clarification: the source has an extra closing parenthesis; the explanation distinguishes intended set-difference semantics from literal executable syntax.

The original image above preserves the complete exam wording and layout.

Choose your answer
Choose an option to check your answer.
1 / 2

Source: 2024A_FE-A_Questions.pdf, PDF page 13. ID: 2024A-A-Q020. Explanation written for this textbook.

Original question · Q20
Determine the intended result of the printed SQL. EMP rows (EID, Ename, DNO, Salary): (11, John Bate, 1, 20000); (12, Mohammed Karim, 2, 40000); (13, Sadat Hossain, 1, 50000); (14, Katherine Li, 3, 20000); (15, Shuvashish Bose, 3, 40000). DEPT rows (DNO, Dname, Manager ID): (1, Admin, 11); (2, Accounts, 13); (3, Research, 15). DEPT_LOCS rows (DNO, Region): (1, L1); (1, L3); (2, L2); (3, L3); (3, L2). Literal printed SQL: SELECT EName, Salary FROM EMP WHERE DNO IN (( SELECT DNO FROM DEPT) MINUS (SELECT DNO FROM DEPT_LOCS WHERE Region=’L2’) )). Editorial clarification: the source has an extra closing parenthesis; the explanation distinguishes intended set-difference semantics from literal executable syntax.

Scroll horizontally to read the image at full size.