var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Assertion query
hey, I'm studying for an exam and I'm not too sure if the assertion
i've written is valid, could someone please let me know if this is correct.
STAFF(Name, Dname, Salary);
The primary kyes are underlined. The foreign key is
STAFF.Dname -> DEPT.Name. Use SQL to enforce the constraint that the sum of salaries in any department cannot exceed the budget of the department.
CREATE ASSERTION salCheck
CHECK (NOT EXISTS (
FROM STAFF s, DEPT d
GROUP BY Dname
HAVING d.Name = s.Dname
AND sum(s.salaray) > d.Budget));