Stuck on this question in a revision paper. I've left the other relations out as they're not relevant to the question.
Consider the following relation: Article(arID, title, journal, issue, year, startpage, endpage)
How would I go about making a constraint that makes sure no more than 5 articles may be published in one particular issue?
Would I do something like:
CREATE ASSERTION ArticlesInIssue
CHECK(
(SELECT COUNT(Issue) FROM Article) <= 5);
I think this wouldn't work fully as it wouldn't be counting for the specific issue, right? So would I need a where clause, or am I going in the totally wrong direction here? Thanks, Mo.