City Guilds Model Questions Vol1 2025 Information Technology Question 34

Practice objective / multiple choice question 34 from the 2025 City Guilds Model Questions Vol1 Information Technology examination.

City Guilds Model Questions Vol1 2025 Information Technology Objective / Multiple Choice Hard Difficulty
Question 34 CITY_GUILDS_MODEL_QUESTIONS_VOL1 • 2025 • INFORMATION_TECHNOLOGY • objective

In a relational database the following tables are defined:\n\n- **Employees**(\(EmpID\), \(DeptID\), \(Salary\)) - 10 000 rows.\n- **Departments**(\(DeptID\), \(ManagerID\), \(Budget\)) - 200 rows.\n- **Projects**(\(ProjID\), \(DeptID\), \(Cost\)) - 5 000 rows.\n\nEach department has on average 50 employees and 25 projects. The average project cost is \$200 000 and the average department budget is \$4 000 000.\n\nA query asks for the total salary of employees that belong to departments whose total project cost exceeds the department's budget.\n\nAssuming the database engine can hold at most 1 000 rows in main memory, compare the number of row‑level operations required by a naïve nested‑loop join versus a hash‑join implementation of this query, and state which join method is more efficient under the given memory constraint.

Answer Options

A. nested-loop join; ~2,000,000 operations vs ~10,200 for hash
Correct Answer B. hash join; ~10,200 operations vs ~2,000,000 for nested-loop
C. hash join; ~12,000 operations vs ~2,500,000 for nested-loop
D. hash join; ~5,000 operations vs ~1,500,000 for nested-loop
Correct Answer
B
Correct Option:
hash join; ~10,200 operations vs ~2,000,000 for nested-loop

About This Question

This is City Guilds Model Questions Vol1 2025 Information Technology Question 34. It is one of the objective questions from the 2025 City Guilds Model Questions Vol1 Information Technology examination.

Difficulty level: Hard .

Master the Exam!

You've seen a preview, but there are thousands more questions plus AI tutor to break down complex solutions.

Unlock Full Access Available for Android & Windows
Chat with Support