Question: MYSQL ONLY (ASSIGNMENT) Need help with answering the following four questions for my assignment. A) B) C) D) E) F) DATABASE SCHEMA: -- TABLE CREATE
MYSQL ONLY (ASSIGNMENT)
Need help with answering the following four questions for my assignment.
A)

B)

C)

D)

E)

F)

DATABASE SCHEMA:
-- TABLE CREATE TABLE country_of_birth( ISO_Code varchar(2), country_name varchar(10), PRIMARY KEY (ISO_Code) );
CREATE TABLE Events ( Event_Location varchar(2), Event_date date, Hosted_By varchar(20) );
CREATE TABLE Locations ( Location_ID varchar(2), Location_Name varchar(23) );
CREATE TABLE Research_Area ( Subject_Code varchar(2), Subject varchar(17), PRIMARY KEY (Subject_Code) );
CREATE TABLE Scientist ( ID int(2) NOT NULL, First_Name varchar(15), Surname varchar(20), Born int(4), Died int(4), ISO_Code varchar(2), Bio varchar(900), PRIMARY KEY (ID), FOREIGN KEY (ISO_Code) REFERENCES country_of_birth (ISO_Code) );
CREATE TABLE Scientist_Subject ( Scientist_ID int(2), Subject_Code varchar(2), PRIMARY KEY (Scientist_ID, Subject_Code), FOREIGN KEY (Scientist_ID) REFERENCES Scientist (ID), FOREIGN KEY (Subject_Code) REFERENCES Research_Area (Subject_Code) );
Which subject(s) were studied by scientists born in France (return just the unique subject name) SELECT from WHERE AND AND ISO_Code = 'FR'; Which subject(s) were studied by scientists born in France (return just the subject name, and display that subject name only once) SELECT from research_area, scientist_subject, scientist where research_area.subject_code = scientist_subject.subject_code and ID = Scientist_ID and Please answer all parts of the question. Which scientists have an "a" in their names and studied a subject which contains an "e"? DISTINCT ,subject FROM \begin{tabular}{l|l} WHERE & .subject_code = \\ .subject_code AND & \end{tabular} AND LIKE LIKE J and research_area.Subject like '\%e\%'; Swap the first name and surname of scientist with ID = 1 using variables Alter the Events to add the attribute "Cancelled" using the appropriate MySQL datatype for TRUE FALSE. Clue: use the MySQL standard command for TRUE or FALSE (binary options) Using a subquery to find the Scientist.ID, add the subject Mathematics for Maryam Mirzakhani VALUES ((SELECT WHERE =
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
