/*
*
* note source commands don't work inside phpMyAdmin,
* However you can import the script using phpMyAdmin import premiere folder
or you can cut and paste the script into an SQl window using the
URL location https://cim.saddleback.edu/~premiere
* System has a full set of reset files:
*
FileName | Tables |
fruit1Table.sql | fruit |
fruit5TablesAltered.sql | All 5 tables altered |
fruitPreTrigger.sql | DB state prior Trigger Videos |
fruitPreRoutine.sql | DB state prior Routine Videos |
*
* Consistency Note, for the phpMyAdmin video sets,
* source files use prefix fruit
* submit assignments use prefix pma
*
* Nota Bene, submit has code folding, click next to line number in column 19,
then next to line number 1;
*
* @author Professor Tom DeDonno 01/15/2014 Modified 9/20
* updated same calls can be used in both phpMyAdmin and submit
*
*/
#1 reset tabels using fruitAlter.sql
# Note URL location is https://cim.saddleback.edu/~premiere/fruitReset.sql.html
# phpMyAdmin location is import premiere folder
# this is the actual harddisk location
#1
source /home/premiere/public_html/fruitReset.sql.html;
#2 write query to display all table names in your database
#3 write a query to display all table:fruit records sorted lexicographically by fruit name
#4 write a query to display fruitID and sum( quantity ) for each unique fruitID in inventory
#5 Display all records in table:orders sorted by increasing startDate
#6 create view inventoryQuantity
#7 create view fruitView
#8 display all inventoryQuantity records sorted by ascending fruitID
/* #9 write query to insert "grannySmith", price $0.50, fruitID 20, inventory quantity 0;
* note I cannot test data manipluation queries, 10 will fail it this is wrong
* Also, don't include this data manipluation in your local reset file.
Hints
you cannot insert into fruitView it doesn't have 1:1 relationship to physical tables.
Do you need to insert 0 quantity inventory?
*/
#10 display all fruitView records sorted by ascending name
#11 write query to display fruitID, name, price for all fruit w no inventory,
# order by name lexicographically
#12 display records of table:fruit with price greater than $1.50 with most expensive fruits first
# except for queries create view queries (specific insert details)
# you should be able to write all queries in this assignment from scratch
# if you cannot, write comments delete queries and practice until you can.
#