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) )
```

Computer Science & Information Technology

You might also like to view...

The advantages of using typedef do not include:

a. Making programs more portable by allowing data types to be easily changed to meet system specifications. b. Making type names shorter. c. Making programs more readable. d. Increasing the efficiency of accessing struct member variables.

Computer Science & Information Technology

In a database, the window used to create the object where data displays only the records that you want to see is called the ________ window

A) Table Data View B) Query Design C) Report Design D) Database Form

Computer Science & Information Technology

Google's free online storage is called OneDrive

Indicate whether the statement is true or false

Computer Science & Information Technology

A mesh is the underlying structure of a 3D model.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology