Part 2: Insert records into the database go to next step A. In MySQL Workbench, open a new Query tab by clicking on at the top left of the window. You can also select File > New Query Tab from the menu. Note: All SQL statements you write in MySQL Workbench should be collected in one script file, with each statement ending with semi-colons (;). Later, you will submit this script file as a deliverable for the final project. B. Write SQL to insert two more classes into the class table. Note: You can do this using one INSERT INTO statement, or multiple INSERT INTO statements. Either way works. Just make sure to add a semi-colon (;) on the end of each statement. Remember, the class primary keys are automatically generated for you via the auto-increment column attribute. C. Write a SELECT statement that returns all columns and rows in the class table. otherwise you'll enter more classes into the class table. Be sure to make note of the Note: You'll want to be sure to highlight only this SELECT statement and click on returned class_id values for the classes in the table. You will need them when you write SQL to insert assignments. D. Write SQL to insert at least eight assignments into the assignment table. Note: You'll want to be sure to highlight only your assignment INSERT INTO statement(s) and click on otherwise you'll insert more classes into the class table. You only need a minimum of eight assignments in total in the assignments table, but there should be at least two assignments for each class in the class table. Remember, the assignment primary keys are automatically generated for you via the auto-increment column attribute. E. Write a SELECT statement that returns all columns and rows in the assignments table. Note: You'll want to be sure to highlight only this SELECT statement and click on otherwise you'll enter more classes and assignments into the tables. F. Save your SQL Script by selecting File > Save Script As... from the menu. Name your script myInsertScript. -- #1 Add a statement below to DROP the database if it exists -- #2 Add a statement below to CREATE the database -- # 3 Add a statement to USE the database -- class table statement CREATE TABLE IF NOT EXISTS grades.class ( ); class_id INT NOT NULL AUTO_INCREMENT, department code CHAR(4) NULL, course number INT NULL, course section CHAR(4) NULL, course_name VARCHAR (100) NULL, academic quarter CHAR (2) NULL, academic year INT NULL, PRIMARY KEY (class_id) insert INFO 1335 class INSERT INTO grades.class (department_code, course_number, course_section, course_name, academic_quarter, academic year) VALUES ('INFO', '1335', 'WW', 'Full Stack App Development', 'FA', '2023'); - assignment table statement CREATE TABLE IF NOT EXISTS grades.assignment ( ); grade_id INT NOT NULL AUTO_INCREMENT, task_name VARCHAR (100) NULL, points earned INT NOT NULL, points possible INT NOT NULL, class_id INT NOT NULL, PRIMARY KEY (grade_id), CONSTRAINT fk_assignment_class FOREIGN KEY (class_id) REFERENCES class (class_id) insert INFO 1335 assignment INSERT INTO grades. assignment (task_name, points_earned, points_possible, class_id) VALUES ('Introduction Discussion', '10', '10', '1'); -- grant priviledges for mgs_user GRANT DELETE, INSERT, SELECT, UPDATE ON grades. * TO mgs_user@localhost;

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Solve all parts with explanation and Don't use ai to answer
Part 2: Insert records into the database go to next step
A. In MySQL Workbench, open a new Query tab by clicking on at the top left of the window. You can also select File > New Query Tab from the menu.
Note: All SQL statements you write in MySQL Workbench should be collected in one script file, with each statement ending with semi-colons (;). Later, you will submit this
script file as a deliverable for the final project.
B. Write SQL to insert two more classes into the class table.
Note: You can do this using one INSERT INTO statement, or multiple INSERT INTO statements. Either way works. Just make sure to add a semi-colon (;) on the end of each
statement. Remember, the class primary keys are automatically generated for you via the auto-increment column attribute.
C. Write a SELECT statement that returns all columns and rows in the class table.
otherwise you'll enter more classes into the class table. Be sure to make note of the
Note: You'll want to be sure to highlight only this SELECT statement and click on
returned class_id values for the classes in the table. You will need them when you write SQL to insert assignments.
D. Write SQL to insert at least eight assignments into the assignment table.
Note: You'll want to be sure to highlight only your assignment INSERT INTO statement(s) and click on otherwise you'll insert more classes into the class table. You only need
a minimum of eight assignments in total in the assignments table, but there should be at least two assignments for each class in the class table. Remember, the assignment
primary keys are automatically generated for you via the auto-increment column attribute.
E. Write a SELECT statement that returns all columns and rows in the assignments table.
Note: You'll want to be sure to highlight only this SELECT statement and click on
otherwise you'll enter more classes and assignments into the tables.
F. Save your SQL Script by selecting File > Save Script As... from the menu. Name your script myInsertScript.
Transcribed Image Text:Part 2: Insert records into the database go to next step A. In MySQL Workbench, open a new Query tab by clicking on at the top left of the window. You can also select File > New Query Tab from the menu. Note: All SQL statements you write in MySQL Workbench should be collected in one script file, with each statement ending with semi-colons (;). Later, you will submit this script file as a deliverable for the final project. B. Write SQL to insert two more classes into the class table. Note: You can do this using one INSERT INTO statement, or multiple INSERT INTO statements. Either way works. Just make sure to add a semi-colon (;) on the end of each statement. Remember, the class primary keys are automatically generated for you via the auto-increment column attribute. C. Write a SELECT statement that returns all columns and rows in the class table. otherwise you'll enter more classes into the class table. Be sure to make note of the Note: You'll want to be sure to highlight only this SELECT statement and click on returned class_id values for the classes in the table. You will need them when you write SQL to insert assignments. D. Write SQL to insert at least eight assignments into the assignment table. Note: You'll want to be sure to highlight only your assignment INSERT INTO statement(s) and click on otherwise you'll insert more classes into the class table. You only need a minimum of eight assignments in total in the assignments table, but there should be at least two assignments for each class in the class table. Remember, the assignment primary keys are automatically generated for you via the auto-increment column attribute. E. Write a SELECT statement that returns all columns and rows in the assignments table. Note: You'll want to be sure to highlight only this SELECT statement and click on otherwise you'll enter more classes and assignments into the tables. F. Save your SQL Script by selecting File > Save Script As... from the menu. Name your script myInsertScript.
--
#1 Add a statement below to DROP the database if it exists
--
#2 Add a statement below to CREATE the database
--
# 3 Add a statement to USE the database
--
class table statement
CREATE TABLE IF NOT EXISTS grades.class (
);
class_id INT NOT NULL AUTO_INCREMENT,
department code CHAR(4) NULL,
course number INT NULL,
course section CHAR(4) NULL,
course_name VARCHAR (100) NULL,
academic quarter CHAR (2) NULL,
academic year INT NULL,
PRIMARY KEY (class_id)
insert INFO 1335 class
INSERT INTO grades.class (department_code, course_number, course_section,
course_name, academic_quarter, academic year)
VALUES ('INFO', '1335', 'WW', 'Full Stack App Development', 'FA', '2023');
-
assignment table statement
CREATE TABLE IF NOT EXISTS grades.assignment (
);
grade_id INT NOT NULL AUTO_INCREMENT,
task_name VARCHAR (100) NULL,
points earned INT NOT NULL,
points possible INT NOT NULL,
class_id INT NOT NULL,
PRIMARY KEY (grade_id),
CONSTRAINT fk_assignment_class
FOREIGN KEY (class_id) REFERENCES class (class_id)
insert INFO 1335 assignment
INSERT INTO grades. assignment (task_name, points_earned, points_possible,
class_id)
VALUES ('Introduction Discussion', '10', '10', '1');
--
grant priviledges for mgs_user
GRANT DELETE, INSERT, SELECT, UPDATE ON grades. * TO mgs_user@localhost;
Transcribed Image Text:-- #1 Add a statement below to DROP the database if it exists -- #2 Add a statement below to CREATE the database -- # 3 Add a statement to USE the database -- class table statement CREATE TABLE IF NOT EXISTS grades.class ( ); class_id INT NOT NULL AUTO_INCREMENT, department code CHAR(4) NULL, course number INT NULL, course section CHAR(4) NULL, course_name VARCHAR (100) NULL, academic quarter CHAR (2) NULL, academic year INT NULL, PRIMARY KEY (class_id) insert INFO 1335 class INSERT INTO grades.class (department_code, course_number, course_section, course_name, academic_quarter, academic year) VALUES ('INFO', '1335', 'WW', 'Full Stack App Development', 'FA', '2023'); - assignment table statement CREATE TABLE IF NOT EXISTS grades.assignment ( ); grade_id INT NOT NULL AUTO_INCREMENT, task_name VARCHAR (100) NULL, points earned INT NOT NULL, points possible INT NOT NULL, class_id INT NOT NULL, PRIMARY KEY (grade_id), CONSTRAINT fk_assignment_class FOREIGN KEY (class_id) REFERENCES class (class_id) insert INFO 1335 assignment INSERT INTO grades. assignment (task_name, points_earned, points_possible, class_id) VALUES ('Introduction Discussion', '10', '10', '1'); -- grant priviledges for mgs_user GRANT DELETE, INSERT, SELECT, UPDATE ON grades. * TO mgs_user@localhost;
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education