Write an SQL statement for each of the following tasks: 1. List the instructors and start_time for all timeslots related to class course 'Body Pump'. The list should be ordered by the instructor’s name. 2. Find all the courses and all the related instructors that are teaching the course. Results should be ordered by the course.
Write an SQL statement for each of the following tasks: 1. List the instructors and start_time for all timeslots related to class course 'Body Pump'. The list should be ordered by the instructor’s name. 2. Find all the courses and all the related instructors that are teaching the course. Results should be ordered by the course.
Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
Related questions
Question
Write an SQL statement for each of the following tasks:
1. List the instructors and start_time for all timeslots related to class course 'Body Pump'. The list should be ordered by the instructor’s name.
2. Find all the courses and all the related instructors that are teaching the course. Results should be ordered by the course.
3. Show the bookings planned by a specific user, e.g. uid= ‘U001’. In particular:
a) Class ID, course, instructor, start_time, and reservation (only if it is ‘1’) for each timeslot, for each class taken by the user.
b) The total number of bookings on each of the Class IDs that the user has reserved, if the given user is a student.

Transcribed Image Text:CO323-A2-SQL-a X
Ke PowerPoint Prese X
Mail - Logun Balo X
Write an SQL stat X
W SQL Tutorial
W SQL Tryit Editor v X
> (61) Best Way to
how to write sql s X
moodle.kent.ac.uk/2021/pluginfile.php/659498/mod_resource/content/1/CO323-A2-SQL-and%2OPHP-final_2022%20updated.pdf
CO323-A2-SQL-and PHP-final_2022 updated.pdf
1 / 4
100%
+ |
To store information about gym classes, a relational database was created using MySQL. There are
four tables in the database: User, Class, Timeslot, and Booking. A user takes one or more classes.
A user could be a student (Y') or not ('N’'). A class may be available in different times. The
instructor's name and start_time are stored in the Timeslot table. In the Booking table are recorded
the user's class reservations (value 1 reserved, 0 free).
The database's Entity-Relationship model is shown below:
COMP3230 Aswnmt-SOL, PHP &
Iatredaen
we
Te
Pu nu s
Fe Me
Timeslot
1
Class
tid {PK}
cid {PK}
1..1
1..*
cid {FK}
course
has
instructor
start_time
1..1
records
1..*
User
Booking
uid {PK}
uid {PK,FK}
forename
1..*
tid {PK,FK}
1..1
surname
makes
reservation
student
where PK and FK refer to primary key and foreign key, respectively.
The credentials you will need to access the database are given below:
Server Name:
dragon.kent.ac.uk
3
Database name:
comp3230
Username:
comp3230
Password:
ра33word
d a
Markie sheme
Laer heidenof nwark anm
This assignment consists of two parts:
Pagiari d dpation of material
Part A – Writing SQL queries; and
Part B – Writing PHP scripts that access the given MYSQL database and
C41.
>
...
II
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images

Recommended textbooks for you

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON

Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science

Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning

Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning

Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education

Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY