CPE 365: Intro to Databases
Lab 2 test scripts

Note These scripts are for you to test that your setup works correctly. The lab assignment asks you to name files in a specific way, and to place them in specific directories. All scripts should be run from the root of your Lab 2 directory. You can either run them from command line:

 $mysql < build-all.sql

or from inside the mysql client

 MySQL[dekhtyar]> source build-all.sql

Test Scripts

The three scipts below are single use scripts.

build-all.sql creates and populates all tables in all databases (it only succeeds if all your table names are unique)
test-all.sql runs all your test scriptsd
clean-all.sql drops all tables
In addition,
db-check.sql simply chains the three scripts above together

Note: You can also create a redo.sql script by placing the source clean-all.sql at the top of the script.

One Database At A Time

We have one more script.

full-run.sql runs setup, insertion, test, and cleanup one database at a time


January 23, 2022 dekhtyar at calpoly.edu