Diese Präsentation wurde erfolgreich gemeldet.
Die SlideShare-Präsentation wird heruntergeladen. ×

Please provide screen shots of the MYSQL console! Thanks! Create the t.docx

Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Anzeige
Wird geladen in …3
×

Hier ansehen

1 von 1 Anzeige

Please provide screen shots of the MYSQL console! Thanks! Create the t.docx

Herunterladen, um offline zu lesen

Please provide screen shots of the MYSQL console! Thanks!
Create the tables course, class, and instructor. Based on the ERD shown below. Be sure to use the appropriate MySQL data types as well as designate primary and foreign key fields. Submit a copy of SQL used to create the tables and screenshots of the MySQL console in Microsoft Word.
Solution
create database devasish;
use devasish;
create table course(courseID int primary key, couserDescribe varchar(50), coursePrerequisite varchar(50));
create table class(classID int primary key, courseID int, StartDate varchar(50), EndDate varchar(50), Location varchar(50), InstructorId int);
create table Instructor (instructorID int primary key, LName varchar(50),FName varchar(50),Office varchar(50),Phone int, Email varchar(30));
ALTER TABLE class
ADD FOREIGN KEY (courseID)
REFERENCES course(courseID)
ALTER TABLE class
ADD FOREIGN KEY (InstructorId)
REFERENCES Instructor(instructorID)
.

Please provide screen shots of the MYSQL console! Thanks!
Create the tables course, class, and instructor. Based on the ERD shown below. Be sure to use the appropriate MySQL data types as well as designate primary and foreign key fields. Submit a copy of SQL used to create the tables and screenshots of the MySQL console in Microsoft Word.
Solution
create database devasish;
use devasish;
create table course(courseID int primary key, couserDescribe varchar(50), coursePrerequisite varchar(50));
create table class(classID int primary key, courseID int, StartDate varchar(50), EndDate varchar(50), Location varchar(50), InstructorId int);
create table Instructor (instructorID int primary key, LName varchar(50),FName varchar(50),Office varchar(50),Phone int, Email varchar(30));
ALTER TABLE class
ADD FOREIGN KEY (courseID)
REFERENCES course(courseID)
ALTER TABLE class
ADD FOREIGN KEY (InstructorId)
REFERENCES Instructor(instructorID)
.

Anzeige
Anzeige

Weitere Verwandte Inhalte

Ähnlich wie Please provide screen shots of the MYSQL console! Thanks! Create the t.docx (20)

Weitere von kdavid658 (20)

Anzeige

Aktuellste (20)

Please provide screen shots of the MYSQL console! Thanks! Create the t.docx

  1. 1. Please provide screen shots of the MYSQL console! Thanks! Create the tables course, class, and instructor. Based on the ERD shown below. Be sure to use the appropriate MySQL data types as well as designate primary and foreign key fields. Submit a copy of SQL used to create the tables and screenshots of the MySQL console in Microsoft Word. Solution create database devasish; use devasish; create table course(courseID int primary key, couserDescribe varchar(50), coursePrerequisite varchar(50)); create table class(classID int primary key, courseID int, StartDate varchar(50), EndDate varchar(50), Location varchar(50), InstructorId int); create table Instructor (instructorID int primary key, LName varchar(50),FName varchar(50),Office varchar(50),Phone int, Email varchar(30)); ALTER TABLE class ADD FOREIGN KEY (courseID) REFERENCES course(courseID) ALTER TABLE class ADD FOREIGN KEY (InstructorId) REFERENCES Instructor(instructorID)

×