Execute the following commands
There is a miniSql 2.0 database CSCI343 stored on the server woodfin.cs.unca.edu. This database contains two tables: CourseEnroll with fields
Field | Type | Length |
---|---|---|
Year | int | 4 |
Term | char | 1 |
Number | int | 4 |
Section | char | 3 |
Enrollment | int | 4 |
CH | int | 4 |
which describes CSCI course offerings at UNCA over the last several years and CourseNamewith fields
Field | Type | Length |
---|---|---|
Number | int | 4 |
Title | char | 30 |
which gives the titles of CSCI courses. By the way, in the Termfield of CourseEnroll, 1 is Spring, 3 is Summer, and 6 is Fall. Yep, that's how they really do it.
To look at the contents of these tables, log into woodfin.cs.unca.edu and start Mini SQL by typing the command
then type the following commands to msql. The \gsends an SQL statement to the database server and the \qquits msql.
Design ten SQL queries to display the following information
For each query, print only the requested columns and do notprint any row more than once.
Use your favorite text editor to create a file home4.sqlin the home4directory you created above. Your file should contain ten lines, one for each of the above queries. Each line mustbe of the form
You should be able to run all seven queries with the following command
At noon on Tuesday, 3 March, a script will be run to execute your home4.sqlcommands in mini SQL. This script will be run at noon for five consecutive days. Each day your program is missing or fails to successfully solve the problem, 20% will be deducted from your grade for homework four.
Back to the CSCI 363 homework page
Back to the CSCI 363 home page