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

1. Using the same tables you made last week 2. Add to each, a new column (field)

ID: 3751895 • Letter: 1

Question

1. Using the same tables you made last week

2. Add to each, a new column (field). Not new data, and additional field

3. Make sure you fun this create5.sql program

4. Submit the program.

5. Submit a program called list5.sql also

Program Below:

    DROP TABLE student;
   DROP TABLE teacher;
   DROP TABLE school;
   DROP TABLE course;
   DROP TABLE guardian;

   CREATE TABLE student (student_id text, first_name text, last_name text, age int);
   CREATE TABLE teacher (first_name text, last_name text, subjects text);
   CREATE TABLE school (name text, students_count int, state text);
   CREATE TABLE course (course_id text, name text, credits int);
   CREATE TABLE guardian (first_name text, last_name text, student_id text, FOREIGN KEY(student_id) REFERENCES student(student_id));

INSERT INTO student (student_id, first_name, last_name, age) VALUES ('2018CS100', 'John', 'McEnroe', 24);

INSERT INTO teacher (first_name, last_name, subjects) VALUES ('Mary', 'Gold Smith', 'Mathematics');
INSERT INTO teacher (first_name, last_name, subjects) VALUES ('James', 'Gibberson', 'English, French, Politics');

INSERT INTO school (name, students_count, state) VALUES ('NewWorld Academy', 1255, 'Texas');

INSERT INTO course (course_id, name, credits) VALUES ('CS101', 'Computer Science', 120);

INSERT INTO guardian (first_name, last_name, student_id) VALUES ('James', 'Patterson', '2018CS100');



SELECT * FROM student;

SELECT * FROM teacher;


SELECT * FROM school;

SELECT * FROM course;

SELECT * FROM guardian;

Explanation / Answer

Ans:

CREATE TABLE student (student_id text, first_name text, last_name text, age int, gender text,phone_number int);
   CREATE TABLE teacher (first_name text, last_name text, subjects text, department text);
   CREATE TABLE school (name text, students_count int, state text,staff_count int,city text);
   CREATE TABLE course (course_id text, name text, credits int, description text);
   CREATE TABLE guardian (first_name text, last_name text, student_id text, phone_number int, FOREIGN KEY(student_id) REFERENCES student(student_id));