pdate you’re the database created in week5: lab5. Write some MYSQL code to select three different sets of data and display them on the screen. Also, delete two different records from any of the table in your the database and then print the remaining data on the screen. Finally, update one of your table with five more new rows of data and print the result of the table on the screen.   /*create database CSC306Class*/ create database CSC3067Class; /*use this database to create tables*/ use CSC3067Class; create table studentInf( studentID int primary key, FirstName varchar(50), LastName varchar(50), Roles varchar(50), DobY varchar(50) ); /*inserting data into studentInf table*/ insert into studentInf values (1,'Josiah','Bartlet','President','1942'); insert into studentInf values (2,'Leo','McGarry','Cheif Of Staff','1948'); insert into studentInf values (3,'Josh','Lyman','Deputy Chief of Staff','1961'); insert into studentInf values (4,'Sam','Seaborn','Deputy Communications Director','1954'); insert into studentInf values (5,'Toby','Ziegler','White House Communications Director','1959'); select * from studentInf; create table IntructorInf( InstID int primary key, InstName varchar(50), Roles varchar(50), DobY varchar(50), Charac varchar(50) ); /*inserting data into IntructorInf table*/ insert into IntructorInf values (101,'Mrs. Landingham','Executive Secretary','1935','n/a'); insert into IntructorInf values (102,'Admiral Percy Fitzwallace',' Chairman of the JSOC','1951','John Amos'); insert into IntructorInf values (103,'Donnatella Moss','Senior Assistance to DCS','1952','Jenna Meloney'); insert into IntructorInf values (104,'Andrea Wyatt','Rep. Maryland Dist','1954','Kathleen York'); insert into IntructorInf values (105,'C.J. Cregg ','White House Press Secretary','1959','Allison Janney'); /*selecting records*/ select * from IntructorInf; create table LikedAndDisliked( LikedAndDislikedID int primary key, studentID int, InstID int, likeorDislike boolean, feedbackDate date, foreign key(studentID) references studentInf(studentID), foreign key(InstID) references IntructorInf(InstID)); /*inserting data into LikedAndDisliked table*/ insert into LikedAndDisliked values (1,1,101,true,'2020/12/11'); insert into LikedAndDisliked values (2,2,102,false,'2020/12/12'); insert into LikedAndDisliked values (3,3,103,true,'2020/12/01'); insert into LikedAndDisliked values (4,4,104,false,'2020/12/25'); insert into LikedAndDisliked values (5,5,105,true,'2020/12/30'); /*selecting records*/ select * from LikedAndDisliked; SELECT * FROM StudentInf; SELECT * FROM IntructorInf; SELECT * FROM LikedAndDisliked; DELETE FROM StudentInf WHERE studentID IN (1,2); INSERT INTO StudentInf VALUES (106, 'Bob', 'Russel', '1948', 'Presidental Candidate'); INSERT INTO StudentInf VALUES (107, 'John', 'Hoynes', '1952', 'Vice President'); INSERT INTO StudentInf VALUES (108, 'Rob', 'Jr', '1969', 'US Reps'); INSERT INTO StudentInf VALUES (109, 'Eric', 'Baker', '1968', 'Governor'); INSERT INTO StudentInf VALUES (110, 'Eirc', 'Crowley', '1965', 'Lawyer'); SELECT * FROM StudentInf;

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

Please help as i am getting error after deleting student entrety for 2 entry 

 

Update you’re the database created in week5: lab5. Write some MYSQL code to select three different sets of data and display them on the screen. Also, delete two different records from any of the table in your the database and then print the remaining data on the screen. Finally, update one of your table with five more new rows of data and print the result of the table on the screen.

 

/*create database CSC306Class*/
create database CSC3067Class;

/*use this database to create tables*/
use CSC3067Class;
create table studentInf(
studentID int primary key,
FirstName varchar(50),
LastName varchar(50),
Roles varchar(50),
DobY varchar(50)
);
/*inserting data into studentInf table*/
insert into studentInf values (1,'Josiah','Bartlet','President','1942');
insert into studentInf values (2,'Leo','McGarry','Cheif Of Staff','1948');
insert into studentInf values (3,'Josh','Lyman','Deputy Chief of Staff','1961');
insert into studentInf values (4,'Sam','Seaborn','Deputy Communications Director','1954');
insert into studentInf values (5,'Toby','Ziegler','White House Communications Director','1959');
select * from studentInf;
create table IntructorInf(
InstID int primary key,
InstName varchar(50),
Roles varchar(50),
DobY varchar(50),
Charac varchar(50)
);
/*inserting data into IntructorInf table*/
insert into IntructorInf values (101,'Mrs. Landingham','Executive Secretary','1935','n/a');
insert into IntructorInf values (102,'Admiral Percy Fitzwallace',' Chairman of the JSOC','1951','John Amos');
insert into IntructorInf values (103,'Donnatella Moss','Senior Assistance to DCS','1952','Jenna Meloney');
insert into IntructorInf values (104,'Andrea Wyatt','Rep. Maryland Dist','1954','Kathleen York');
insert into IntructorInf values (105,'C.J. Cregg ','White House Press Secretary','1959','Allison Janney');
/*selecting records*/
select * from IntructorInf;
create table LikedAndDisliked(
LikedAndDislikedID int primary key,
studentID int,
InstID int,
likeorDislike boolean,
feedbackDate date,
foreign key(studentID) references studentInf(studentID),
foreign key(InstID) references IntructorInf(InstID));
/*inserting data into LikedAndDisliked table*/
insert into LikedAndDisliked values (1,1,101,true,'2020/12/11');
insert into LikedAndDisliked values (2,2,102,false,'2020/12/12');
insert into LikedAndDisliked values (3,3,103,true,'2020/12/01');
insert into LikedAndDisliked values (4,4,104,false,'2020/12/25');
insert into LikedAndDisliked values (5,5,105,true,'2020/12/30');
/*selecting records*/
select * from LikedAndDisliked;
SELECT * FROM StudentInf;
SELECT * FROM IntructorInf;
SELECT * FROM LikedAndDisliked;
DELETE FROM StudentInf WHERE studentID IN (1,2);
INSERT INTO StudentInf VALUES (106, 'Bob', 'Russel', '1948', 'Presidental Candidate');
INSERT INTO StudentInf VALUES (107, 'John', 'Hoynes', '1952', 'Vice President');
INSERT INTO StudentInf VALUES (108, 'Rob', 'Jr', '1969', 'US Reps');
INSERT INTO StudentInf VALUES (109, 'Eric', 'Baker', '1968', 'Governor');
INSERT INTO StudentInf VALUES (110, 'Eirc', 'Crowley', '1965', 'Lawyer');
SELECT * FROM StudentInf;

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 5 images

Blurred answer
Knowledge Booster
Table
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
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