Propose a new way to implement these tables, list and explain the changes you ma
ID: 3868219 • Letter: P
Question
Propose a new way to implement these tables, list and explain the changes you made including why the old way was bad and your new changes are better. (there are more than 5 things wrong) provide new CREATE statements and a written description of the original problems and how you fixed them. You are free to add additional tables, rename, remove or add columns. Create TABLE classes (Class name CHAR(10) PRIMARY KEY, Enrollment int -- number of students currently enrolled in the class }engine=innodb: CREATE TABLE student(, Full name CHAR(C10) PRIMARY KEY, Age INT, Birthday VARCHAR(10) Class1 CHAR(10), Class2 CHAR(10), Class3 CHAR(10), Class4 CHAR(10), FOREIGN KEY (class1) REFERENCES classes(class name) ON DELETE CASCADE, FOREIGN KEY (class2) REFERENCES classes(class name) ON DELETE CASCADE, FOREIGN KEY (class3) REFERENCES classes(class name) ON DELETE CASCADE)engine = innodb;Explanation / Answer
1. full name in general is not unique and hence should not be used as a primary key
2. Comma after birthday is missinf
3. Age and Birthdate are related fields. They should be seperated/removed
4. class4 should also be foreign key (intusion)
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.