In: Computer Science
The RegisteredClasses table should have a foreign key relationship to StudentInfo and ClassInfo tables for the respective IDs. Also the IDs in StudentInfo and ClassInfo need to be primary keys.
When you submit the file your email should also contain the following SQL Queries:
Create table StudentInfo(
StudentID varchar(10) NOT NULL,
FirstName varchar(20),
LastName varchar(20),
SSN int,
DateofBirth DATE,
PRIMARY KEY (StudentID)
);
Create table
ClassInfo(
ClassID varchar(10) NOT NULL,
ClassName varchar(4),
ClassDescription varchar(20),
PRIMARY KEY ( ClassID)
);
Create table RegisteredClasses(
FOREIGN KEY (StudentID) REFERENCES Persons(StudentID),
FOREIGN KEY (ClassID) REFERENCES Persons(ClassID)
);
Select * from StudentInfo
where FirstName="John"
Select * from StudentInfo
where FirstName="Doe"
Delete from ClassInfo
WHERE (ClassName REGEXP '^ISAM')