-- MySQL Administrator dump 1.4 -- -- ------------------------------------------------------ -- Server version 5.0.37-community-nt
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-- -- Create schema coffeebreak --
CREATE DATABASE IF NOT EXISTS coffeebreak; USE coffeebreak;
-- -- Definition of table `coffees` --
DROP TABLE IF EXISTS `coffees`; CREATE TABLE `coffees` ( `cof_name` varchar(32) NOT NULL, `sup_id` int(11) NOT NULL, `price` float NOT NULL, `sales` int(11) NOT NULL default '0', `total` int(11) NOT NULL default '0', PRIMARY KEY (`cof_name`), KEY `sup_id` (`sup_id`), CONSTRAINT `FK_coffees_supplier` FOREIGN KEY (`sup_id`) REFERENCES `supplier` (`sup_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- -- Dumping data for table `coffees` --
/*!40000 ALTER TABLE `coffees` DISABLE KEYS */; INSERT INTO `coffees` (`cof_name`,`sup_id`,`price`,`sales`,`total`) VALUES ('Colombian',101,7.99,0,0), ('Colombian_Decaf',101,8.99,0,0), ('Espresso',150,9.99,0,0), ('French_Roast',49,8.99,0,0), ('French_Roast_Decaf',49,9.99,0,0); /*!40000 ALTER TABLE `coffees` ENABLE KEYS */;
-- -- Definition of table `supplier` --
DROP TABLE IF EXISTS `supplier`; CREATE TABLE `supplier` ( `sup_id` int(11) NOT NULL, `sup_name` varchar(20) NOT NULL, `street` varchar(20) NOT NULL, `city` varchar(20) NOT NULL, `state` varchar(2) NOT NULL, `zip` varchar(5) NOT NULL, PRIMARY KEY (`sup_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- -- Dumping data for table `supplier` --
/*!40000 ALTER TABLE `supplier` DISABLE KEYS */; INSERT INTO `supplier` (`sup_id`,`sup_name`,`street`,`city`,`state`,`zip`) VALUES (49,'Superior Coffee','1 Party Place','Mendocino','CA','95460'), (101,'Acme, Inc.','99 Market Street','Groundsville','CA','95199'), (150,'The High Ground','100 Coffee Lane','Meadows','CA','93966'); /*!40000 ALTER TABLE `supplier` ENABLE KEYS */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|