#
# this file is using default engine using MyISAM drop table if exists fruit; select "create a fruit table with fruitID name and price"; #this is a complete line, but remember we use PHPMyAdmin to do this for US #we need to understand the basic dml commands: create, replace, insert, delete and update #but the details arugments of each command are never memorized, notice how complex fruitID is. create table if not exists fruit (fruitID smallint(6) unsigned not null primary key auto_increment, name varchar(8), price double(5,2) ); select "note replace will update an old row replace/insert 6 records into fruit"; #in this case replace is better, it will update bad data with correct fields. #nota bene with a drop first insert and replace are the same replace into fruit Values( 1, "apple", 2.5),(2, "pear", 3.0), (4, "Grpe", .75 ), (8, "pluot", 4.50 ), (6, "plum", 1.25 ), (3, "banana", 1.0 ); drop table if exists inventory; select "create an inventory table with fruitID and quantity"; create table if not exists inventory (fruitID smallint(6) unsigned not null, quantity int ); #replace will not work with inventory it does not have a key field select "insert 5 records into inventory, each time you run this you insert 5 new rows"; insert into inventory values( 1, 100 ), (3, 500 ), (2, 100 ), (1,250), (2,200 ); select "after modifications you Should drop tables" #