Neco 2018 Data Processing Question 5

Practice essay / theory question 5 from the 2018 Neco Data Processing examination. This question covers Relational Algebra, SQL, Database Triggers, Normalization .

Neco 2018 Data Processing Essay / Theory
Topics: Relational Algebra SQL Database Triggers Normalization
Question 5 NECO • 2018 • DATA_PROCESSING • essay

A company maintains a relational database to store information about its employees and the projects they work on. The relevant schema is as follows: Employees(EmpID, Name, Dept, Salary) Projects(ProjID, ProjName, Budget) Assignments(EmpID, ProjID, Hours) where Budget is expressed in Nigerian Naira (₦) and each ₦1,000 of budget corresponds to one working hour for the project. Using this schema, answer the following:

Question Parts

( a )
Write a relational algebra expression that retrieves the names of all employees who are assigned to more than one distinct project.
( b )
Write an SQL query that lists each department together with the total salary expense for that department, but only for departments where the total salary exceeds ₦5,000,000.
( c )
The company wants to prevent an employee from being assigned to a project if the insertion would cause the total hours recorded for that project to exceed the project's budget (recall 1 hour = ₦1,000). Write a trigger (in pseudo‑SQL) that checks this condition before an INSERT into the Assignments table and aborts the operation with an appropriate error message if the condition would be violated. Briefly explain how the trigger works.

Detailed Solution & Marking Scheme

Get the step-by-step solution, key points required by examiners and detailed marking guidance through the Edcrib AI Tutor.

Reveal Answer

About This Question

This is Neco 2018 Data Processing Question 5. It is one of the essay questions from the 2018 Neco Data Processing examination.

The question covers Relational Algebra, SQL, Database Triggers, Normalization .

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