Example 5.2.4 To express that the primary key of the table GRADES consists of the attributes stno cno sem year we can say that this table satisfies the primary key constraint:
constraint pkg primary key (stno, cno, sem, year)
Example 5.2.5 For the table EMPHIST, introduced in Example 3.3.5 we could introduce the tuple conditions:
constraint pos_sal check(salary > 0)
and
constraint suf_sal check(position != ’Programmer’ or salary > 65000),
respectively. They express that the salary must be a positive number and that somebody who is a programmer must be paid more than 65000 dollars, respectively. Thus, the creation of the table EMPHIST can be achieved by: