rem
rem CSC 365. Lab 2. Test script for BAKERY dataset
rem 
rem Alex Dekhtyar (dekhtyar@csc.calpoly.edu)
rem

spool lab2-BAKERY-output.txt


rem Create tables

host echo '***********************************************'
host echo ' Creating tables  '
host echo '***********************************************'

host cat BAKERY-setup.sql

start BAKERY-setup.sql

rem Populate tables

host echo '***********************************************'
host echo ' Populating tables  '
host echo '***********************************************'

start BAKERY-build-customers.sql
start BAKERY-build-goods.sql
start BAKERY-build-reciepts.sql
start BAKERY-build-items.sql


rem test tables

host echo '***********************************************'
host echo ' Testing tables  '
host echo '***********************************************'


host cat BAKERY-test.sql
start BAKERY-test.sql

rem formatted output

host echo '***********************************************'
host echo ' Testing SQL*plus formatting  '
host echo '***********************************************'

clear columns
clear breaks
 

host cat BAKERY-formatted.sql
start BAKERY-formatted.sql

clear columns
clear breaks


rem  modify tables

host echo '***********************************************'
host echo ' Modifying tables  '
host echo '***********************************************'

host cat BAKERY-modify.sql
start BAKERY-modify.sql


rem drop tables

host echo '***********************************************'
host echo ' Populating tables  '
host echo '***********************************************'

host cat BAKERY-cleanup.sql
start BAKERY-cleanup.sql

rem test that the tables no longer exist

start BAKERY-test.sql


host echo '***********************************************'
host echo ' That is All, folks!  '
host echo '***********************************************'

spool off
