Consider the E-R diagram depicted in Figure 4.38. Write down the corresponding relational schema using SQL. Include all keys and other applicable constraints.
What will be an ideal response?
```
CREATE TABLE Student (
Id INTEGER,
Name CHAR(20),
Major CHAR(3),
PRIMARY KEY (Id, Major) )
```
```
CREATE TABLE Class (
Semester CHAR(5),
CrsCode CHAR(6),
Room CHAR(15),
PRIMARY KEY (Semester, CrsCode) )
```
```
CREATE TABLE Takes (
StudId INTEGER NOT NULL,
Semester CHAR(5) NOT NULL,
CrsCode CHAR(6) NOT NULL,
FOREIGN KEY (Semester,CrsCode) REFERENCES Class,
FOREIGN KEY (StudId) REFERENCES Student (Id) )
```
You might also like to view...
In the Rotate dialog box, you type a value in the ____ text box.
A. Angle B. Rotate C. Degree D. Radius
Which of the following is a wireless Internet connectivity method that utilizes cellular technology?
A. 802.11ac B. WiMAX C. 3G D. Satellite
The cipher command works on _______________.
A. attributes B. directories C. disk drives D. tables
The defining query for a view can be any valid SQL query.
Answer the following statement true (T) or false (F)