Lab 01 Exercises
Lab 01 Exercises
1. What are the advantages of using a database solution as compared to the traditional
file storage mechanism? What is the role of DBMS to a database system?
[2 marks]
Populate the above database with the following DML statements under the ‘SQL’ tab.
You can download the “Lab01_Q2_Database.sql” file and execute the table creation
and data population statements to obtain the above database state.
(a) Show content of the database state (i.e., the screenshot of each table displayed by
the PhpMyAdmin tool).
[2 marks]
The syntax of a basic database DML query statement is as follows.
4 COMPSCI 751 Lab 01 Exercises
For example, the query statement to retrieve all the course information offered by the
Computer Science department is as follows.
Based on the query syntax and the example, answer the following questions and show
the query output as screenshots similar to the above.
(b) Retrieve all the section information taught by the instructor 'Anderson'.
[2 marks]
(c) Retrieve all the grade and section information of the student with the ID number '8'.
[2 marks]
(d) Retrieve the prerequisite course information of the course ‘CS3380’. Please display
all the course information, such as the course number, name, credit and offering
department.
[2 marks]