Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a database description for each of the relations shown, using SQL DDL. Ass

ID: 3822134 • Letter: W

Question

Write a database description for each of the relations shown, using SQL DDL. Assume the following attribute types: Problem 1 (20 points). DDL commands. Write a database for each of the relations shown, using sQL description Assume the following attribute data types: Student ID linteger, primary key) Read (double) Tutor ID finteger, primary key CertDate Date Time) Status (20 characters) MatchID integer, primary key) StartDate (Date Time) EndDate (Date Time) STUDENT (studento, Readi S222000 MATCH HSTORY Macho. Tudorio, studento, 3000 Mar2008 Copyright C2013 Pearson Education, publishing as Prentice Hall

Explanation / Answer

Solution:-

CREAT TABLE INSTRUCTOR

(InstructorID INTEGER,

CertDate DATETIME,

Status VARCHAR(20));

CREAT TABLE STUDENT

(StudentID INTEGER,

Read DOUBLE);

CREAT TABLE MATCH_HISTORY

(MatchID INTEGER,

InstructorID INTEGER,

StudentID INTEGER,

StartDate DATETIME,

EndDate DATETIME);

The above given Table description stated by CREATE command which is a DDL command. By DDL commands we can only create and manage database. If we need to populate a table then we need to use INSERT command which is a DML command. As per the question asked the tables description is given in DDL command using CREATE command.

Note -

For you reference only I am inserting the values in the tables using INSERT command.

INSERT INTO INSTRUCTOR VALUES

(100,1/5/2008,'Active')

(101,1/5/2008,'Temp Stop')

(102,1/5/2008,'Dropped')

(103,5/22/2008,'Active')

(104,5/22/2008,'Active')

(105,5/22/2008,'Temp Stop')

(106,5/22/2008,'Active');

INSERT INTO STUDENT VALUES

(3000,23)

(3001,56)

(3002,13)

(3003,33)

(3004,27)

(3005,48)

(3006,28)

(3007,15);

INSERT INTO MATCH_HISTORY VALUES

(1,100,3000,1/10/2008,NULL)

(2,101,3001,1/15/2008,5/15/2008)

(3,102,3002,2/10/2008,3/1/2008)

(4,106,3003,5/28/2008,NULL)

(5,103,3004,6/01/2008,6/15/2008)

(6,104,3005,6/01/2008,6/28/2008)

(7,104,3006,6/01/2008,NULL);

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote