Mailings Review View Help Tell me what you want to do ?????15-5-E- LNormal 1No S
ID: 3738213 • Letter: M
Question
Mailings Review View Help Tell me what you want to do ?????15-5-E- LNormal 1No Spec Heading 2 Heading 1 Title Subtitle Subtle En. Paragraph Create in SQL statement COLLEGE DEGREE PK college id school name INT INT major id DEPARTMENT PK departmen id college,ic FK major id INT major id major, prefo major, desciption VARCHAR(20) FK department id INT FK CHAR(B) ourse d requirement type id FK INT credt hour INT CHAR(8) VARCHAR(45) INT VARCHAR(45) INT course_id credit hours FK major id requirement type VARCHAR(20) INT INT INT PK.FK course id credit hours selectedExplanation / Answer
Solution:
The tables are given below:
COLLEGE:
CREATE TABLE COLLEGE(
college_id int,
school_name varchar(100);
PRIMARY KEY (college_id )
);
DEPARTMENT:
CREATE TABLE DEPARTMENT(
department_id int,
department_name varchar(45),
PRIMARY KEY (department_id ),
CONSTRAINT FK_college_id FOREIGN KEY (college_id )
REFERENCES COLLEGE(college_id )
);
DEGREE:
CREATE TABLE DEPARTMENT(
degree_id int,
degree_name varchar(70),
PRIMARY KEY (degree_id),
CONSTRAINT FK_college_id FOREIGN KEY (college_id )
REFERENCES COLLEGE(college_id )
CONSTRAINT FK_department_id FOREIGN KEY (department_id )
REFERENCES DEPARTMENT(department_id )
);
CONCENTRATION:
CREATE TABLE CONCENTRATION(
concentration_id int,
concentration_description varchar(70),
PRIMARY KEY (concentration_id ),
CONSTRAINT FK_degree_id FOREIGN KEY (degree_id)
REFERENCES DEGREE(degree_id )
CONSTRAINT FK_major_id FOREIGN KEY (major_id)
REFERENCES DEPARTMENT(major_id)
);
I have added enough tables to give you an idea if still, you can't do it, please let me know in the comments, I 'll add them all.
I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.