Make the necessary modi?cations to the schema of the Student Registration System to re?ect the design that uses the SQL domain Semesters, as discussed at the end of Section 4.8. Express the constraint that a class can be taught only during the semesters in which the corresponding course is o?ered. For instance, if the value of the attribute SemestersOffered for the course CS305 is Both, then the corresponding classes can be taught in the spring and the fall semesters. However, if the value of that attribute is Spring then these classes can be taught only in the spring.
What will be an ideal response?
The change to the schema was described at the end of Section 4.8: We no longer need the relation WhenOffered.Instead,Course gets the following attribute:
```
SemestersOffered Semesters
```
The aforesaid integrity constraint can then be expressed as a CHECK constraint on Class as follows:
```
CHECK (Semester = (SELECT C.SemestersOffered
FROM Course C
WHERE C.CrsCode = CrsCode)
OR
Both = (SELECT C.SemestersOffered
FROM Course C
WHERE C.CrsCode = CrsCode) )
```
You might also like to view...
Match the technology with the description
PATA SATA SAS Virtual memory NTFS FAT16 A) One device per motherboard connection B. Supports disk quotas C. 40-pin connector D. Large cluster sizes E. Hard drive space used as RAM F. Used mainly in servers
Experienced trainers do not rely on the evaluation feedback from trainees because trainees are rarely qualified to provide feedback to experienced trainers.
Answer the following statement true (T) or false (F)