diff --git a/.DS_Store b/.DS_Store index 1732135..0d327ce 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 00cbbdf..0000000 --- a/.gitignore +++ /dev/null @@ -1,59 +0,0 @@ -# Logs -logs -*.log -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# Runtime data -pids -*.pid -*.seed -*.pid.lock - -# Directory for instrumented libs generated by jscoverage/JSCover -lib-cov - -# Coverage directory used by tools like istanbul -coverage - -# nyc test coverage -.nyc_output - -# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) -.grunt - -# Bower dependency directory (https://bower.io/) -bower_components - -# node-waf configuration -.lock-wscript - -# Compiled binary addons (http://nodejs.org/api/addons.html) -build/Release - -# Dependency directories -node_modules/ -jspm_packages/ - -# Typescript v1 declaration files -typings/ - -# Optional npm cache directory -.npm - -# Optional eslint cache -.eslintcache - -# Optional REPL history -.node_repl_history - -# Output of 'npm pack' -*.tgz - -# Yarn Integrity file -.yarn-integrity - -# dotenv environment variables file -.env - diff --git a/98--PizzaPicadilly-J1.mwb.bak b/98--PizzaPicadilly-J1.mwb.bak deleted file mode 100644 index 699c6d2..0000000 Binary files a/98--PizzaPicadilly-J1.mwb.bak and /dev/null differ diff --git a/98--PizzaPicadilly.mwb.bak b/98--PizzaPicadilly.mwb.bak deleted file mode 100644 index db02ccc..0000000 Binary files a/98--PizzaPicadilly.mwb.bak and /dev/null differ diff --git a/98-PizzaPicadilly-NewScript.sql b/98-PizzaPicadilly-NewScript.sql deleted file mode 100644 index 3fe7a3a..0000000 --- a/98-PizzaPicadilly-NewScript.sql +++ /dev/null @@ -1,443 +0,0 @@ --- --- --- Globals --- --- - --- SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; --- SET FOREIGN_KEY_CHECKS=0; - --- --- --- Table 'customerProfile' --- --- --- - -DROP TABLE IF EXISTS `customerProfile`; - -CREATE TABLE `customerProfile` ( - `idCustomerProfile` INTEGER NULL AUTO_INCREMENT DEFAULT NULL, - `customerProfile` VARCHAR NULL DEFAULT NULL, - `idCustomer_customer` INTEGER NULL DEFAULT NULL, - PRIMARY KEY (`idCustomerProfile`) -); - --- --- --- Table 'order' --- --- --- - -DROP TABLE IF EXISTS `order`; - -CREATE TABLE `order` ( - `idOrder` INTEGER NULL AUTO_INCREMENT DEFAULT NULL, - `pizzaCode` INTEGER NULL DEFAULT NULL, - `productName` VARCHAR NULL DEFAULT NULL, - `idRecipe` VARCHAR NULL DEFAULT NULL, - `idDelivery_deliveryAddress` INTEGER NULL DEFAULT NULL, - `idCustomerPizzaPreference_customerPizzaPreference` INTEGER NULL DEFAULT NULL, - `idStateTax_stateSalesTax` INTEGER NULL DEFAULT NULL, - PRIMARY KEY (`idOrder`) -); - --- --- --- Table 'user' --- --- --- - -DROP TABLE IF EXISTS `user`; - -CREATE TABLE `user` ( - `idUserName` INTEGER NULL AUTO_INCREMENT DEFAULT NULL, - `username` VARCHAR NULL DEFAULT NULL, - `password` VARCHAR NULL DEFAULT NULL, - PRIMARY KEY (`idUserName`) -); - --- --- --- Table 'customerPizzaPreference' --- --- --- - -DROP TABLE IF EXISTS `customerPizzaPreference`; - -CREATE TABLE `customerPizzaPreference` ( - `idCustomerPizzaPreference` INTEGER NULL AUTO_INCREMENT DEFAULT NULL, - `idCustomer_customer` INTEGER NULL DEFAULT NULL, - `idPizzaProduct_pizzaProduct` INTEGER NULL DEFAULT NULL, - PRIMARY KEY (`idCustomerPizzaPreference`) -); - --- --- --- Table 'deliveryAddress' --- --- --- - -DROP TABLE IF EXISTS `deliveryAddress`; - -CREATE TABLE `deliveryAddress` ( - `idDelivery` INTEGER NULL AUTO_INCREMENT DEFAULT NULL, - `deliveryStreet1` VARCHAR NULL DEFAULT NULL, - `deliveryStreet2` VARCHAR NULL DEFAULT NULL, - `deliveryCity` VARCHAR NULL DEFAULT NULL, - `deliveryState` VARCHAR NULL DEFAULT NULL, - `deliveryZip` INTEGER NULL DEFAULT NULL, - `idCustomer_customer` INTEGER NULL DEFAULT NULL, - PRIMARY KEY (`idDelivery`) -); - --- --- --- Table 'priceList' --- --- --- - -DROP TABLE IF EXISTS `priceList`; - -CREATE TABLE `priceList` ( - `idpriceList` INTEGER NULL AUTO_INCREMENT DEFAULT NULL, - `pieSize` INTEGER NULL DEFAULT NULL, - `pizzaCost` DECIMAL NULL DEFAULT NULL, - `pizzaMarkup` DECIMAL NULL DEFAULT NULL, - `discount` DECIMAL NULL DEFAULT NULL, - `pizzaPrice` DECIMAL NULL DEFAULT NULL, - `discountHappyHour` DECIMAL NULL DEFAULT NULL, - `otherCost` DECIMAL NULL DEFAULT NULL, - `otherPrice` DECIMAL NULL DEFAULT NULL, - `otherMarkup` DECIMAL NULL DEFAULT NULL, - PRIMARY KEY (`idpriceList`) -); - --- --- --- Table 'ingredient' --- --- --- - -DROP TABLE IF EXISTS `ingredient`; - -CREATE TABLE `ingredient` ( - `idIngredient` INTEGER NULL AUTO_INCREMENT DEFAULT NULL, - `ingredientName` VARCHAR NULL DEFAULT NULL, - `costPerOz` DECIMAL NULL DEFAULT NULL, - `ozInSmall` DECIMAL NULL DEFAULT NULL, - `ozInMedium` DECIMAL NULL DEFAULT NULL, - `ozInLarge` DECIMAL NULL DEFAULT NULL, - `ozInExtraLarge` INTEGER NULL DEFAULT NULL, - PRIMARY KEY (`idIngredient`) -); - --- --- --- Table 'orderExtraIngredientList' --- --- --- - -DROP TABLE IF EXISTS `orderExtraIngredientList`; - -CREATE TABLE `orderExtraIngredientList` ( - `idAddOn` INTEGER NULL AUTO_INCREMENT DEFAULT NULL, - `idOrder_order` INTEGER NULL DEFAULT NULL, - `idRecipe_recipe` INTEGER NULL DEFAULT NULL, - `idpriceList_priceList` INTEGER NULL DEFAULT NULL, - PRIMARY KEY (`idAddOn`) -); - --- --- --- Table 'creditCard' --- --- --- - -DROP TABLE IF EXISTS `creditCard`; - -CREATE TABLE `creditCard` ( - `idCreditCard` INTEGER NULL AUTO_INCREMENT DEFAULT NULL, - `cardNumber` INTEGER NULL DEFAULT NULL, - `cvvNumber` INTEGER NULL DEFAULT NULL, - `nameOnCard` VARCHAR NULL DEFAULT NULL, - `billStreet` VARCHAR NULL DEFAULT NULL, - `billCity` VARCHAR NULL DEFAULT NULL, - `billZip` INTEGER NULL DEFAULT NULL, - `cardCompany` VARCHAR NULL DEFAULT NULL, - `cardIssuer` VARCHAR NULL DEFAULT NULL, - `idCustomer_customer` INTEGER NULL DEFAULT NULL, - PRIMARY KEY (`idCreditCard`) -); - --- --- --- Table 'customer' --- --- --- - -DROP TABLE IF EXISTS `customer`; - -CREATE TABLE `customer` ( - `idCustomer` INTEGER NULL AUTO_INCREMENT DEFAULT NULL, - `customerName` INTEGER NULL DEFAULT NULL, - `IdCreditCard1` INTEGER NULL DEFAULT NULL, - `IdCreditCard2` INTEGER NULL DEFAULT NULL, - `IdCreditCard3` INTEGER NULL DEFAULT NULL, - `IdCheckingAcct` INTEGER NULL DEFAULT NULL, - `idUserName_user` INTEGER NULL DEFAULT NULL, - PRIMARY KEY (`idCustomer`) -); - --- --- --- Table 'pizzaProduct' --- --- --- - -DROP TABLE IF EXISTS `pizzaProduct`; - -CREATE TABLE `pizzaProduct` ( - `idPizzaProduct` INTEGER NULL AUTO_INCREMENT DEFAULT NULL, - `pizzaName` VARCHAR NULL DEFAULT NULL, - `idRecipe` INTEGER NULL DEFAULT NULL, - `idIngredient_ingredient` INTEGER NULL DEFAULT NULL, - PRIMARY KEY (`idPizzaProduct`) -); - --- --- --- Table 'pieType' --- --- --- - -DROP TABLE IF EXISTS `pieType`; - -CREATE TABLE `pieType` ( - `idPieType` INTEGER NULL AUTO_INCREMENT DEFAULT NULL, - `pieType` VARCHAR NULL DEFAULT NULL, - `idpriceList_pizzaPriceList` INTEGER NULL DEFAULT NULL, - `idRecipe_recipe` INTEGER NULL DEFAULT NULL, - `pieTypeDescription` VARCHAR NULL DEFAULT NULL, - PRIMARY KEY (`idPieType`) -); - --- --- --- Table 'productSupplier' --- --- --- - -DROP TABLE IF EXISTS `productSupplier`; - -CREATE TABLE `productSupplier` ( - `idProductSupplier` INTEGER NULL AUTO_INCREMENT DEFAULT NULL, - `supplierName` VARCHAR NULL DEFAULT NULL, - `idContact` VARCHAR NULL DEFAULT NULL, - `productSKU` INTEGER NULL DEFAULT NULL, - `idOtherProduct_otherProduct` INTEGER NULL DEFAULT NULL, - PRIMARY KEY (`idProductSupplier`) -); - --- --- --- Table 'stateSalesTax' --- --- --- - -DROP TABLE IF EXISTS `stateSalesTax`; - -CREATE TABLE `stateSalesTax` ( - `idStateTax` INTEGER NULL AUTO_INCREMENT DEFAULT NULL, - `stateName` VARCHAR NULL DEFAULT NULL, - `stateAbbreviation` VARCHAR NULL DEFAULT NULL, - `taxRate` DECIMAL NULL DEFAULT NULL, - PRIMARY KEY (`idStateTax`) -); - --- --- --- Table 'paymentType' --- --- --- - -DROP TABLE IF EXISTS `paymentType`; - -CREATE TABLE `paymentType` ( - `idPaymentType` INTEGER NULL AUTO_INCREMENT DEFAULT NULL, - `paymentType` VARCHAR NULL DEFAULT NULL, - `idCreditCard_creditCard` INTEGER NULL DEFAULT NULL, - `idCheckingAcct_checkingAcct` INTEGER NULL DEFAULT NULL, - PRIMARY KEY (`idPaymentType`) -); - --- --- --- Table 'checkingAcct' --- --- --- - -DROP TABLE IF EXISTS `checkingAcct`; - -CREATE TABLE `checkingAcct` ( - `idCheckingAcct` INTEGER NULL AUTO_INCREMENT DEFAULT NULL, - `bankNumber` INTEGER NULL DEFAULT NULL, - `acctNumber` INTEGER NULL DEFAULT NULL, - `acctHolderName` VARCHAR NULL DEFAULT NULL, - `acctStreet` INTEGER NULL DEFAULT NULL, - `acctCity` INTEGER NULL DEFAULT NULL, - `acctState` INTEGER NULL DEFAULT NULL, - `acctZip` INTEGER NULL DEFAULT NULL, - `idCustomer_customer` INTEGER NULL DEFAULT NULL, - PRIMARY KEY (`idCheckingAcct`) -); - --- --- --- Table 'recipe' --- --- --- - -DROP TABLE IF EXISTS `recipe`; - -CREATE TABLE `recipe` ( - `idRecipe` INTEGER NULL AUTO_INCREMENT DEFAULT NULL, - `pizzaName` VARCHAR NULL DEFAULT NULL, - `crustStandard` INTEGER NULL DEFAULT NULL, - `cheeseType` INTEGER NULL DEFAULT NULL, - `idPizzaProduct_pizzaProduct` INTEGER NULL DEFAULT NULL, - `idIngredient_ingredient` INTEGER NULL DEFAULT NULL, - `ingredient1` VARCHAR NULL DEFAULT NULL, - `ingredient2` VARCHAR NULL DEFAULT NULL, - `ingredient3` VARCHAR NULL DEFAULT NULL, - `ingredient4` VARCHAR NULL DEFAULT NULL, - `ingredient5` VARCHAR NULL DEFAULT NULL, - `ingredient6` VARCHAR NULL DEFAULT NULL, - `ingredient7` VARCHAR NULL DEFAULT NULL, - `ingredient8` VARCHAR NULL DEFAULT NULL, - `ingredient9` VARCHAR NULL DEFAULT NULL, - `ingredient10` VARCHAR NULL DEFAULT NULL, - PRIMARY KEY (`idRecipe`) -); - --- --- --- Table 'contact' --- --- --- - -DROP TABLE IF EXISTS `contact`; - -CREATE TABLE `contact` ( - `idContact` INTEGER NULL AUTO_INCREMENT DEFAULT NULL, - `contactType` VARCHAR NULL DEFAULT NULL, - `contactStreet1` VARCHAR NULL DEFAULT NULL, - `contactStreet2` VARCHAR NULL DEFAULT NULL, - `contactCity` VARCHAR NULL DEFAULT NULL, - `contactState` VARCHAR NULL DEFAULT NULL, - `contactZip` INTEGER NULL DEFAULT NULL, - `contactPhone1` VARCHAR NULL DEFAULT NULL, - `contactPhone2` VARCHAR NULL DEFAULT NULL, - `contactEmail` VARCHAR NULL DEFAULT NULL, - `idCustomer_customer` INTEGER NULL DEFAULT NULL, - PRIMARY KEY (`idContact`) -); - --- --- --- Table 'otherProduct' --- --- --- - -DROP TABLE IF EXISTS `otherProduct`; - -CREATE TABLE `otherProduct` ( - `idOtherProduct` INTEGER NULL AUTO_INCREMENT DEFAULT NULL, - `productType` VARCHAR NULL DEFAULT NULL, - `productName` VARCHAR NULL DEFAULT NULL, - `description` VARCHAR NULL DEFAULT NULL, - `brand` VARCHAR NULL DEFAULT NULL, - `unit` VARCHAR NULL DEFAULT NULL, - `barCode` VARCHAR NULL DEFAULT NULL, - `productSKU` VARCHAR NULL DEFAULT NULL, - `manufacturerName` VARCHAR NULL DEFAULT NULL, - `idOrder_order` INTEGER NULL DEFAULT NULL, - `idContact_contact` INTEGER NULL DEFAULT NULL, - `idpriceList_PriceList` INTEGER NULL DEFAULT NULL, - PRIMARY KEY (`idOtherProduct`) -); - --- --- --- Foreign Keys --- --- - -ALTER TABLE `customerProfile` ADD FOREIGN KEY (idCustomer_customer) REFERENCES `customer` (`idCustomer`); -ALTER TABLE `order` ADD FOREIGN KEY (idDelivery_deliveryAddress) REFERENCES `deliveryAddress` (`idDelivery`); -ALTER TABLE `order` ADD FOREIGN KEY (idCustomerPizzaPreference_customerPizzaPreference) REFERENCES `customerPizzaPreference` (`idCustomerPizzaPreference`); -ALTER TABLE `order` ADD FOREIGN KEY (idStateTax_stateSalesTax) REFERENCES `stateSalesTax` (`idStateTax`); -ALTER TABLE `customerPizzaPreference` ADD FOREIGN KEY (idCustomer_customer) REFERENCES `customer` (`idCustomer`); -ALTER TABLE `customerPizzaPreference` ADD FOREIGN KEY (idPizzaProduct_pizzaProduct) REFERENCES `pizzaProduct` (`idPizzaProduct`); -ALTER TABLE `deliveryAddress` ADD FOREIGN KEY (idCustomer_customer) REFERENCES `customer` (`idCustomer`); -ALTER TABLE `orderExtraIngredientList` ADD FOREIGN KEY (idOrder_order) REFERENCES `order` (`idOrder`); -ALTER TABLE `orderExtraIngredientList` ADD FOREIGN KEY (idRecipe_recipe) REFERENCES `recipe` (`idRecipe`); -ALTER TABLE `orderExtraIngredientList` ADD FOREIGN KEY (idpriceList_priceList) REFERENCES `priceList` (`idpriceList`); -ALTER TABLE `creditCard` ADD FOREIGN KEY (idCustomer_customer) REFERENCES `customer` (`idCustomer`); -ALTER TABLE `customer` ADD FOREIGN KEY (idUserName_user) REFERENCES `user` (`idUserName`); -ALTER TABLE `pizzaProduct` ADD FOREIGN KEY (idIngredient_ingredient) REFERENCES `ingredient` (`idIngredient`); -ALTER TABLE `pieType` ADD FOREIGN KEY (idpriceList_pizzaPriceList) REFERENCES `priceList` (`idpriceList`); -ALTER TABLE `pieType` ADD FOREIGN KEY (idRecipe_recipe) REFERENCES `recipe` (`idRecipe`); -ALTER TABLE `productSupplier` ADD FOREIGN KEY (idOtherProduct_otherProduct) REFERENCES `otherProduct` (`idOtherProduct`); -ALTER TABLE `paymentType` ADD FOREIGN KEY (idCreditCard_creditCard) REFERENCES `creditCard` (`idCreditCard`); -ALTER TABLE `paymentType` ADD FOREIGN KEY (idCheckingAcct_checkingAcct) REFERENCES `checkingAcct` (`idCheckingAcct`); -ALTER TABLE `checkingAcct` ADD FOREIGN KEY (idCustomer_customer) REFERENCES `customer` (`idCustomer`); -ALTER TABLE `recipe` ADD FOREIGN KEY (idPizzaProduct_pizzaProduct) REFERENCES `pizzaProduct` (`idPizzaProduct`); -ALTER TABLE `recipe` ADD FOREIGN KEY (idIngredient_ingredient) REFERENCES `ingredient` (`idIngredient`); -ALTER TABLE `contact` ADD FOREIGN KEY (idCustomer_customer) REFERENCES `customer` (`idCustomer`); -ALTER TABLE `otherProduct` ADD FOREIGN KEY (idOrder_order) REFERENCES `order` (`idOrder`); -ALTER TABLE `otherProduct` ADD FOREIGN KEY (idContact_contact) REFERENCES `contact` (`idContact`); -ALTER TABLE `otherProduct` ADD FOREIGN KEY (idpriceList_PriceList) REFERENCES `priceList` (`idpriceList`); - --- --- --- Table Properties --- --- - --- ALTER TABLE `customerProfile` ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; --- ALTER TABLE `order` ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; --- ALTER TABLE `user` ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; --- ALTER TABLE `customerPizzaPreference` ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; --- ALTER TABLE `deliveryAddress` ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; --- ALTER TABLE `priceList` ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; --- ALTER TABLE `ingredient` ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; --- ALTER TABLE `orderExtraIngredientList` ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; --- ALTER TABLE `creditCard` ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; --- ALTER TABLE `customer` ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; --- ALTER TABLE `pizzaProduct` ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; --- ALTER TABLE `pieType` ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; --- ALTER TABLE `productSupplier` ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; --- ALTER TABLE `stateSalesTax` ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; --- ALTER TABLE `paymentType` ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; --- ALTER TABLE `checkingAcct` ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; --- ALTER TABLE `recipe` ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; --- ALTER TABLE `contact` ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; --- ALTER TABLE `otherProduct` ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; - --- --- --- Test Data --- --- - --- INSERT INTO `customerProfile` (`idCustomerProfile`,`customerProfile`,`idCustomer_customer`) VALUES --- ('','',''); --- INSERT INTO `order` (`idOrder`,`pizzaCode`,`productName`,`idRecipe`,`idDelivery_deliveryAddress`,`idCustomerPizzaPreference_customerPizzaPreference`,`idStateTax_stateSalesTax`) VALUES --- ('','','','','','',''); --- INSERT INTO `user` (`idUserName`,`username`,`password`) VALUES --- ('','',''); --- INSERT INTO `customerPizzaPreference` (`idCustomerPizzaPreference`,`idCustomer_customer`,`idPizzaProduct_pizzaProduct`) VALUES --- ('','',''); --- INSERT INTO `deliveryAddress` (`idDelivery`,`deliveryStreet1`,`deliveryStreet2`,`deliveryCity`,`deliveryState`,`deliveryZip`,`idCustomer_customer`) VALUES --- ('','','','','','',''); --- INSERT INTO `priceList` (`idpriceList`,`pieSize`,`pizzaCost`,`pizzaMarkup`,`discount`,`pizzaPrice`,`discountHappyHour`,`otherCost`,`otherPrice`,`otherMarkup`) VALUES --- ('','','','','','','','','',''); --- INSERT INTO `ingredient` (`idIngredient`,`ingredientName`,`costPerOz`,`ozInSmall`,`ozInMedium`,`ozInLarge`,`ozInExtraLarge`) VALUES --- ('','','','','','',''); --- INSERT INTO `orderExtraIngredientList` (`idAddOn`,`idOrder_order`,`idRecipe_recipe`,`idpriceList_priceList`) VALUES --- ('','','',''); --- INSERT INTO `creditCard` (`idCreditCard`,`cardNumber`,`cvvNumber`,`nameOnCard`,`billStreet`,`billCity`,`billZip`,`cardCompany`,`cardIssuer`,`idCustomer_customer`) VALUES --- ('','','','','','','','','',''); --- INSERT INTO `customer` (`idCustomer`,`customerName`,`IdCreditCard1`,`IdCreditCard2`,`IdCreditCard3`,`IdCheckingAcct`,`idUserName_user`) VALUES --- ('','','','','','',''); --- INSERT INTO `pizzaProduct` (`idPizzaProduct`,`pizzaName`,`idRecipe`,`idIngredient_ingredient`) VALUES --- ('','','',''); --- INSERT INTO `pieType` (`idPieType`,`pieType`,`idpriceList_pizzaPriceList`,`idRecipe_recipe`,`pieTypeDescription`) VALUES --- ('','','','',''); --- INSERT INTO `productSupplier` (`idProductSupplier`,`supplierName`,`idContact`,`productSKU`,`idOtherProduct_otherProduct`) VALUES --- ('','','','',''); --- INSERT INTO `stateSalesTax` (`idStateTax`,`stateName`,`stateAbbreviation`,`taxRate`) VALUES --- ('','','',''); --- INSERT INTO `paymentType` (`idPaymentType`,`paymentType`,`idCreditCard_creditCard`,`idCheckingAcct_checkingAcct`) VALUES --- ('','','',''); --- INSERT INTO `checkingAcct` (`idCheckingAcct`,`bankNumber`,`acctNumber`,`acctHolderName`,`acctStreet`,`acctCity`,`acctState`,`acctZip`,`idCustomer_customer`) VALUES --- ('','','','','','','','',''); --- INSERT INTO `recipe` (`idRecipe`,`pizzaName`,`crustStandard`,`cheeseType`,`idPizzaProduct_pizzaProduct`,`idIngredient_ingredient`,`ingredient1`,`ingredient2`,`ingredient3`,`ingredient4`,`ingredient5`,`ingredient6`,`ingredient7`,`ingredient8`,`ingredient9`,`ingredient10`) VALUES --- ('','','','','','','','','','','','','','','',''); --- INSERT INTO `contact` (`idContact`,`contactType`,`contactStreet1`,`contactStreet2`,`contactCity`,`contactState`,`contactZip`,`contactPhone1`,`contactPhone2`,`contactEmail`,`idCustomer_customer`) VALUES --- ('','','','','','','','','','',''); --- INSERT INTO `otherProduct` (`idOtherProduct`,`productType`,`productName`,`description`,`brand`,`unit`,`barCode`,`productSKU`,`manufacturerName`,`idOrder_order`,`idContact_contact`,`idpriceList_PriceList`) VALUES --- ('','','','','','','','','','','',''); diff --git a/App Instructions.md b/App Instructions.md deleted file mode 100644 index 636e1db..0000000 --- a/App Instructions.md +++ /dev/null @@ -1 +0,0 @@ -Install MySQL Server diff --git a/Readme.md b/Readme.md index d94cb08..bddb98d 100644 --- a/Readme.md +++ b/Readme.md @@ -65,7 +65,7 @@ Can track all **customers** and any relevant customer information, including but - [x] payment methods on file (e.g., cash, credit, check - if credit, then the card number should also be stored) Preferences & ingredients -- [ ] Can track each customer's pizza **preferences** +- [x] Can track each customer's pizza **preferences** - [x] Can track the **ingredients** that comprise each of these preferences (e.g., onions, ham, pineapple, anchovies, bacon, etc.) Can track standard **drinks**, including... @@ -85,18 +85,18 @@ Can track **pizza** data: **Other** - [x] The artifact is a GitHub repo - [x] SQL files are well formatted and readable. -- [ ] All the SQL keywords are capitalized. +- [x] All the SQL keywords are capitalized. - [x] The E-R diagram minimizes data redundancy. - [x] Table names are singular, not plural. -- [ ] Variables, functions, files, etc. have appropriate and meaningful names. -- [ ] Code is well organized into a meaningful file structure. -- [ ] The artifact produced is properly licensed, preferably with the [MIT license](https://opensource.org/licenses/MIT). +- [x] Variables, functions, files, etc. have appropriate and meaningful names. +- [x] Code is well organized into a meaningful file structure. +- [x] The artifact produced is properly licensed, preferably with the [MIT license](https://opensource.org/licenses/MIT). There are commands provided (using `npm run` and/or with executable scripts in a `bin/` directory) to: -- [ ] Create the database -- [ ] Drop the database -- [ ] Insert sample/seed data to the database -- [ ] Start the web server +- [x] Create the database +- [x] Drop the database +- [x] Insert sample/seed data to the database +- [x] Start the web server HINT: if you see an item in bold, you may want to consider creating a table for that item. :) @@ -106,26 +106,28 @@ Please feel free to adapt the content of the data to your personal preferences o ### Stretch -- [ ] Maintains a history of **transactions** of all purchases including price, payment method, and delivery date -- [ ] Supports an interface for delivery **drivers** -- [ ] Delivery interface tracks the addresses each driver delivers to -- [ ] Delivery interface tracks the dates/times of delivery -- [ ] Delivery interface tracks money collected (including tips) -- [ ] Supports calculating the proper sales tax (the pizza joint located at the intersection of the four corners of the US, so you might have to support sales taxes for Colorado, Arizona, New Mexico and Utah) -- [ ] API documentation is included in the repo with details on each route, parameters/headers needed, and the structure of returned data -- [ ] A simple web user interface exists that allows users CRUD the data in the specification (this interface can be as simple as a checkbox that "orders" a pizza by creating a DB record in one of your tables) -- [ ] Implements a testing suite (mocha/chai) +- [x] Maintains a history of **transactions** of all purchases including price, payment method, and delivery date +- [x] Supports an interface for delivery **drivers** +- [x] Delivery interface tracks the addresses each driver delivers to +- [x] Delivery interface tracks the dates/times of delivery +- [x] Delivery interface tracks money collected (including tips) +- [x] Supports calculating the proper sales tax (the pizza joint located at the intersection of the four corners of the US, so you might have to support sales taxes for Colorado, Arizona, New Mexico and Utah) +- [x] API documentation is included in the repo with details on each route, parameters/headers needed, and the structure of returned data +- [x] A simple web user interface exists that allows users CRUD the data in the specification (this interface can be as simple as a checkbox that "orders" a pizza by creating a DB record in one of your tables) +- [x] Implements a testing suite (mocha/chai) **Entity Relationship Diagram** -- [ ] The E-R diagram supports all the product/user stories -- [ ] The E-R diagram indicates whether or not each relationship in the schema is is one to one, one to many, or many to many -- [ ] The E-R diagram contains a list of attributes for each entity and relationship -- [ ] The E-R diagram contains the SQL data types of each attribute in the schema -- [ ] The E-R diagram notes any foreign or primary keys in each table in the schema -- [ ] The E-R diagram is included in the artifact (as a `.png` or some other easily viewable format) +- [x] The E-R diagram supports all the product/user stories +- [x] The E-R diagram indicates whether or not each relationship in the schema is is one to one, one to many, or many to many +- [x] The E-R diagram contains a list of attributes for each entity and relationship +- [x] The E-R diagram contains the SQL data types of each attribute in the schema +- [x] The E-R diagram notes any foreign or primary keys in each table in the schema +- [x] The E-R diagram is included in the artifact (as a `.png` or some other easily viewable format) ## Resources - [18+ Best Online Resources for Learning SQL and Database Concepts](http://www.vertabelo.com/blog/notes-from-the-lab/18-best-online-resources-for-learning-sql-and-database) -- [Designing a RESTful API With Node and Postgres](http://mherman.org/blog/2016/03/13/designing-a-restful-api-with-node-and-postgres/#.WAqKX5MrKRt) \ No newline at end of file +- [Designing a RESTful API With Node and Postgres](http://mherman.org/blog/2016/03/13/designing-a-restful-api-with-node-and-postgres/#.WAqKX5MrKRt) + +More resources to come. \ No newline at end of file diff --git a/SQL support files/98--PizzaPicadilly copy.mwb b/SQL support files/98--PizzaPicadilly copy.mwb deleted file mode 100644 index 4067144..0000000 Binary files a/SQL support files/98--PizzaPicadilly copy.mwb and /dev/null differ diff --git a/SQL support files/98--PizzaPicadilly.mwb b/SQL support files/98--PizzaPicadilly.mwb deleted file mode 100644 index 0783026..0000000 Binary files a/SQL support files/98--PizzaPicadilly.mwb and /dev/null differ diff --git a/SQL support files/98--PizzaPicadilly.mwb.bak b/SQL support files/98--PizzaPicadilly.mwb.bak deleted file mode 100644 index 1f0ee83..0000000 Binary files a/SQL support files/98--PizzaPicadilly.mwb.bak and /dev/null differ diff --git a/SQL support files/98-PizzaPicadilly MySQL Server Status.png b/SQL support files/98-PizzaPicadilly MySQL Server Status.png deleted file mode 100644 index 090893c..0000000 Binary files a/SQL support files/98-PizzaPicadilly MySQL Server Status.png and /dev/null differ diff --git a/SQL support files/98-PizzaPicadilly_MySQL-Create-DB-Script b/SQL support files/98-PizzaPicadilly_MySQL-Create-DB-Script deleted file mode 100644 index e52aff9..0000000 --- a/SQL support files/98-PizzaPicadilly_MySQL-Create-DB-Script +++ /dev/null @@ -1,519 +0,0 @@ --- MySQL Script generated by MySQL Workbench --- Tue May 16 14:24:41 2017 --- Model: New Model Version: 1.0 --- MySQL Workbench Forward Engineering - -SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; -SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; -SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; - --- ----------------------------------------------------- --- Schema PizzaPicadilly --- ----------------------------------------------------- --- 98-Pizza Shop exercise - --- ----------------------------------------------------- --- Schema PizzaPicadilly --- --- 98-Pizza Shop exercise --- ----------------------------------------------------- -CREATE SCHEMA IF NOT EXISTS `PizzaPicadilly` DEFAULT CHARACTER SET utf8 ; -USE `PizzaPicadilly` ; - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`user` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`user` ( - `idUserName` INT NOT NULL AUTO_INCREMENT, - `idCustomer` INT NULL, - `username` VARCHAR(16) NOT NULL, - `email` VARCHAR(255) NULL, - `password` VARCHAR(32) NOT NULL, - `create_time` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`idUserName`)); - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`checkingAcct` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`checkingAcct` ( - `idcheckingAcct` INT NOT NULL AUTO_INCREMENT, - `bankNumber` INT NOT NULL COMMENT 'Bank routing', - `acctNumber` INT NULL, - `acctHolderName` VARCHAR(45) NULL, - `acctStreet` VARCHAR(45) NULL, - `acctCity` VARCHAR(45) NULL, - `acctState` VARCHAR(45) NULL, - `acctZip` VARCHAR(45) NULL, - `idCustomer` INT NOT NULL COMMENT 'FK', - PRIMARY KEY (`idcheckingAcct`), - UNIQUE INDEX `idcreditCards_UNIQUE` (`idcheckingAcct` ASC)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`contact` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`contact` ( - `idContact` INT UNSIGNED NOT NULL, - `contactType` INT NULL COMMENT 'Customer\nManufacturer\nSupplier\n', - `contactStreet1` VARCHAR(45) NULL, - `contactStreet2` VARCHAR(45) NULL, - `contactCity` VARCHAR(45) NULL, - `contactState` VARCHAR(2) NULL, - `contactZip` VARCHAR(5) NULL, - `contactPhone1` VARCHAR(45) NULL, - `contactPhone2` VARCHAR(45) NULL, - `contactEmail` VARCHAR(45) NULL, - `idCustomer` INT NULL COMMENT 'FK mutually excludes supplierID and manufacturerID\n', - `supplierID` INT NULL COMMENT 'FK mutually excludes cutomerID and manufacturerID\n', - PRIMARY KEY (`idContact`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`CustomerProfile` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`CustomerProfile` ( - `idCustomerProfile` INT NOT NULL, - PRIMARY KEY (`idCustomerProfile`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`customer` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`customer` ( - `idCustomer` INT UNSIGNED NOT NULL AUTO_INCREMENT, - `customerName` VARCHAR(45) NULL, - `user_idUserName` INT NOT NULL, - `creditCard1ID` INT NULL COMMENT 'Security concern: Should be random number using some form of encryption for credit card number and security digits\n4 for Amex\n3 for others.', - `creditCard2ID` INT NULL COMMENT 'Security concern: Should be random number using some form of encryption for credit card number and security digits\n4 for Amex\n3 for others.', - `creditCard3ID` INT NULL, - `checkingAcctID` VARCHAR(45) NULL, - `checkingAcct_idcheckingAcct` INT NOT NULL, - `contact_idcontacts` INT UNSIGNED NOT NULL, - `CustomerProfile_idCustomerProfile` INT NOT NULL, - PRIMARY KEY (`idCustomer`, `user_idUserName`, `checkingAcct_idcheckingAcct`, `contact_idcontacts`, `CustomerProfile_idCustomerProfile`), - UNIQUE INDEX `idCustomer_UNIQUE` (`idCustomer` ASC), - UNIQUE INDEX `creditCard1ID_UNIQUE` (`creditCard1ID` ASC), - UNIQUE INDEX `creditCard2ID_UNIQUE` (`creditCard2ID` ASC), - UNIQUE INDEX `creditCard3ID_UNIQUE` (`creditCard3ID` ASC), - UNIQUE INDEX `checkingAcctID_UNIQUE` (`checkingAcctID` ASC), - INDEX `fk_customer_user_idx` (`user_idUserName` ASC), - INDEX `fk_customer_checkingAcct1_idx` (`checkingAcct_idcheckingAcct` ASC), - INDEX `fk_customer_contact1_idx` (`contact_idcontacts` ASC), - INDEX `fk_customer_CustomerProfile1_idx` (`CustomerProfile_idCustomerProfile` ASC), - CONSTRAINT `fk_customer_user` - FOREIGN KEY (`user_idUserName`) - REFERENCES `PizzaPicadilly`.`user` (`idUserName`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_customer_checkingAcct1` - FOREIGN KEY (`checkingAcct_idcheckingAcct`) - REFERENCES `PizzaPicadilly`.`checkingAcct` (`idcheckingAcct`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_customer_contact1` - FOREIGN KEY (`contact_idcontacts`) - REFERENCES `PizzaPicadilly`.`contact` (`idContact`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_customer_CustomerProfile1` - FOREIGN KEY (`CustomerProfile_idCustomerProfile`) - REFERENCES `PizzaPicadilly`.`CustomerProfile` (`idCustomerProfile`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`otherProduct` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`otherProduct` ( - `idotherProducts` INT NOT NULL AUTO_INCREMENT COMMENT ' a product ID\n drink description\n manufacturer\n supplier\n price\n', - `productType` VARCHAR(45) NULL COMMENT 'Beverage\nPastry\nIce cream\n', - `productName` VARCHAR(45) NULL, - `Description` VARCHAR(45) NULL, - `Brand` VARCHAR(45) NULL, - `idSupplier` VARCHAR(45) NULL, - `Cost` DECIMAL(2) NULL, - `Price` DECIMAL(2) NULL, - `Markup` DECIMAL NULL, - `barCode` VARCHAR(45) NULL COMMENT 'Product Code is bar code or some other alpha/numeric descriptor', - `productSKU` VARCHAR(45) NULL COMMENT 'Business', - PRIMARY KEY (`idotherProducts`), - UNIQUE INDEX `idotherProducts_UNIQUE` (`idotherProducts` ASC)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`recipe` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`recipe` ( - `idRecipes` INT NOT NULL AUTO_INCREMENT COMMENT 'Recipes are the basic ingredients that make up a particular product. It establishes base cost for the pies.\n\nWe can choose to increase price based on cost or increase ingredients according to size.\n\nEach order is comprised of a specific recipe. ', - `pizzaName` VARCHAR(45) NULL COMMENT 'FK\n', - `crustStandard` VARCHAR(45) NULL, - `cheeseType` VARCHAR(45) NULL, - `toppings` VARCHAR(255) NULL, - PRIMARY KEY (`idRecipes`), - UNIQUE INDEX `idRecipes_UNIQUE` (`idRecipes` ASC)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`deliveryAddress` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`deliveryAddress` ( - `idDelivery` INT NOT NULL AUTO_INCREMENT, - `deliveryStreet1` VARCHAR(45) NULL, - `deliveryStreet2` VARCHAR(45) NULL, - `deliveryCity` VARCHAR(45) NULL, - `deliveryState` VARCHAR(2) NULL, - `deliveryZip` VARCHAR(5) NULL, - `deliveryPhone1` VARCHAR(45) NULL, - `deliveryPhone2` VARCHAR(45) NULL, - `idCustomer` INT NULL COMMENT 'FK \n', - `customer_idCustomer` INT UNSIGNED NOT NULL, - `customer_user_idUserName` INT NOT NULL, - `customer_checkingAcct_idcheckingAcct` INT NOT NULL, - `customer_contact_idcontacts` INT UNSIGNED NOT NULL, - PRIMARY KEY (`idDelivery`, `customer_idCustomer`, `customer_user_idUserName`, `customer_checkingAcct_idcheckingAcct`, `customer_contact_idcontacts`), - INDEX `fk_deliveryAddress_customer1_idx` (`customer_idCustomer` ASC, `customer_user_idUserName` ASC, `customer_checkingAcct_idcheckingAcct` ASC, `customer_contact_idcontacts` ASC), - CONSTRAINT `fk_deliveryAddress_customer1` - FOREIGN KEY (`customer_idCustomer` , `customer_user_idUserName` , `customer_checkingAcct_idcheckingAcct` , `customer_contact_idcontacts`) - REFERENCES `PizzaPicadilly`.`customer` (`idCustomer` , `user_idUserName` , `checkingAcct_idcheckingAcct` , `contact_idcontacts`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`paymentType` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`paymentType` ( - `idpaymentType` INT NOT NULL, - `paymentType` VARCHAR(45) NULL, - `idCustomer` INT NULL COMMENT 'Cash\nCheck\nCredit Card\nGift Card\nCoupon\n\n', - PRIMARY KEY (`idpaymentType`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`pizzaPriceList` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`pizzaPriceList` ( - `idpizzaPriceList` INT NOT NULL AUTO_INCREMENT COMMENT 'Price list establishes pricing for each configuration of pies.\n\nEach pie size has differing amounts of ingredients that affect price.\n\npizzaCode uniquely identifies pieSize + recipe.\n\nDo we include a percentage increase in cost to cover more ingredients?\n\nField descriptions:\n\nidPiaaPriceList\nidPizzaProduct\npieSize\npizzaCode: unique code for pizza product + size\nCost: base code of this pie in this size\nMarkup: desired profit margin.\nDiscount: % of discount in price\nPrice: current price for the pie.\nPrice = (cost + markup) - discount\n\n', - `idPizzaProduct` INT NULL, - `pieSize` INT NULL, - `pizzaCode` VARCHAR(15) NULL, - `cost` DECIMAL(2) NULL, - `markup` DECIMAL(2) NULL, - `discount` DECIMAL(2) NULL, - `price` DECIMAL(2) NULL, - PRIMARY KEY (`idpizzaPriceList`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`Ingredients` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`Ingredients` ( - `idIngredients` INT NOT NULL AUTO_INCREMENT COMMENT 'Ingredients gives cost per ounce and weight of ingredients for each pie. This allows calculations of ingredient costs by size.\nSausage\nSmall pie = 4 oz\nMedium pie = 6 oz\nLarge pie = 12 oz\nExtraLarge', - `ingredientName` VARCHAR(45) NULL, - `costPerOz` DECIMAL(2) NULL, - `ozInSmall` DECIMAL(2) NULL, - `ozInMedium` DECIMAL(2) NULL, - `ozInLarge` DECIMAL(2) NULL, - `ozInExtraLarge` DECIMAL(2) NULL, - `idSupplier` VARCHAR(45) NULL, - `productSKU` VARCHAR(45) NULL, - PRIMARY KEY (`idIngredients`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`extraIngredientList` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`extraIngredientList` ( - `idaddOn` INT NOT NULL COMMENT 'Add on items for custom orders\n\n', - `ingredients` VARCHAR(45) NULL, - `Ingredients_idIngredients` INT NOT NULL, - PRIMARY KEY (`idaddOn`, `Ingredients_idIngredients`), - INDEX `fk_extraIngredientList_Ingredients1_idx` (`Ingredients_idIngredients` ASC), - CONSTRAINT `fk_extraIngredientList_Ingredients1` - FOREIGN KEY (`Ingredients_idIngredients`) - REFERENCES `PizzaPicadilly`.`Ingredients` (`idIngredients`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`order` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`order` ( - `idorder` INT NOT NULL, - `pizzaCode` INT NULL, - `productName` VARCHAR(45) NULL, - `idRecipe` VARCHAR(45) NULL, - `size` INT NULL, - `crustType` VARCHAR(45) NULL, - `customer_idCustomer` INT UNSIGNED NOT NULL, - `customer_user_idUserName` INT NOT NULL, - `customer_checkingAcct_idcheckingAcct` INT NOT NULL, - `customer_contact_idcontacts` INT UNSIGNED NOT NULL, - `idDeliveryAddress` INT NULL, - `idOtherProducts` INT NULL, - `quantity` INT NULL, - `deliveryAddress_idDelivery` INT NOT NULL, - `deliveryAddress_customer_idCustomer` INT UNSIGNED NOT NULL, - `deliveryAddress_customer_user_idUserName` INT NOT NULL, - `deliveryAddress_customer_checkingAcct_idcheckingAcct` INT NOT NULL, - `deliveryAddress_customer_contact_idcontacts` INT UNSIGNED NOT NULL, - `contact_idContact` INT UNSIGNED NOT NULL, - `paymentType_idpaymentType` INT NOT NULL, - `otherProduct_idotherProducts` INT NOT NULL, - `pizzaPriceList_idpizzaPriceList` INT NOT NULL, - `extraIngredientList_idaddOn` INT NOT NULL, - PRIMARY KEY (`idorder`, `customer_idCustomer`, `customer_user_idUserName`, `customer_checkingAcct_idcheckingAcct`, `customer_contact_idcontacts`, `deliveryAddress_idDelivery`, `deliveryAddress_customer_idCustomer`, `deliveryAddress_customer_user_idUserName`, `deliveryAddress_customer_checkingAcct_idcheckingAcct`, `deliveryAddress_customer_contact_idcontacts`, `contact_idContact`, `paymentType_idpaymentType`, `otherProduct_idotherProducts`, `pizzaPriceList_idpizzaPriceList`, `extraIngredientList_idaddOn`), - INDEX `fk_order_customer1_idx` (`customer_idCustomer` ASC, `customer_user_idUserName` ASC, `customer_checkingAcct_idcheckingAcct` ASC, `customer_contact_idcontacts` ASC), - INDEX `fk_order_deliveryAddress1_idx` (`deliveryAddress_idDelivery` ASC, `deliveryAddress_customer_idCustomer` ASC, `deliveryAddress_customer_user_idUserName` ASC, `deliveryAddress_customer_checkingAcct_idcheckingAcct` ASC, `deliveryAddress_customer_contact_idcontacts` ASC), - INDEX `fk_order_contact1_idx` (`contact_idContact` ASC), - INDEX `fk_order_paymentType1_idx` (`paymentType_idpaymentType` ASC), - INDEX `fk_order_otherProduct1_idx` (`otherProduct_idotherProducts` ASC), - INDEX `fk_order_pizzaPriceList1_idx` (`pizzaPriceList_idpizzaPriceList` ASC), - INDEX `fk_order_extraIngredientList1_idx` (`extraIngredientList_idaddOn` ASC), - CONSTRAINT `fk_order_customer1` - FOREIGN KEY (`customer_idCustomer` , `customer_user_idUserName` , `customer_checkingAcct_idcheckingAcct` , `customer_contact_idcontacts`) - REFERENCES `PizzaPicadilly`.`customer` (`idCustomer` , `user_idUserName` , `checkingAcct_idcheckingAcct` , `contact_idcontacts`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_order_deliveryAddress1` - FOREIGN KEY (`deliveryAddress_idDelivery` , `deliveryAddress_customer_idCustomer` , `deliveryAddress_customer_user_idUserName` , `deliveryAddress_customer_checkingAcct_idcheckingAcct` , `deliveryAddress_customer_contact_idcontacts`) - REFERENCES `PizzaPicadilly`.`deliveryAddress` (`idDelivery` , `customer_idCustomer` , `customer_user_idUserName` , `customer_checkingAcct_idcheckingAcct` , `customer_contact_idcontacts`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_order_contact1` - FOREIGN KEY (`contact_idContact`) - REFERENCES `PizzaPicadilly`.`contact` (`idContact`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_order_paymentType1` - FOREIGN KEY (`paymentType_idpaymentType`) - REFERENCES `PizzaPicadilly`.`paymentType` (`idpaymentType`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_order_otherProduct1` - FOREIGN KEY (`otherProduct_idotherProducts`) - REFERENCES `PizzaPicadilly`.`otherProduct` (`idotherProducts`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_order_pizzaPriceList1` - FOREIGN KEY (`pizzaPriceList_idpizzaPriceList`) - REFERENCES `PizzaPicadilly`.`pizzaPriceList` (`idpizzaPriceList`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_order_extraIngredientList1` - FOREIGN KEY (`extraIngredientList_idaddOn`) - REFERENCES `PizzaPicadilly`.`extraIngredientList` (`idaddOn`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`pieType` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`pieType` ( - `idpieType` INT NOT NULL COMMENT 'Deep dish\nThin crust\nCustom', - `pieType` VARCHAR(45) NULL COMMENT 'Standard\nCustom\nThin Crust\nDeep Dish\nGlutenFree\nWholeWheat\n\n', - `order_idorder` INT NOT NULL, - `order_customer_idCustomer` INT UNSIGNED NOT NULL, - `order_customer_user_idUserName` INT NOT NULL, - `order_customer_checkingAcct_idcheckingAcct` INT NOT NULL, - `order_customer_contact_idcontacts` INT UNSIGNED NOT NULL, - `order_deliveryAddress_idDelivery` INT NOT NULL, - `order_deliveryAddress_customer_idCustomer` INT UNSIGNED NOT NULL, - `order_deliveryAddress_customer_user_idUserName` INT NOT NULL, - `order_deliveryAddress_customer_checkingAcct_idcheckingAcct` INT NOT NULL, - `order_deliveryAddress_customer_contact_idcontacts` INT UNSIGNED NOT NULL, - `order_contact_idContact` INT UNSIGNED NOT NULL, - `order_paymentType_idpaymentType` INT NOT NULL, - `order_otherProduct_idotherProducts` INT NOT NULL, - PRIMARY KEY (`idpieType`, `order_idorder`, `order_customer_idCustomer`, `order_customer_user_idUserName`, `order_customer_checkingAcct_idcheckingAcct`, `order_customer_contact_idcontacts`, `order_deliveryAddress_idDelivery`, `order_deliveryAddress_customer_idCustomer`, `order_deliveryAddress_customer_user_idUserName`, `order_deliveryAddress_customer_checkingAcct_idcheckingAcct`, `order_deliveryAddress_customer_contact_idcontacts`, `order_contact_idContact`, `order_paymentType_idpaymentType`, `order_otherProduct_idotherProducts`), - INDEX `fk_pieType_order1_idx` (`order_idorder` ASC, `order_customer_idCustomer` ASC, `order_customer_user_idUserName` ASC, `order_customer_checkingAcct_idcheckingAcct` ASC, `order_customer_contact_idcontacts` ASC, `order_deliveryAddress_idDelivery` ASC, `order_deliveryAddress_customer_idCustomer` ASC, `order_deliveryAddress_customer_user_idUserName` ASC, `order_deliveryAddress_customer_checkingAcct_idcheckingAcct` ASC, `order_deliveryAddress_customer_contact_idcontacts` ASC, `order_contact_idContact` ASC, `order_paymentType_idpaymentType` ASC, `order_otherProduct_idotherProducts` ASC), - CONSTRAINT `fk_pieType_order1` - FOREIGN KEY (`order_idorder` , `order_customer_idCustomer` , `order_customer_user_idUserName` , `order_customer_checkingAcct_idcheckingAcct` , `order_customer_contact_idcontacts` , `order_deliveryAddress_idDelivery` , `order_deliveryAddress_customer_idCustomer` , `order_deliveryAddress_customer_user_idUserName` , `order_deliveryAddress_customer_checkingAcct_idcheckingAcct` , `order_deliveryAddress_customer_contact_idcontacts` , `order_contact_idContact` , `order_paymentType_idpaymentType` , `order_otherProduct_idotherProducts`) - REFERENCES `PizzaPicadilly`.`order` (`idorder` , `customer_idCustomer` , `customer_user_idUserName` , `customer_checkingAcct_idcheckingAcct` , `customer_contact_idcontacts` , `deliveryAddress_idDelivery` , `deliveryAddress_customer_idCustomer` , `deliveryAddress_customer_user_idUserName` , `deliveryAddress_customer_checkingAcct_idcheckingAcct` , `deliveryAddress_customer_contact_idcontacts` , `contact_idContact` , `paymentType_idpaymentType` , `otherProduct_idotherProducts`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`pizzaProduct` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`pizzaProduct` ( - `idpizzaProducts` INT NOT NULL AUTO_INCREMENT, - `pizzaName` VARCHAR(45) NULL, - `idRecipe` INT NULL, - `recipe_idRecipes` INT NOT NULL, - `pieType_idpieType` INT NOT NULL, - PRIMARY KEY (`idpizzaProducts`, `recipe_idRecipes`, `pieType_idpieType`), - UNIQUE INDEX `idpizzaProducts_UNIQUE` (`idpizzaProducts` ASC), - INDEX `fk_pizzaProduct_recipe1_idx` (`recipe_idRecipes` ASC), - INDEX `fk_pizzaProduct_pieType1_idx` (`pieType_idpieType` ASC), - CONSTRAINT `fk_pizzaProduct_recipe1` - FOREIGN KEY (`recipe_idRecipes`) - REFERENCES `PizzaPicadilly`.`recipe` (`idRecipes`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_pizzaProduct_pieType1` - FOREIGN KEY (`pieType_idpieType`) - REFERENCES `PizzaPicadilly`.`pieType` (`idpieType`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`creditCard` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`creditCard` ( - `idcreditCards` INT NOT NULL AUTO_INCREMENT, - `cardNumber` INT NOT NULL, - `cvvNumber` INT NULL, - `cardName` VARCHAR(45) NULL, - `billStreet` VARCHAR(45) NULL, - `billCity` VARCHAR(45) NULL, - `billState` VARCHAR(45) NULL, - `billZip` VARCHAR(45) NULL COMMENT 'TABLE IS ENCRYPTED\ncardNumber + idCustomer + ??', - `idCustomer` INT NOT NULL COMMENT 'FK', - `customer_idCustomer` INT UNSIGNED NOT NULL, - `customer_user_idUserName` INT NOT NULL, - PRIMARY KEY (`idcreditCards`, `customer_idCustomer`, `customer_user_idUserName`), - UNIQUE INDEX `idcreditCards_UNIQUE` (`idcreditCards` ASC), - INDEX `fk_creditCard_customer1_idx` (`customer_idCustomer` ASC, `customer_user_idUserName` ASC), - CONSTRAINT `fk_creditCard_customer1` - FOREIGN KEY (`customer_idCustomer` , `customer_user_idUserName`) - REFERENCES `PizzaPicadilly`.`customer` (`idCustomer` , `user_idUserName`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`productSupplier` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`productSupplier` ( - `idSupplier` INT NOT NULL AUTO_INCREMENT, - `supplierName` VARCHAR(45) NULL, - `idContact` VARCHAR(45) NULL, - `productSKU` VARCHAR(45) NULL, - PRIMARY KEY (`idSupplier`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`recipe_has_Ingredients` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`recipe_has_Ingredients` ( - `recipe_idRecipes` INT NOT NULL, - `Ingredients_idIngredients` INT NOT NULL, - PRIMARY KEY (`recipe_idRecipes`, `Ingredients_idIngredients`), - INDEX `fk_recipe_has_Ingredients_Ingredients1_idx` (`Ingredients_idIngredients` ASC), - INDEX `fk_recipe_has_Ingredients_recipe1_idx` (`recipe_idRecipes` ASC), - CONSTRAINT `fk_recipe_has_Ingredients_recipe1` - FOREIGN KEY (`recipe_idRecipes`) - REFERENCES `PizzaPicadilly`.`recipe` (`idRecipes`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_recipe_has_Ingredients_Ingredients1` - FOREIGN KEY (`Ingredients_idIngredients`) - REFERENCES `PizzaPicadilly`.`Ingredients` (`idIngredients`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`otherProductSupplier_has_otherProduct` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`otherProductSupplier_has_otherProduct` ( - `otherProductSupplier_idSupplier` INT NOT NULL, - `otherProduct_idotherProducts` INT NOT NULL, - `otherProductSupplier_has_otherProduct_otherProductSupplier_idSupplier` INT NOT NULL, - `otherProductSupplier_has_otherProduct_otherProduct_idotherProducts` INT NOT NULL, - PRIMARY KEY (`otherProductSupplier_idSupplier`, `otherProduct_idotherProducts`), - INDEX `fk_otherProductSupplier_has_otherProduct_otherProduct1_idx` (`otherProduct_idotherProducts` ASC), - INDEX `fk_otherProductSupplier_has_otherProduct_otherProductSuppli_idx` (`otherProductSupplier_idSupplier` ASC), - INDEX `fk_otherProductSupplier_has_otherProduct_otherProductSuppli_idx1` (`otherProductSupplier_has_otherProduct_otherProductSupplier_idSupplier` ASC, `otherProductSupplier_has_otherProduct_otherProduct_idotherProducts` ASC), - CONSTRAINT `fk_otherProductSupplier_has_otherProduct_otherProductSupplier1` - FOREIGN KEY (`otherProductSupplier_idSupplier`) - REFERENCES `PizzaPicadilly`.`productSupplier` (`idSupplier`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_otherProductSupplier_has_otherProduct_otherProduct1` - FOREIGN KEY (`otherProduct_idotherProducts`) - REFERENCES `PizzaPicadilly`.`otherProduct` (`idotherProducts`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_otherProductSupplier_has_otherProduct_otherProductSupplier2` - FOREIGN KEY (`otherProductSupplier_has_otherProduct_otherProductSupplier_idSupplier` , `otherProductSupplier_has_otherProduct_otherProduct_idotherProducts`) - REFERENCES `PizzaPicadilly`.`otherProductSupplier_has_otherProduct` (`otherProductSupplier_idSupplier` , `otherProduct_idotherProducts`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`productSupplier_has_Ingredients` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`productSupplier_has_Ingredients` ( - `productSupplier_idSupplier` INT NOT NULL, - `Ingredients_idIngredients` INT NOT NULL, - PRIMARY KEY (`productSupplier_idSupplier`, `Ingredients_idIngredients`), - INDEX `fk_productSupplier_has_Ingredients_Ingredients1_idx` (`Ingredients_idIngredients` ASC), - INDEX `fk_productSupplier_has_Ingredients_productSupplier1_idx` (`productSupplier_idSupplier` ASC), - CONSTRAINT `fk_productSupplier_has_Ingredients_productSupplier1` - FOREIGN KEY (`productSupplier_idSupplier`) - REFERENCES `PizzaPicadilly`.`productSupplier` (`idSupplier`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_productSupplier_has_Ingredients_Ingredients1` - FOREIGN KEY (`Ingredients_idIngredients`) - REFERENCES `PizzaPicadilly`.`Ingredients` (`idIngredients`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`stateSalesTax` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`stateSalesTax` ( - `idstateTax` INT NOT NULL AUTO_INCREMENT COMMENT 'The stateSalesTax table contains a list of all states in the company’s service area. Available information includes:\nState Name\nState Abbreviation\nSales Tax Rate', - `stateName` VARCHAR(45) NULL, - `stateAbbeviation` VARCHAR(2) NULL, - `taxRate` DECIMAL(2) NULL, - PRIMARY KEY (`idstateTax`)) -ENGINE = InnoDB; - -USE `PizzaPicadilly` ; - --- ----------------------------------------------------- --- Placeholder table for view `PizzaPicadilly`.`view1` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`view1` (`id` INT); - --- ----------------------------------------------------- --- View `PizzaPicadilly`.`view1` --- ----------------------------------------------------- -DROP TABLE IF EXISTS `PizzaPicadilly`.`view1`; -USE `PizzaPicadilly`; - - -SET SQL_MODE=@OLD_SQL_MODE; -SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; -SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; diff --git a/SQL support files/98-Pizzas170518.mwb b/SQL support files/98-Pizzas170518.mwb deleted file mode 100644 index d2abef3..0000000 Binary files a/SQL support files/98-Pizzas170518.mwb and /dev/null differ diff --git a/SQL support files/98-Pizzas170518.mwb 2.mwb b/SQL support files/98-Pizzas170518.mwb 2.mwb deleted file mode 100644 index cf19a56..0000000 Binary files a/SQL support files/98-Pizzas170518.mwb 2.mwb and /dev/null differ diff --git a/SQL support files/98-Pizzas170518.mwb 3.mwb b/SQL support files/98-Pizzas170518.mwb 3.mwb deleted file mode 100644 index 3976134..0000000 Binary files a/SQL support files/98-Pizzas170518.mwb 3.mwb and /dev/null differ diff --git a/SQL support files/98-Pizzas170518.mwb 4.mwb b/SQL support files/98-Pizzas170518.mwb 4.mwb deleted file mode 100644 index 0669c16..0000000 Binary files a/SQL support files/98-Pizzas170518.mwb 4.mwb and /dev/null differ diff --git a/SQL support files/98-Pizzas170518.mwb 5.mwb b/SQL support files/98-Pizzas170518.mwb 5.mwb deleted file mode 100644 index 043113e..0000000 Binary files a/SQL support files/98-Pizzas170518.mwb 5.mwb and /dev/null differ diff --git a/SQL support files/98-Pizzas170518.mwb 6.mwb b/SQL support files/98-Pizzas170518.mwb 6.mwb deleted file mode 100644 index a30999b..0000000 Binary files a/SQL support files/98-Pizzas170518.mwb 6.mwb and /dev/null differ diff --git a/SQL support files/98-Pizzas170518.mwb 7.mwb b/SQL support files/98-Pizzas170518.mwb 7.mwb deleted file mode 100644 index b8bf8bc..0000000 Binary files a/SQL support files/98-Pizzas170518.mwb 7.mwb and /dev/null differ diff --git a/SQL support files/98-Pizzas170518.mwb.bak b/SQL support files/98-Pizzas170518.mwb.bak deleted file mode 100644 index 169810b..0000000 Binary files a/SQL support files/98-Pizzas170518.mwb.bak and /dev/null differ diff --git a/SQL support files/98-Pizzas170518.mwb.mwb b/SQL support files/98-Pizzas170518.mwb.mwb deleted file mode 100644 index ab192f9..0000000 Binary files a/SQL support files/98-Pizzas170518.mwb.mwb and /dev/null differ diff --git a/SQL support files/98-pizza170518.sql b/SQL support files/98-pizza170518.sql deleted file mode 100644 index 9caa0fa..0000000 --- a/SQL support files/98-pizza170518.sql +++ /dev/null @@ -1,519 +0,0 @@ --- MySQL Script generated by MySQL Workbench --- Thu May 18 12:36:35 2017 --- Model: New Model Version: 1.0 --- MySQL Workbench Forward Engineering - -SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; -SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; -SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; - --- ----------------------------------------------------- --- Schema PizzaPicadilly --- ----------------------------------------------------- --- 98-Pizza Shop exercise - --- ----------------------------------------------------- --- Schema PizzaPicadilly --- --- 98-Pizza Shop exercise --- ----------------------------------------------------- -CREATE SCHEMA IF NOT EXISTS `PizzaPicadilly` DEFAULT CHARACTER SET utf8 ; -USE `PizzaPicadilly` ; - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`checkingAcct` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`checkingAcct` ( - `idcheckingAcct` INT NOT NULL AUTO_INCREMENT, - `bankNumber` INT NOT NULL COMMENT 'Bank routing', - `acctNumber` INT NULL, - `acctHolderName` VARCHAR(45) NULL, - `acctStreet` VARCHAR(45) NULL, - `acctCity` VARCHAR(45) NULL, - `acctState` VARCHAR(45) NULL, - `acctZip` VARCHAR(45) NULL, - `idCustomer` INT NOT NULL COMMENT 'FK', - PRIMARY KEY (`idcheckingAcct`), - UNIQUE INDEX `idcreditCards_UNIQUE` (`idcheckingAcct` ASC)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`contact` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`contact` ( - `idContact` INT UNSIGNED NOT NULL, - `contactType` INT NULL COMMENT 'Customer\nManufacturer\nSupplier\n', - `contactStreet1` VARCHAR(45) NULL, - `contactStreet2` VARCHAR(45) NULL, - `contactCity` VARCHAR(45) NULL, - `contactState` VARCHAR(2) NULL, - `contactZip` VARCHAR(5) NULL, - `contactPhone1` VARCHAR(45) NULL, - `contactPhone2` VARCHAR(45) NULL, - `contactEmail` VARCHAR(45) NULL, - `idCustomer` INT NULL COMMENT 'FK mutually excludes supplierID and manufacturerID\n', - `supplierID` INT NULL COMMENT 'FK mutually excludes cutomerID and manufacturerID\n', - `website` VARCHAR(45) NULL, - PRIMARY KEY (`idContact`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`CustomerProfile` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`CustomerProfile` ( - `idCustomerProfile` INT NOT NULL, - `CustomerProfilecol` VARCHAR(45) NULL COMMENT 'Preferrences section\n', - PRIMARY KEY (`idCustomerProfile`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`customer` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`customer` ( - `idCustomer` INT NOT NULL AUTO_INCREMENT, - `customerName` VARCHAR(45) NULL, - `creditCard1ID` INT NULL COMMENT 'Security concern: Should be random number using some form of encryption for credit card number and security digits\n4 for Amex\n3 for others.', - `creditCard2ID` INT NULL COMMENT 'Security concern: Should be random number using some form of encryption for credit card number and security digits\n4 for Amex\n3 for others.', - `creditCard3ID` INT NULL, - `checkingAcctID` VARCHAR(45) NULL, - `checkingAcct_idcheckingAcct` INT NOT NULL, - `contact_idcontacts` INT UNSIGNED NOT NULL, - `CustomerProfile_idCustomerProfile` INT NOT NULL, - `email` VARCHAR(45) NULL, - `password` VARCHAR(45) NULL, - `createDateTime` DATETIME NULL, - PRIMARY KEY (`idCustomer`, `checkingAcct_idcheckingAcct`, `contact_idcontacts`, `CustomerProfile_idCustomerProfile`), - UNIQUE INDEX `idCustomer_UNIQUE` (`idCustomer` ASC), - UNIQUE INDEX `creditCard1ID_UNIQUE` (`creditCard1ID` ASC), - UNIQUE INDEX `creditCard2ID_UNIQUE` (`creditCard2ID` ASC), - UNIQUE INDEX `creditCard3ID_UNIQUE` (`creditCard3ID` ASC), - UNIQUE INDEX `checkingAcctID_UNIQUE` (`checkingAcctID` ASC), - INDEX `fk_customer_checkingAcct1_idx` (`checkingAcct_idcheckingAcct` ASC), - INDEX `fk_customer_contact1_idx` (`contact_idcontacts` ASC), - INDEX `fk_customer_CustomerProfile1_idx` (`CustomerProfile_idCustomerProfile` ASC), - CONSTRAINT `fk_customer_checkingAcct1` - FOREIGN KEY (`checkingAcct_idcheckingAcct`) - REFERENCES `PizzaPicadilly`.`checkingAcct` (`idcheckingAcct`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_customer_contact1` - FOREIGN KEY (`contact_idcontacts`) - REFERENCES `PizzaPicadilly`.`contact` (`idContact`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_customer_CustomerProfile1` - FOREIGN KEY (`CustomerProfile_idCustomerProfile`) - REFERENCES `PizzaPicadilly`.`CustomerProfile` (`idCustomerProfile`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`otherProduct` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`otherProduct` ( - `idotherProduct` INT NOT NULL AUTO_INCREMENT COMMENT ' a product ID\n drink description\n manufacturer\n supplier\n price\n', - `productType` VARCHAR(45) NULL COMMENT 'Beverage\nPastry\nIce cream\n', - `productName` VARCHAR(45) NULL, - `Description` VARCHAR(45) NULL, - `Brand` VARCHAR(45) NULL, - `idSupplier` VARCHAR(45) NULL, - `barCode` VARCHAR(45) NULL COMMENT 'Product Code is bar code or some other alpha/numeric descriptor', - `productSKU` VARCHAR(45) NULL COMMENT 'Business', - `manufacturerName` VARCHAR(45) NULL, - `idSeason` INT NULL, - PRIMARY KEY (`idotherProduct`), - UNIQUE INDEX `idotherProducts_UNIQUE` (`idotherProduct` ASC)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`recipe` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`recipe` ( - `idRecipes` INT NOT NULL AUTO_INCREMENT COMMENT 'Recipes are the basic ingredients that make up a particular product. It establishes base cost for the pies.\n\nWe can choose to increase price based on cost or increase ingredients according to size.\n\nEach order is comprised of a specific recipe. \n\nData structure:\ningredientName[idIngredient],ozForSmall,ozForMedium,ozForLarge,ozForExtraLarge\n', - `pizzaName` VARCHAR(45) NOT NULL COMMENT 'FK\n', - `crustStandard` VARCHAR(45) NULL COMMENT 'Picklist of crusts\nSt', - `cheeseType` VARCHAR(45) NULL, - `ingredient1` VARCHAR(255) NULL, - `ingredient2` VARCHAR(45) NULL, - `ingredient3` VARCHAR(45) NULL, - `ingredient4` VARCHAR(45) NULL, - `ingredient5` VARCHAR(45) NULL, - `ingredient6` VARCHAR(45) NULL, - `ingredient7` VARCHAR(45) NULL, - `ingredient8` VARCHAR(45) NULL, - `ingredient9` VARCHAR(45) NULL, - `ingredient10` VARCHAR(45) NULL, - PRIMARY KEY (`idRecipes`), - UNIQUE INDEX `idRecipes_UNIQUE` (`idRecipes` ASC)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`deliveryAddress` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`deliveryAddress` ( - `idDelivery` INT NOT NULL AUTO_INCREMENT, - `deliveryStreet1` VARCHAR(45) NULL, - `deliveryStreet2` VARCHAR(45) NULL, - `deliveryCity` VARCHAR(45) NULL, - `deliveryState` VARCHAR(2) NULL, - `deliveryZip` VARCHAR(5) NULL, - `deliveryPhone1` VARCHAR(45) NULL, - `deliveryPhone2` VARCHAR(45) NULL, - `idCustomer` INT NULL COMMENT 'FK \n', - PRIMARY KEY (`idDelivery`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`paymentType` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`paymentType` ( - `idpaymentType` INT NOT NULL, - `paymentType` VARCHAR(45) NULL, - `idCustomer` INT NULL COMMENT 'Cash\nCheck\nCredit Card\nGift Card\nCoupon\n\n', - PRIMARY KEY (`idpaymentType`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`pizzaPriceList` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`pizzaPriceList` ( - `idpizzaPriceList` INT NOT NULL AUTO_INCREMENT COMMENT 'Price list establishes pricing for each configuration of pies.\n\nEach pie size has differing amounts of ingredients that affect price.\n\npizzaCode uniquely identifies pieSize + recipe.\n\nDo we include a percentage increase in cost to cover more ingredients?\n\nField descriptions:\n\nidPiaaPriceList\nidPizzaProduct\npieSize\npizzaCode: unique code for pizza product + size\nCost: base code of this pie in this size\nMarkup: desired profit margin.\nDiscount: % of discount in price\nPrice: current price for the pie.\nPrice = (cost + markup) - discount\n\n', - `idPizzaProduct` INT NULL, - `pieSize` INT NULL, - `pizzaCode` VARCHAR(15) NULL, - `cost` DECIMAL(3,2) NULL, - `markup` DECIMAL(3,2) NULL, - `discount` DECIMAL(3,2) NULL COMMENT 'Happy Hour discount column allows for separate discount of happy hour menu items. This allows for specific pies to be discounted further or for a different time period. Convenience feature for the owners.', - `price` DECIMAL(3,2) NULL, - `discountHappyHour` DECIMAL(3,2) NULL, - PRIMARY KEY (`idpizzaPriceList`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`Ingredient` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`Ingredient` ( - `idIngredients` INT NOT NULL AUTO_INCREMENT COMMENT 'Ingredients gives cost per ounce and weight of ingredients for each pie. This allows calculations of ingredient costs by size.\nSausage\nSmall pie = 4 oz\nMedium pie = 6 oz\nLarge pie = 12 oz\nExtraLarge', - `ingredientName` VARCHAR(45) NULL, - `costPerOz` DECIMAL(2) NULL, - `ozInSmall` DECIMAL(2) NULL, - `ozInMedium` DECIMAL(2) NULL, - `ozInLarge` DECIMAL(2) NULL, - `ozInExtraLarge` DECIMAL(2) NULL, - `idSupplier` VARCHAR(45) NULL, - `productSKU` VARCHAR(45) NULL, - PRIMARY KEY (`idIngredients`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`orderExtraIngredientList` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`orderExtraIngredientList` ( - `idExtraIngredient` INT NOT NULL AUTO_INCREMENT COMMENT 'Add on items for custom orders\n\nWhen a customer orders extra ingredients the system looksup the ingredient on ingredient.extraOz multiplies that value by pizzaPriceList.markup for the relevant pizzaProduct and adds that price as a line item in the order.\n\n\n', - `ingredients` VARCHAR(255) NULL COMMENT 'Multivalue list\nTied to order id?\n', - `Ingredients_idIngredient` INT NOT NULL, - PRIMARY KEY (`idExtraIngredient`, `Ingredients_idIngredient`), - INDEX `fk_extraIngredientList_Ingredients1_idx` (`Ingredients_idIngredient` ASC), - CONSTRAINT `fk_extraIngredientList_Ingredients1` - FOREIGN KEY (`Ingredients_idIngredient`) - REFERENCES `PizzaPicadilly`.`Ingredient` (`idIngredients`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`order` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`order` ( - `idorder` INT NOT NULL, - `pizzaCode` INT NULL, - `productName` VARCHAR(45) NULL, - `idRecipe` VARCHAR(45) NULL, - `size` INT NULL, - `crustType` VARCHAR(45) NULL, - `customer_idCustomer` INT UNSIGNED NOT NULL, - `customer_user_idUserName` INT NOT NULL, - `customer_checkingAcct_idcheckingAcct` INT NOT NULL, - `customer_contact_idcontact` INT UNSIGNED NOT NULL, - `idDeliveryAddress` INT NULL, - `idOtherProduct` INT NULL, - `quantity` INT NULL, - `deliveryAddress_idDelivery` INT NOT NULL, - `deliveryAddress_customer_idCustomer` INT UNSIGNED NOT NULL, - `deliveryAddress_customer_user_idUserName` INT NOT NULL, - `deliveryAddress_customer_checkingAcct_idcheckingAcct` INT NOT NULL, - `deliveryAddress_customer_contact_idcontact` INT UNSIGNED NOT NULL, - `contact_idContact` INT UNSIGNED NOT NULL, - `paymentType_idpaymentType` INT NOT NULL, - `otherProduct_idotherProduct` INT NOT NULL, - `pizzaPriceList_idpizzaPriceList` INT NOT NULL, - `extraIngredientList_idExtraIngredient` INT NOT NULL, - PRIMARY KEY (`idorder`, `customer_idCustomer`, `customer_user_idUserName`, `customer_checkingAcct_idcheckingAcct`, `customer_contact_idcontact`, `deliveryAddress_idDelivery`, `deliveryAddress_customer_idCustomer`, `deliveryAddress_customer_user_idUserName`, `deliveryAddress_customer_checkingAcct_idcheckingAcct`, `deliveryAddress_customer_contact_idcontact`, `contact_idContact`, `paymentType_idpaymentType`, `otherProduct_idotherProduct`, `pizzaPriceList_idpizzaPriceList`, `extraIngredientList_idExtraIngredient`), - INDEX `fk_order_customer1_idx` (`customer_idCustomer` ASC, `customer_user_idUserName` ASC, `customer_checkingAcct_idcheckingAcct` ASC, `customer_contact_idcontact` ASC), - INDEX `fk_order_deliveryAddress1_idx` (`deliveryAddress_idDelivery` ASC, `deliveryAddress_customer_idCustomer` ASC, `deliveryAddress_customer_user_idUserName` ASC, `deliveryAddress_customer_checkingAcct_idcheckingAcct` ASC, `deliveryAddress_customer_contact_idcontact` ASC), - INDEX `fk_order_contact1_idx` (`contact_idContact` ASC), - INDEX `fk_order_paymentType1_idx` (`paymentType_idpaymentType` ASC), - INDEX `fk_order_otherProduct1_idx` (`otherProduct_idotherProduct` ASC), - INDEX `fk_order_pizzaPriceList1_idx` (`pizzaPriceList_idpizzaPriceList` ASC), - INDEX `fk_order_extraIngredientList1_idx` (`extraIngredientList_idExtraIngredient` ASC), - CONSTRAINT `fk_order_customer1` - FOREIGN KEY (`customer_idCustomer` , `customer_checkingAcct_idcheckingAcct` , `customer_contact_idcontact`) - REFERENCES `PizzaPicadilly`.`customer` (`idCustomer` , `checkingAcct_idcheckingAcct` , `contact_idcontacts`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_order_deliveryAddress1` - FOREIGN KEY (`deliveryAddress_idDelivery`) - REFERENCES `PizzaPicadilly`.`deliveryAddress` (`idDelivery`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_order_contact1` - FOREIGN KEY (`contact_idContact`) - REFERENCES `PizzaPicadilly`.`contact` (`idContact`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_order_paymentType1` - FOREIGN KEY (`paymentType_idpaymentType`) - REFERENCES `PizzaPicadilly`.`paymentType` (`idpaymentType`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_order_otherProduct1` - FOREIGN KEY (`otherProduct_idotherProduct`) - REFERENCES `PizzaPicadilly`.`otherProduct` (`idotherProduct`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_order_pizzaPriceList1` - FOREIGN KEY (`pizzaPriceList_idpizzaPriceList`) - REFERENCES `PizzaPicadilly`.`pizzaPriceList` (`idpizzaPriceList`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_order_extraIngredientList1` - FOREIGN KEY (`extraIngredientList_idExtraIngredient`) - REFERENCES `PizzaPicadilly`.`orderExtraIngredientList` (`idExtraIngredient`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`pieType` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`pieType` ( - `idpieType` INT NOT NULL COMMENT 'Deep dish\nThin crust\nCustom', - `pieTypeName` VARCHAR(45) NULL COMMENT 'Standard\nCustom\nThin Crust\nDeep Dish\nGlutenFree\nWholeWheat\n\n', - `pieTypeDescription` VARCHAR(255) NULL, - `order_idorder` INT NOT NULL, - `order_customer_idCustomer` INT UNSIGNED NOT NULL, - `order_customer_user_idUserName` INT NOT NULL, - `order_customer_checkingAcct_idcheckingAcct` INT NOT NULL, - `order_customer_contact_idcontacts` INT UNSIGNED NOT NULL, - `order_deliveryAddress_idDelivery` INT NOT NULL, - `order_deliveryAddress_customer_idCustomer` INT UNSIGNED NOT NULL, - `order_deliveryAddress_customer_user_idUserName` INT NOT NULL, - `order_deliveryAddress_customer_checkingAcct_idcheckingAcct` INT NOT NULL, - `order_deliveryAddress_customer_contact_idcontacts` INT UNSIGNED NOT NULL, - `order_contact_idContact` INT UNSIGNED NOT NULL, - `order_paymentType_idpaymentType` INT NOT NULL, - `order_otherProduct_idotherProducts` INT NOT NULL, - PRIMARY KEY (`idpieType`, `order_idorder`, `order_customer_idCustomer`, `order_customer_user_idUserName`, `order_customer_checkingAcct_idcheckingAcct`, `order_customer_contact_idcontacts`, `order_deliveryAddress_idDelivery`, `order_deliveryAddress_customer_idCustomer`, `order_deliveryAddress_customer_user_idUserName`, `order_deliveryAddress_customer_checkingAcct_idcheckingAcct`, `order_deliveryAddress_customer_contact_idcontacts`, `order_contact_idContact`, `order_paymentType_idpaymentType`, `order_otherProduct_idotherProducts`), - INDEX `fk_pieType_order1_idx` (`order_idorder` ASC, `order_customer_idCustomer` ASC, `order_customer_user_idUserName` ASC, `order_customer_checkingAcct_idcheckingAcct` ASC, `order_customer_contact_idcontacts` ASC, `order_deliveryAddress_idDelivery` ASC, `order_deliveryAddress_customer_idCustomer` ASC, `order_deliveryAddress_customer_user_idUserName` ASC, `order_deliveryAddress_customer_checkingAcct_idcheckingAcct` ASC, `order_deliveryAddress_customer_contact_idcontacts` ASC, `order_contact_idContact` ASC, `order_paymentType_idpaymentType` ASC, `order_otherProduct_idotherProducts` ASC), - CONSTRAINT `fk_pieType_order1` - FOREIGN KEY (`order_idorder` , `order_customer_idCustomer` , `order_customer_user_idUserName` , `order_customer_checkingAcct_idcheckingAcct` , `order_customer_contact_idcontacts` , `order_deliveryAddress_idDelivery` , `order_deliveryAddress_customer_idCustomer` , `order_deliveryAddress_customer_user_idUserName` , `order_deliveryAddress_customer_checkingAcct_idcheckingAcct` , `order_deliveryAddress_customer_contact_idcontacts` , `order_contact_idContact` , `order_paymentType_idpaymentType` , `order_otherProduct_idotherProducts`) - REFERENCES `PizzaPicadilly`.`order` (`idorder` , `customer_idCustomer` , `customer_user_idUserName` , `customer_checkingAcct_idcheckingAcct` , `customer_contact_idcontact` , `deliveryAddress_idDelivery` , `deliveryAddress_customer_idCustomer` , `deliveryAddress_customer_user_idUserName` , `deliveryAddress_customer_checkingAcct_idcheckingAcct` , `deliveryAddress_customer_contact_idcontact` , `contact_idContact` , `paymentType_idpaymentType` , `otherProduct_idotherProduct`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`pizzaProduct` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`pizzaProduct` ( - `idpizzaProducts` INT NOT NULL AUTO_INCREMENT, - `pizzaName` VARCHAR(45) NULL, - `idRecipe` INT NULL, - `recipe_idRecipes` INT NOT NULL, - `pieType_idpieType` INT NOT NULL, - `idSeason` INT NULL COMMENT 'idSeason is the unique identifier for the season when this pie is available.', - PRIMARY KEY (`idpizzaProducts`, `recipe_idRecipes`, `pieType_idpieType`), - UNIQUE INDEX `idpizzaProducts_UNIQUE` (`idpizzaProducts` ASC), - INDEX `fk_pizzaProduct_recipe1_idx` (`recipe_idRecipes` ASC), - INDEX `fk_pizzaProduct_pieType1_idx` (`pieType_idpieType` ASC), - CONSTRAINT `fk_pizzaProduct_recipe1` - FOREIGN KEY (`recipe_idRecipes`) - REFERENCES `PizzaPicadilly`.`recipe` (`idRecipes`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_pizzaProduct_pieType1` - FOREIGN KEY (`pieType_idpieType`) - REFERENCES `PizzaPicadilly`.`pieType` (`idpieType`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`creditCard` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`creditCard` ( - `idcreditCard` INT NOT NULL AUTO_INCREMENT, - `creditCardCompany` VARCHAR(45) NULL, - `cardIssuer` VARCHAR(45) NULL, - `cardNumber` INT NOT NULL, - `cvvNumber` INT NULL, - `nameOnCard` VARCHAR(45) NULL, - `billStreet` VARCHAR(45) NULL, - `billCity` VARCHAR(45) NULL, - `billState` VARCHAR(45) NULL, - `billZip` VARCHAR(45) NULL COMMENT 'TABLE IS ENCRYPTED\ncardNumber + idCustomer + ??', - `idCustomer` INT NOT NULL COMMENT 'FK', - `customer_idCustomer` INT UNSIGNED NOT NULL, - `customer_user_idUserName` INT NOT NULL, - PRIMARY KEY (`idcreditCard`, `customer_idCustomer`, `customer_user_idUserName`), - UNIQUE INDEX `idcreditCards_UNIQUE` (`idcreditCard` ASC), - INDEX `fk_creditCard_customer1_idx` (`customer_idCustomer` ASC, `customer_user_idUserName` ASC), - CONSTRAINT `fk_creditCard_customer1` - FOREIGN KEY (`customer_idCustomer`) - REFERENCES `PizzaPicadilly`.`customer` (`idCustomer`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`productSupplier` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`productSupplier` ( - `idSupplier` INT NOT NULL AUTO_INCREMENT, - `supplierName` VARCHAR(45) NULL, - `idContact` VARCHAR(45) NULL, - `productSKU` VARCHAR(45) NULL, - PRIMARY KEY (`idSupplier`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`recipe_has_Ingredients` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`recipe_has_Ingredients` ( - `recipe_idRecipes` INT NOT NULL, - `Ingredients_idIngredients` INT NOT NULL, - PRIMARY KEY (`recipe_idRecipes`, `Ingredients_idIngredients`), - INDEX `fk_recipe_has_Ingredients_Ingredients1_idx` (`Ingredients_idIngredients` ASC), - INDEX `fk_recipe_has_Ingredients_recipe1_idx` (`recipe_idRecipes` ASC), - CONSTRAINT `fk_recipe_has_Ingredients_recipe1` - FOREIGN KEY (`recipe_idRecipes`) - REFERENCES `PizzaPicadilly`.`recipe` (`idRecipes`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_recipe_has_Ingredients_Ingredients1` - FOREIGN KEY (`Ingredients_idIngredients`) - REFERENCES `PizzaPicadilly`.`Ingredient` (`idIngredients`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`otherProductSupplier_has_otherProduct` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`otherProductSupplier_has_otherProduct` ( - `otherProductSupplier_idSupplier` INT NOT NULL, - `otherProduct_idotherProduct` INT NOT NULL, - `otherProductSupplier_has_otherProduct_otherProductSupplier_idSupplier` INT NOT NULL, - `otherProductSupplier_has_otherProduct_otherProduct_idotherProduct` INT NOT NULL, - PRIMARY KEY (`otherProductSupplier_idSupplier`, `otherProduct_idotherProduct`), - INDEX `fk_otherProductSupplier_has_otherProduct_otherProduct1_idx` (`otherProduct_idotherProduct` ASC), - INDEX `fk_otherProductSupplier_has_otherProduct_otherProductSuppli_idx` (`otherProductSupplier_idSupplier` ASC), - INDEX `fk_otherProductSupplier_has_otherProduct_otherProductSuppli_idx1` (`otherProductSupplier_has_otherProduct_otherProductSupplier_idSupplier` ASC, `otherProductSupplier_has_otherProduct_otherProduct_idotherProduct` ASC), - CONSTRAINT `fk_otherProductSupplier_has_otherProduct_otherProductSupplier1` - FOREIGN KEY (`otherProductSupplier_idSupplier`) - REFERENCES `PizzaPicadilly`.`productSupplier` (`idSupplier`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_otherProductSupplier_has_otherProduct_otherProduct1` - FOREIGN KEY (`otherProduct_idotherProduct`) - REFERENCES `PizzaPicadilly`.`otherProduct` (`idotherProduct`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_otherProductSupplier_has_otherProduct_otherProductSupplier2` - FOREIGN KEY (`otherProductSupplier_has_otherProduct_otherProductSupplier_idSupplier` , `otherProductSupplier_has_otherProduct_otherProduct_idotherProduct`) - REFERENCES `PizzaPicadilly`.`otherProductSupplier_has_otherProduct` (`otherProductSupplier_idSupplier` , `otherProduct_idotherProduct`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`productSupplier_has_Ingredients` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`productSupplier_has_Ingredients` ( - `productSupplier_idSupplier` INT NOT NULL, - `Ingredients_idIngredients` INT NOT NULL, - PRIMARY KEY (`productSupplier_idSupplier`, `Ingredients_idIngredients`), - INDEX `fk_productSupplier_has_Ingredients_Ingredients1_idx` (`Ingredients_idIngredients` ASC), - INDEX `fk_productSupplier_has_Ingredients_productSupplier1_idx` (`productSupplier_idSupplier` ASC), - CONSTRAINT `fk_productSupplier_has_Ingredients_productSupplier1` - FOREIGN KEY (`productSupplier_idSupplier`) - REFERENCES `PizzaPicadilly`.`productSupplier` (`idSupplier`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_productSupplier_has_Ingredients_Ingredients1` - FOREIGN KEY (`Ingredients_idIngredients`) - REFERENCES `PizzaPicadilly`.`Ingredient` (`idIngredients`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`stateSalesTax` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`stateSalesTax` ( - `idstateTax` INT NOT NULL AUTO_INCREMENT COMMENT 'The stateSalesTax table contains a list of all states in the company’s service area. Available information includes:\nState Name\nState Abbreviation\nSales Tax Rate', - `stateName` VARCHAR(45) NULL, - `stateAbbeviation` VARCHAR(2) NULL, - `taxRate` DECIMAL(2) NULL, - PRIMARY KEY (`idstateTax`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`season` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`season` ( - `idseason` INT NOT NULL COMMENT 'Season table holds information about seasonal pizzas. Not all ingredients are available year round. System will suppress item from menu if out of season.\n\nControlled by start and end date. Year round products have start date of Jan 1 end date of dec 31 as defaults.\n', - `seasonName` VARCHAR(45) NULL, - `seasonStartDate` DATE NULL DEFAULT January 1, - `seasonEndDate` DATE NULL DEFAULT Decmber 31, - PRIMARY KEY (`idseason`)) -ENGINE = InnoDB; - -USE `PizzaPicadilly` ; - --- ----------------------------------------------------- --- Placeholder table for view `PizzaPicadilly`.`view1` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`view1` (`id` INT); - --- ----------------------------------------------------- --- View `PizzaPicadilly`.`view1` --- ----------------------------------------------------- -DROP TABLE IF EXISTS `PizzaPicadilly`.`view1`; -USE `PizzaPicadilly`; - - -SET SQL_MODE=@OLD_SQL_MODE; -SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; -SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; diff --git a/SQL support files/Untitled Diagram.xml b/SQL support files/Untitled Diagram.xml deleted file mode 100644 index 2e01678..0000000 --- a/SQL support files/Untitled Diagram.xml +++ /dev/null @@ -1 +0,0 @@ -UzV2zq1wL0osyPDNT0nNUTV2VTV2LsrPL4GwciucU3NyVI0MMlNUjV1UjYwMgFjVyA2HrCFY1qAgsSg1rwSLBiADYTaQg2Y1AA== \ No newline at end of file diff --git a/SQL support files/Untitled.sql b/SQL support files/Untitled.sql deleted file mode 100644 index 1df9ae9..0000000 --- a/SQL support files/Untitled.sql +++ /dev/null @@ -1,550 +0,0 @@ --- MySQL Script generated by MySQL Workbench --- Thu May 18 10:39:06 2017 --- Model: New Model Version: 1.0 --- MySQL Workbench Forward Engineering - -SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; -SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; -SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES'; - --- ----------------------------------------------------- --- Schema PizzaPicadilly --- ----------------------------------------------------- --- 98-Pizza Shop exercise - --- ----------------------------------------------------- --- Schema PizzaPicadilly --- --- 98-Pizza Shop exercise --- ----------------------------------------------------- -CREATE SCHEMA IF NOT EXISTS `PizzaPicadilly` DEFAULT CHARACTER SET utf8 ; -USE `PizzaPicadilly` ; - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`user` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`user` ( - `idUserName` INT NOT NULL AUTO_INCREMENT, - `idCustomer` INT NULL, - `username` VARCHAR(16) NOT NULL, - `email` VARCHAR(255) NULL, - `password` VARCHAR(32) NOT NULL, - `create_time` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP, - PRIMARY KEY (`idUserName`)); - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`checkingAcct` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`checkingAcct` ( - `idcheckingAcct` INT NOT NULL AUTO_INCREMENT, - `bankNumber` INT NOT NULL COMMENT 'Bank routing', - `acctNumber` INT NULL, - `acctHolderName` VARCHAR(45) NULL, - `acctStreet` VARCHAR(45) NULL, - `acctCity` VARCHAR(45) NULL, - `acctState` VARCHAR(45) NULL, - `acctZip` VARCHAR(45) NULL, - `idCustomer` INT NOT NULL COMMENT 'FK', - PRIMARY KEY (`idcheckingAcct`), - UNIQUE INDEX `idcreditCards_UNIQUE` (`idcheckingAcct` ASC)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`contact` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`contact` ( - `idContact` INT UNSIGNED NOT NULL, - `contactType` INT NULL COMMENT 'Customer\nManufacturer\nSupplier\n', - `contactStreet1` VARCHAR(45) NULL, - `contactStreet2` VARCHAR(45) NULL, - `contactCity` VARCHAR(45) NULL, - `contactState` VARCHAR(2) NULL, - `contactZip` VARCHAR(5) NULL, - `contactPhone1` VARCHAR(45) NULL, - `contactPhone2` VARCHAR(45) NULL, - `contactEmail` VARCHAR(45) NULL, - `idCustomer` INT NULL COMMENT 'FK mutually excludes supplierID and manufacturerID\n', - `supplierID` INT NULL COMMENT 'FK mutually excludes cutomerID and manufacturerID\n', - `website` VARCHAR(45) NULL, - PRIMARY KEY (`idContact`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`CustomerProfile` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`CustomerProfile` ( - `idCustomerProfile` INT NOT NULL, - `CustomerProfilecol` VARCHAR(45) NULL COMMENT 'Preferrences section\n', - PRIMARY KEY (`idCustomerProfile`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`customer` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`customer` ( - `idCustomer` INT NOT NULL AUTO_INCREMENT, - `customerName` VARCHAR(45) NULL, - `user_idUserName` INT NOT NULL, - `creditCard1ID` INT NULL COMMENT 'Security concern: Should be random number using some form of encryption for credit card number and security digits\n4 for Amex\n3 for others.', - `creditCard2ID` INT NULL COMMENT 'Security concern: Should be random number using some form of encryption for credit card number and security digits\n4 for Amex\n3 for others.', - `creditCard3ID` INT NULL, - `checkingAcctID` VARCHAR(45) NULL, - `checkingAcct_idcheckingAcct` INT NOT NULL, - `contact_idcontacts` INT UNSIGNED NOT NULL, - `CustomerProfile_idCustomerProfile` INT NOT NULL, - PRIMARY KEY (`idCustomer`, `user_idUserName`, `checkingAcct_idcheckingAcct`, `contact_idcontacts`, `CustomerProfile_idCustomerProfile`), - UNIQUE INDEX `idCustomer_UNIQUE` (`idCustomer` ASC), - UNIQUE INDEX `creditCard1ID_UNIQUE` (`creditCard1ID` ASC), - UNIQUE INDEX `creditCard2ID_UNIQUE` (`creditCard2ID` ASC), - UNIQUE INDEX `creditCard3ID_UNIQUE` (`creditCard3ID` ASC), - UNIQUE INDEX `checkingAcctID_UNIQUE` (`checkingAcctID` ASC), - INDEX `fk_customer_user_idx` (`user_idUserName` ASC), - INDEX `fk_customer_checkingAcct1_idx` (`checkingAcct_idcheckingAcct` ASC), - INDEX `fk_customer_contact1_idx` (`contact_idcontacts` ASC), - INDEX `fk_customer_CustomerProfile1_idx` (`CustomerProfile_idCustomerProfile` ASC), - CONSTRAINT `fk_customer_user` - FOREIGN KEY (`user_idUserName`) - REFERENCES `PizzaPicadilly`.`user` (`idUserName`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_customer_checkingAcct1` - FOREIGN KEY (`checkingAcct_idcheckingAcct`) - REFERENCES `PizzaPicadilly`.`checkingAcct` (`idcheckingAcct`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_customer_contact1` - FOREIGN KEY (`contact_idcontacts`) - REFERENCES `PizzaPicadilly`.`contact` (`idContact`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_customer_CustomerProfile1` - FOREIGN KEY (`CustomerProfile_idCustomerProfile`) - REFERENCES `PizzaPicadilly`.`CustomerProfile` (`idCustomerProfile`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`otherProduct` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`otherProduct` ( - `idotherProducts` INT NOT NULL AUTO_INCREMENT COMMENT ' a product ID\n drink description\n manufacturer\n supplier\n price\n', - `productType` VARCHAR(45) NULL COMMENT 'Beverage\nPastry\nIce cream\n', - `productName` VARCHAR(45) NULL, - `Description` VARCHAR(45) NULL, - `Brand` VARCHAR(45) NULL, - `idSupplier` VARCHAR(45) NULL, - `Cost` DECIMAL(2) NULL, - `Price` DECIMAL(2) NULL, - `Markup` DECIMAL NULL, - `barCode` VARCHAR(45) NULL COMMENT 'Product Code is bar code or some other alpha/numeric descriptor', - `productSKU` VARCHAR(45) NULL COMMENT 'Business', - `manufacturerName` VARCHAR(45) NULL, - `price` VARCHAR(45) NULL, - `idSeason` INT NULL, - PRIMARY KEY (`idotherProducts`), - UNIQUE INDEX `idotherProducts_UNIQUE` (`idotherProducts` ASC)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`recipe` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`recipe` ( - `idRecipes` INT NOT NULL AUTO_INCREMENT COMMENT 'Recipes are the basic ingredients that make up a particular product. It establishes base cost for the pies.\n\nWe can choose to increase price based on cost or increase ingredients according to size.\n\nEach order is comprised of a specific recipe. \n\nData structure:\ningredientName[idIngredient],ozForSmall,ozForMedium,ozForLarge,ozForExtraLarge\n', - `pizzaName` VARCHAR(45) NOT NULL COMMENT 'FK\n', - `crustStandard` VARCHAR(45) NULL COMMENT 'Picklist of crusts\nSt', - `cheeseType` VARCHAR(45) NULL, - `ingredient1` VARCHAR(255) NULL, - `ingredient2` VARCHAR(45) NULL, - `ingredient3` VARCHAR(45) NULL, - `ingredient4` VARCHAR(45) NULL, - `ingredient5` VARCHAR(45) NULL, - `ingredient6` VARCHAR(45) NULL, - `ingredient7` VARCHAR(45) NULL, - `ingredient8` VARCHAR(45) NULL, - `ingredient9` VARCHAR(45) NULL, - `ingredient10` VARCHAR(45) NULL, - PRIMARY KEY (`idRecipes`), - UNIQUE INDEX `idRecipes_UNIQUE` (`idRecipes` ASC)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`deliveryAddress` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`deliveryAddress` ( - `idDelivery` INT NOT NULL AUTO_INCREMENT, - `deliveryStreet1` VARCHAR(45) NULL, - `deliveryStreet2` VARCHAR(45) NULL, - `deliveryCity` VARCHAR(45) NULL, - `deliveryState` VARCHAR(2) NULL, - `deliveryZip` VARCHAR(5) NULL, - `deliveryPhone1` VARCHAR(45) NULL, - `deliveryPhone2` VARCHAR(45) NULL, - `idCustomer` INT NULL COMMENT 'FK \n', - `customer_idCustomer` INT UNSIGNED NOT NULL, - `customer_user_idUserName` INT NOT NULL, - `customer_checkingAcct_idcheckingAcct` INT NOT NULL, - `customer_contact_idcontacts` INT UNSIGNED NOT NULL, - PRIMARY KEY (`idDelivery`, `customer_idCustomer`, `customer_user_idUserName`, `customer_checkingAcct_idcheckingAcct`, `customer_contact_idcontacts`), - INDEX `fk_deliveryAddress_customer1_idx` (`customer_idCustomer` ASC, `customer_user_idUserName` ASC, `customer_checkingAcct_idcheckingAcct` ASC, `customer_contact_idcontacts` ASC), - CONSTRAINT `fk_deliveryAddress_customer1` - FOREIGN KEY (`customer_idCustomer` , `customer_user_idUserName` , `customer_checkingAcct_idcheckingAcct` , `customer_contact_idcontacts`) - REFERENCES `PizzaPicadilly`.`customer` (`idCustomer` , `user_idUserName` , `checkingAcct_idcheckingAcct` , `contact_idcontacts`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`paymentType` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`paymentType` ( - `idpaymentType` INT NOT NULL, - `paymentType` VARCHAR(45) NULL, - `idCustomer` INT NULL COMMENT 'Cash\nCheck\nCredit Card\nGift Card\nCoupon\n\n', - PRIMARY KEY (`idpaymentType`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`pizzaPriceList` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`pizzaPriceList` ( - `idpizzaPriceList` INT NOT NULL AUTO_INCREMENT COMMENT 'Price list establishes pricing for each configuration of pies.\n\nEach pie size has differing amounts of ingredients that affect price.\n\npizzaCode uniquely identifies pieSize + recipe.\n\nDo we include a percentage increase in cost to cover more ingredients?\n\nField descriptions:\n\nidPiaaPriceList\nidPizzaProduct\npieSize\npizzaCode: unique code for pizza product + size\nCost: base code of this pie in this size\nMarkup: desired profit margin.\nDiscount: % of discount in price\nPrice: current price for the pie.\nPrice = (cost + markup) - discount\n\n', - `idPizzaProduct` INT NULL, - `pieSize` INT NULL, - `pizzaCode` VARCHAR(15) NULL, - `cost` DECIMAL(3,2) NULL, - `markup` DECIMAL(3,2) NULL, - `discount` DECIMAL(3,2) NULL COMMENT 'Happy Hour discount column allows for separate discount of happy hour menu items. This allows for specific pies to be discounted further or for a different time period. Convenience feature for the owners.', - `price` DECIMAL(3,2) NULL, - `discountHappyHour` DECIMAL(3,2) NULL, - PRIMARY KEY (`idpizzaPriceList`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`Ingredient` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`Ingredient` ( - `idIngredients` INT NOT NULL AUTO_INCREMENT COMMENT 'Ingredients gives cost per ounce and weight of ingredients for each pie. This allows calculations of ingredient costs by size.\nSausage\nSmall pie = 4 oz\nMedium pie = 6 oz\nLarge pie = 12 oz\nExtraLarge', - `ingredientName` VARCHAR(45) NULL, - `costPerOz` DECIMAL(2) NULL, - `ozInSmall` DECIMAL(2) NULL, - `ozInMedium` DECIMAL(2) NULL, - `ozInLarge` DECIMAL(2) NULL, - `ozInExtraLarge` DECIMAL(2) NULL, - `idSupplier` VARCHAR(45) NULL, - `productSKU` VARCHAR(45) NULL, - PRIMARY KEY (`idIngredients`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`orderExtraIngredientList` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`orderExtraIngredientList` ( - `idExtraIngredient` INT NOT NULL AUTO_INCREMENT COMMENT 'Add on items for custom orders\n\nWhen a customer orders extra ingredients the system looksup the ingredient on ingredient.extraOz multiplies that value by pizzaPriceList.markup for the relevant pizzaProduct and adds that price as a line item in the order.\n\n\n', - `ingredients` VARCHAR(255) NULL COMMENT 'Multivalue list\nTied to order id?\n', - `Ingredients_idIngredients` INT NOT NULL, - PRIMARY KEY (`idExtraIngredient`, `Ingredients_idIngredients`), - INDEX `fk_extraIngredientList_Ingredients1_idx` (`Ingredients_idIngredients` ASC), - CONSTRAINT `fk_extraIngredientList_Ingredients1` - FOREIGN KEY (`Ingredients_idIngredients`) - REFERENCES `PizzaPicadilly`.`Ingredient` (`idIngredients`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`order` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`order` ( - `idorder` INT NOT NULL, - `pizzaCode` INT NULL, - `productName` VARCHAR(45) NULL, - `idRecipe` VARCHAR(45) NULL, - `size` INT NULL, - `crustType` VARCHAR(45) NULL, - `customer_idCustomer` INT UNSIGNED NOT NULL, - `customer_user_idUserName` INT NOT NULL, - `customer_checkingAcct_idcheckingAcct` INT NOT NULL, - `customer_contact_idcontacts` INT UNSIGNED NOT NULL, - `idDeliveryAddress` INT NULL, - `idOtherProducts` INT NULL, - `quantity` INT NULL, - `deliveryAddress_idDelivery` INT NOT NULL, - `deliveryAddress_customer_idCustomer` INT UNSIGNED NOT NULL, - `deliveryAddress_customer_user_idUserName` INT NOT NULL, - `deliveryAddress_customer_checkingAcct_idcheckingAcct` INT NOT NULL, - `deliveryAddress_customer_contact_idcontacts` INT UNSIGNED NOT NULL, - `contact_idContact` INT UNSIGNED NOT NULL, - `paymentType_idpaymentType` INT NOT NULL, - `otherProduct_idotherProducts` INT NOT NULL, - `pizzaPriceList_idpizzaPriceList` INT NOT NULL, - `extraIngredientList_idaddOn` INT NOT NULL, - PRIMARY KEY (`idorder`, `customer_idCustomer`, `customer_user_idUserName`, `customer_checkingAcct_idcheckingAcct`, `customer_contact_idcontacts`, `deliveryAddress_idDelivery`, `deliveryAddress_customer_idCustomer`, `deliveryAddress_customer_user_idUserName`, `deliveryAddress_customer_checkingAcct_idcheckingAcct`, `deliveryAddress_customer_contact_idcontacts`, `contact_idContact`, `paymentType_idpaymentType`, `otherProduct_idotherProducts`, `pizzaPriceList_idpizzaPriceList`, `extraIngredientList_idaddOn`), - INDEX `fk_order_customer1_idx` (`customer_idCustomer` ASC, `customer_user_idUserName` ASC, `customer_checkingAcct_idcheckingAcct` ASC, `customer_contact_idcontacts` ASC), - INDEX `fk_order_deliveryAddress1_idx` (`deliveryAddress_idDelivery` ASC, `deliveryAddress_customer_idCustomer` ASC, `deliveryAddress_customer_user_idUserName` ASC, `deliveryAddress_customer_checkingAcct_idcheckingAcct` ASC, `deliveryAddress_customer_contact_idcontacts` ASC), - INDEX `fk_order_contact1_idx` (`contact_idContact` ASC), - INDEX `fk_order_paymentType1_idx` (`paymentType_idpaymentType` ASC), - INDEX `fk_order_otherProduct1_idx` (`otherProduct_idotherProducts` ASC), - INDEX `fk_order_pizzaPriceList1_idx` (`pizzaPriceList_idpizzaPriceList` ASC), - INDEX `fk_order_extraIngredientList1_idx` (`extraIngredientList_idaddOn` ASC), - CONSTRAINT `fk_order_customer1` - FOREIGN KEY (`customer_idCustomer` , `customer_user_idUserName` , `customer_checkingAcct_idcheckingAcct` , `customer_contact_idcontacts`) - REFERENCES `PizzaPicadilly`.`customer` (`idCustomer` , `user_idUserName` , `checkingAcct_idcheckingAcct` , `contact_idcontacts`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_order_deliveryAddress1` - FOREIGN KEY (`deliveryAddress_idDelivery` , `deliveryAddress_customer_idCustomer` , `deliveryAddress_customer_user_idUserName` , `deliveryAddress_customer_checkingAcct_idcheckingAcct` , `deliveryAddress_customer_contact_idcontacts`) - REFERENCES `PizzaPicadilly`.`deliveryAddress` (`idDelivery` , `customer_idCustomer` , `customer_user_idUserName` , `customer_checkingAcct_idcheckingAcct` , `customer_contact_idcontacts`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_order_contact1` - FOREIGN KEY (`contact_idContact`) - REFERENCES `PizzaPicadilly`.`contact` (`idContact`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_order_paymentType1` - FOREIGN KEY (`paymentType_idpaymentType`) - REFERENCES `PizzaPicadilly`.`paymentType` (`idpaymentType`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_order_otherProduct1` - FOREIGN KEY (`otherProduct_idotherProducts`) - REFERENCES `PizzaPicadilly`.`otherProduct` (`idotherProducts`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_order_pizzaPriceList1` - FOREIGN KEY (`pizzaPriceList_idpizzaPriceList`) - REFERENCES `PizzaPicadilly`.`pizzaPriceList` (`idpizzaPriceList`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_order_extraIngredientList1` - FOREIGN KEY (`extraIngredientList_idaddOn`) - REFERENCES `PizzaPicadilly`.`orderExtraIngredientList` (`idExtraIngredient`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`pieType` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`pieType` ( - `idpieType` INT NOT NULL COMMENT 'Deep dish\nThin crust\nCustom', - `pieTypeName` VARCHAR(45) NULL COMMENT 'Standard\nCustom\nThin Crust\nDeep Dish\nGlutenFree\nWholeWheat\n\n', - `pieTypeDescription` VARCHAR(255) NULL, - `order_idorder` INT NOT NULL, - `order_customer_idCustomer` INT UNSIGNED NOT NULL, - `order_customer_user_idUserName` INT NOT NULL, - `order_customer_checkingAcct_idcheckingAcct` INT NOT NULL, - `order_customer_contact_idcontacts` INT UNSIGNED NOT NULL, - `order_deliveryAddress_idDelivery` INT NOT NULL, - `order_deliveryAddress_customer_idCustomer` INT UNSIGNED NOT NULL, - `order_deliveryAddress_customer_user_idUserName` INT NOT NULL, - `order_deliveryAddress_customer_checkingAcct_idcheckingAcct` INT NOT NULL, - `order_deliveryAddress_customer_contact_idcontacts` INT UNSIGNED NOT NULL, - `order_contact_idContact` INT UNSIGNED NOT NULL, - `order_paymentType_idpaymentType` INT NOT NULL, - `order_otherProduct_idotherProducts` INT NOT NULL, - PRIMARY KEY (`idpieType`, `order_idorder`, `order_customer_idCustomer`, `order_customer_user_idUserName`, `order_customer_checkingAcct_idcheckingAcct`, `order_customer_contact_idcontacts`, `order_deliveryAddress_idDelivery`, `order_deliveryAddress_customer_idCustomer`, `order_deliveryAddress_customer_user_idUserName`, `order_deliveryAddress_customer_checkingAcct_idcheckingAcct`, `order_deliveryAddress_customer_contact_idcontacts`, `order_contact_idContact`, `order_paymentType_idpaymentType`, `order_otherProduct_idotherProducts`), - INDEX `fk_pieType_order1_idx` (`order_idorder` ASC, `order_customer_idCustomer` ASC, `order_customer_user_idUserName` ASC, `order_customer_checkingAcct_idcheckingAcct` ASC, `order_customer_contact_idcontacts` ASC, `order_deliveryAddress_idDelivery` ASC, `order_deliveryAddress_customer_idCustomer` ASC, `order_deliveryAddress_customer_user_idUserName` ASC, `order_deliveryAddress_customer_checkingAcct_idcheckingAcct` ASC, `order_deliveryAddress_customer_contact_idcontacts` ASC, `order_contact_idContact` ASC, `order_paymentType_idpaymentType` ASC, `order_otherProduct_idotherProducts` ASC), - CONSTRAINT `fk_pieType_order1` - FOREIGN KEY (`order_idorder` , `order_customer_idCustomer` , `order_customer_user_idUserName` , `order_customer_checkingAcct_idcheckingAcct` , `order_customer_contact_idcontacts` , `order_deliveryAddress_idDelivery` , `order_deliveryAddress_customer_idCustomer` , `order_deliveryAddress_customer_user_idUserName` , `order_deliveryAddress_customer_checkingAcct_idcheckingAcct` , `order_deliveryAddress_customer_contact_idcontacts` , `order_contact_idContact` , `order_paymentType_idpaymentType` , `order_otherProduct_idotherProducts`) - REFERENCES `PizzaPicadilly`.`order` (`idorder` , `customer_idCustomer` , `customer_user_idUserName` , `customer_checkingAcct_idcheckingAcct` , `customer_contact_idcontacts` , `deliveryAddress_idDelivery` , `deliveryAddress_customer_idCustomer` , `deliveryAddress_customer_user_idUserName` , `deliveryAddress_customer_checkingAcct_idcheckingAcct` , `deliveryAddress_customer_contact_idcontacts` , `contact_idContact` , `paymentType_idpaymentType` , `otherProduct_idotherProducts`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`pizzaProduct` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`pizzaProduct` ( - `idpizzaProducts` INT NOT NULL AUTO_INCREMENT, - `pizzaName` VARCHAR(45) NULL, - `idRecipe` INT NULL, - `recipe_idRecipes` INT NOT NULL, - `pieType_idpieType` INT NOT NULL, - `idSeason` INT NULL COMMENT 'idSeason is the unique identifier for the season when this pie is available.', - PRIMARY KEY (`idpizzaProducts`, `recipe_idRecipes`, `pieType_idpieType`), - UNIQUE INDEX `idpizzaProducts_UNIQUE` (`idpizzaProducts` ASC), - INDEX `fk_pizzaProduct_recipe1_idx` (`recipe_idRecipes` ASC), - INDEX `fk_pizzaProduct_pieType1_idx` (`pieType_idpieType` ASC), - CONSTRAINT `fk_pizzaProduct_recipe1` - FOREIGN KEY (`recipe_idRecipes`) - REFERENCES `PizzaPicadilly`.`recipe` (`idRecipes`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_pizzaProduct_pieType1` - FOREIGN KEY (`pieType_idpieType`) - REFERENCES `PizzaPicadilly`.`pieType` (`idpieType`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`creditCard` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`creditCard` ( - `idcreditCards` INT NOT NULL AUTO_INCREMENT, - `creditCardCompany` VARCHAR(45) NULL, - `cardIssuer` VARCHAR(45) NULL, - `cardNumber` INT NOT NULL, - `cvvNumber` INT NULL, - `nameOnCard` VARCHAR(45) NULL, - `billStreet` VARCHAR(45) NULL, - `billCity` VARCHAR(45) NULL, - `billState` VARCHAR(45) NULL, - `billZip` VARCHAR(45) NULL COMMENT 'TABLE IS ENCRYPTED\ncardNumber + idCustomer + ??', - `idCustomer` INT NOT NULL COMMENT 'FK', - `customer_idCustomer` INT UNSIGNED NOT NULL, - `customer_user_idUserName` INT NOT NULL, - PRIMARY KEY (`idcreditCards`, `customer_idCustomer`, `customer_user_idUserName`), - UNIQUE INDEX `idcreditCards_UNIQUE` (`idcreditCards` ASC), - INDEX `fk_creditCard_customer1_idx` (`customer_idCustomer` ASC, `customer_user_idUserName` ASC), - CONSTRAINT `fk_creditCard_customer1` - FOREIGN KEY (`customer_idCustomer` , `customer_user_idUserName`) - REFERENCES `PizzaPicadilly`.`customer` (`idCustomer` , `user_idUserName`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`productSupplier` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`productSupplier` ( - `idSupplier` INT NOT NULL AUTO_INCREMENT, - `supplierName` VARCHAR(45) NULL, - `idContact` VARCHAR(45) NULL, - `productSKU` VARCHAR(45) NULL, - PRIMARY KEY (`idSupplier`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`recipe_has_Ingredients` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`recipe_has_Ingredients` ( - `recipe_idRecipes` INT NOT NULL, - `Ingredients_idIngredients` INT NOT NULL, - PRIMARY KEY (`recipe_idRecipes`, `Ingredients_idIngredients`), - INDEX `fk_recipe_has_Ingredients_Ingredients1_idx` (`Ingredients_idIngredients` ASC), - INDEX `fk_recipe_has_Ingredients_recipe1_idx` (`recipe_idRecipes` ASC), - CONSTRAINT `fk_recipe_has_Ingredients_recipe1` - FOREIGN KEY (`recipe_idRecipes`) - REFERENCES `PizzaPicadilly`.`recipe` (`idRecipes`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_recipe_has_Ingredients_Ingredients1` - FOREIGN KEY (`Ingredients_idIngredients`) - REFERENCES `PizzaPicadilly`.`Ingredient` (`idIngredients`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`otherProductSupplier_has_otherProduct` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`otherProductSupplier_has_otherProduct` ( - `otherProductSupplier_idSupplier` INT NOT NULL, - `otherProduct_idotherProducts` INT NOT NULL, - `otherProductSupplier_has_otherProduct_otherProductSupplier_idSupplier` INT NOT NULL, - `otherProductSupplier_has_otherProduct_otherProduct_idotherProducts` INT NOT NULL, - PRIMARY KEY (`otherProductSupplier_idSupplier`, `otherProduct_idotherProducts`), - INDEX `fk_otherProductSupplier_has_otherProduct_otherProduct1_idx` (`otherProduct_idotherProducts` ASC), - INDEX `fk_otherProductSupplier_has_otherProduct_otherProductSuppli_idx` (`otherProductSupplier_idSupplier` ASC), - INDEX `fk_otherProductSupplier_has_otherProduct_otherProductSuppli_idx1` (`otherProductSupplier_has_otherProduct_otherProductSupplier_idSupplier` ASC, `otherProductSupplier_has_otherProduct_otherProduct_idotherProducts` ASC), - CONSTRAINT `fk_otherProductSupplier_has_otherProduct_otherProductSupplier1` - FOREIGN KEY (`otherProductSupplier_idSupplier`) - REFERENCES `PizzaPicadilly`.`productSupplier` (`idSupplier`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_otherProductSupplier_has_otherProduct_otherProduct1` - FOREIGN KEY (`otherProduct_idotherProducts`) - REFERENCES `PizzaPicadilly`.`otherProduct` (`idotherProducts`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_otherProductSupplier_has_otherProduct_otherProductSupplier2` - FOREIGN KEY (`otherProductSupplier_has_otherProduct_otherProductSupplier_idSupplier` , `otherProductSupplier_has_otherProduct_otherProduct_idotherProducts`) - REFERENCES `PizzaPicadilly`.`otherProductSupplier_has_otherProduct` (`otherProductSupplier_idSupplier` , `otherProduct_idotherProducts`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`productSupplier_has_Ingredients` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`productSupplier_has_Ingredients` ( - `productSupplier_idSupplier` INT NOT NULL, - `Ingredients_idIngredients` INT NOT NULL, - PRIMARY KEY (`productSupplier_idSupplier`, `Ingredients_idIngredients`), - INDEX `fk_productSupplier_has_Ingredients_Ingredients1_idx` (`Ingredients_idIngredients` ASC), - INDEX `fk_productSupplier_has_Ingredients_productSupplier1_idx` (`productSupplier_idSupplier` ASC), - CONSTRAINT `fk_productSupplier_has_Ingredients_productSupplier1` - FOREIGN KEY (`productSupplier_idSupplier`) - REFERENCES `PizzaPicadilly`.`productSupplier` (`idSupplier`) - ON DELETE NO ACTION - ON UPDATE NO ACTION, - CONSTRAINT `fk_productSupplier_has_Ingredients_Ingredients1` - FOREIGN KEY (`Ingredients_idIngredients`) - REFERENCES `PizzaPicadilly`.`Ingredient` (`idIngredients`) - ON DELETE NO ACTION - ON UPDATE NO ACTION) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`stateSalesTax` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`stateSalesTax` ( - `idstateTax` INT NOT NULL AUTO_INCREMENT COMMENT 'The stateSalesTax table contains a list of all states in the company’s service area. Available information includes:\nState Name\nState Abbreviation\nSales Tax Rate', - `stateName` VARCHAR(45) NULL, - `stateAbbeviation` VARCHAR(2) NULL, - `taxRate` DECIMAL(2) NULL, - PRIMARY KEY (`idstateTax`)) -ENGINE = InnoDB; - - --- ----------------------------------------------------- --- Table `PizzaPicadilly`.`season` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`season` ( - `idseason` INT NOT NULL COMMENT 'Season table holds information about seasonal pizzas. Not all ingredients are available year round. System will suppress item from menu if out of season.\n\nControlled by start and end date. Year round products have start date of Jan 1 end date of dec 31 as defaults.\n', - `seasonName` VARCHAR(45) NULL, - `seasonStartDate` DATE NULL DEFAULT January 1, - `seasonEndDate` DATE NULL DEFAULT Decmber 31, - PRIMARY KEY (`idseason`)) -ENGINE = InnoDB; - -USE `PizzaPicadilly` ; - --- ----------------------------------------------------- --- Placeholder table for view `PizzaPicadilly`.`view1` --- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS `PizzaPicadilly`.`view1` (`id` INT); - --- ----------------------------------------------------- --- View `PizzaPicadilly`.`view1` --- ----------------------------------------------------- -DROP TABLE IF EXISTS `PizzaPicadilly`.`view1`; -USE `PizzaPicadilly`; - - -SET SQL_MODE=@OLD_SQL_MODE; -SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; -SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; diff --git a/datasets/.DS_Store b/datasets/.DS_Store deleted file mode 100644 index e5cb97f..0000000 Binary files a/datasets/.DS_Store and /dev/null differ diff --git a/datasets/98-Pizza Data-SAFETY.xlsx b/datasets/98-Pizza Data-SAFETY.xlsx deleted file mode 100644 index 35fe98c..0000000 Binary files a/datasets/98-Pizza Data-SAFETY.xlsx and /dev/null differ diff --git a/datasets/98-Pizza Data.xlsx b/datasets/98-Pizza Data.xlsx deleted file mode 100644 index f4c8d78..0000000 Binary files a/datasets/98-Pizza Data.xlsx and /dev/null differ diff --git a/datasets/98-Pizza Datasets v170517 copy.xlsx b/datasets/98-Pizza Datasets v170517 copy.xlsx deleted file mode 100644 index 0f5015a..0000000 Binary files a/datasets/98-Pizza Datasets v170517 copy.xlsx and /dev/null differ diff --git a/datasets/98-Pizza Datasets v170517.xlsx b/datasets/98-Pizza Datasets v170517.xlsx deleted file mode 100644 index 261a1ce..0000000 Binary files a/datasets/98-Pizza Datasets v170517.xlsx and /dev/null differ diff --git a/datasets/Download Devart Excel Add-ins.ogg b/datasets/Download Devart Excel Add-ins.ogg deleted file mode 100644 index 31b12b6..0000000 Binary files a/datasets/Download Devart Excel Add-ins.ogg and /dev/null differ diff --git a/datasets/csv/extraIngredientList.csv b/datasets/csv/extraIngredientList.csv deleted file mode 100644 index 3bbb03c..0000000 --- a/datasets/csv/extraIngredientList.csv +++ /dev/null @@ -1 +0,0 @@ -idIngredients,ingredientName,productSKU,,,,,,,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ,Roma Tomatoes ,T2743O56122,T,27,43,O,56,122, $0.10 ,4,6,8,10,Farmer Dante ,Red Onions ,O2844S57123,O,28,44,S,57,123, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Spinach ,S2945B58124,S,29,45,B,58,124, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Broccoli ,B1146P71125,B,11,46,P,71,125, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Pineapple ,P7247H72126,P,72,47,H,72,126, $0.10 ,4,6,8,10,Farmer Dante ,Jalapeno Peppers ,P1239S73127,P,12,39,S,73,127, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Kalamata Olives ,O7840F74128,O,78,40,F,74,128, $0.10 ,4,6,8,10,Farmer Dante ,Fresh Mushrooms ,V1341P75103,V,13,41,P,75,103, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Green Olives ,O7848T76104,O,78,48,T,76,104, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Green Peppers ,P1449Z77105,P,14,49,Z,77,105, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Roasted Garlic ,V1550G78106,V,15,50,G,78,106, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Hot Banana Peppers ,P7851O79107,P,78,51,O,79,107, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Roasted Red Peppers ,P1676M68108,P,16,76,M,68,108, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Sun Dried Tomatoes ,T7277O69109,T,72,77,O,69,109, $0.10 ,4,6,8,10,Farmer Dante ,Grilled Zucchini ,Z1778G70110,Z,17,78,G,70,110, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Potato slice ,R7879O71111,R,78,79,O,71,111, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Caramelized Onions ,O1868M72112,O,18,68,M,72,112, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Cilantro ,H1969O73113,H,19,69,O,73,113, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Tomato Sauce,V4511G74114,V,45,11,G,74,114, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Flour_White,F4616P75115,F,46,16,P,75,115, $0.10 ,4,6,8,10,Great Grains Flour ,Flour_Wheat,F4712P76116,F,47,12,P,76,116, $0.10 ,4,6,8,10,Great Grains Flour ,Flour_Gluten_Free,F4818T77117,F,48,18,T,77,117, $0.10 ,4,6,8,10,Great Grains Flour ,Flour_Cornmeal,F4913Z78118,F,49,13,Z,78,118, $0.10 ,4,6,8,10,Great Grains Flour ,Flour_Multigrain,F5017H79119,F,50,17,H,79,119, $0.10 ,4,6,8,10,Great Grains Flour ,Carmelized Carrots,R5114S80120,R,51,14,S,80,120, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Eggplant,R5215F81121,R,52,15,F,81,121, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Yak chips,M7972F29104,M,79,72,F,29,104, $0.10 ,4,6,8,10,Sankofa Specialties ,Buffalo Loins,M6812P11105,M,68,12,P,11,105, $0.10 ,4,6,8,10,Sankofa Specialties ,Lamb,C6978T72106,C,69,78,T,72,106, $0.10 ,4,6,8,10,Sankofa Specialties ,Shrimp,S1113Z12113,S,11,13,Z,12,113, $0.10 ,4,6,8,10,Sankofa Specialties ,Salmon,S1678G78114,S,16,78,G,78,114, $0.10 ,4,6,8,10,Sankofa Specialties ,Prawns,S1214O13115,S,12,14,O,13,115, $0.10 ,4,6,8,10,Sankofa Specialties ,Steak,M1816M78116,M,18,16,M,78,116, $0.10 ,4,6,8,10,Sankofa Specialties ,Baked Beans,L1672T45117,L,16,72,T,45,117, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Kiwi,C7217Z46118,C,72,17,Z,46,118, $0.10 ,4,6,8,10,Farmer Dante \ No newline at end of file diff --git a/datasets/csv/pizza_Ingredient.csv b/datasets/csv/pizza_Ingredient.csv deleted file mode 100644 index 3bbb03c..0000000 --- a/datasets/csv/pizza_Ingredient.csv +++ /dev/null @@ -1 +0,0 @@ -idIngredients,ingredientName,productSKU,,,,,,,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ,Roma Tomatoes ,T2743O56122,T,27,43,O,56,122, $0.10 ,4,6,8,10,Farmer Dante ,Red Onions ,O2844S57123,O,28,44,S,57,123, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Spinach ,S2945B58124,S,29,45,B,58,124, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Broccoli ,B1146P71125,B,11,46,P,71,125, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Pineapple ,P7247H72126,P,72,47,H,72,126, $0.10 ,4,6,8,10,Farmer Dante ,Jalapeno Peppers ,P1239S73127,P,12,39,S,73,127, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Kalamata Olives ,O7840F74128,O,78,40,F,74,128, $0.10 ,4,6,8,10,Farmer Dante ,Fresh Mushrooms ,V1341P75103,V,13,41,P,75,103, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Green Olives ,O7848T76104,O,78,48,T,76,104, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Green Peppers ,P1449Z77105,P,14,49,Z,77,105, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Roasted Garlic ,V1550G78106,V,15,50,G,78,106, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Hot Banana Peppers ,P7851O79107,P,78,51,O,79,107, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Roasted Red Peppers ,P1676M68108,P,16,76,M,68,108, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Sun Dried Tomatoes ,T7277O69109,T,72,77,O,69,109, $0.10 ,4,6,8,10,Farmer Dante ,Grilled Zucchini ,Z1778G70110,Z,17,78,G,70,110, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Potato slice ,R7879O71111,R,78,79,O,71,111, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Caramelized Onions ,O1868M72112,O,18,68,M,72,112, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Cilantro ,H1969O73113,H,19,69,O,73,113, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Tomato Sauce,V4511G74114,V,45,11,G,74,114, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Flour_White,F4616P75115,F,46,16,P,75,115, $0.10 ,4,6,8,10,Great Grains Flour ,Flour_Wheat,F4712P76116,F,47,12,P,76,116, $0.10 ,4,6,8,10,Great Grains Flour ,Flour_Gluten_Free,F4818T77117,F,48,18,T,77,117, $0.10 ,4,6,8,10,Great Grains Flour ,Flour_Cornmeal,F4913Z78118,F,49,13,Z,78,118, $0.10 ,4,6,8,10,Great Grains Flour ,Flour_Multigrain,F5017H79119,F,50,17,H,79,119, $0.10 ,4,6,8,10,Great Grains Flour ,Carmelized Carrots,R5114S80120,R,51,14,S,80,120, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Eggplant,R5215F81121,R,52,15,F,81,121, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Yak chips,M7972F29104,M,79,72,F,29,104, $0.10 ,4,6,8,10,Sankofa Specialties ,Buffalo Loins,M6812P11105,M,68,12,P,11,105, $0.10 ,4,6,8,10,Sankofa Specialties ,Lamb,C6978T72106,C,69,78,T,72,106, $0.10 ,4,6,8,10,Sankofa Specialties ,Shrimp,S1113Z12113,S,11,13,Z,12,113, $0.10 ,4,6,8,10,Sankofa Specialties ,Salmon,S1678G78114,S,16,78,G,78,114, $0.10 ,4,6,8,10,Sankofa Specialties ,Prawns,S1214O13115,S,12,14,O,13,115, $0.10 ,4,6,8,10,Sankofa Specialties ,Steak,M1816M78116,M,18,16,M,78,116, $0.10 ,4,6,8,10,Sankofa Specialties ,Baked Beans,L1672T45117,L,16,72,T,45,117, $0.10 ,4,6,8,10,Acme Pizza Supplies ,Kiwi,C7217Z46118,C,72,17,Z,46,118, $0.10 ,4,6,8,10,Farmer Dante \ No newline at end of file diff --git a/datasets/csv/pizza_paymentType.csv b/datasets/csv/pizza_paymentType.csv deleted file mode 100644 index ce3d370..0000000 --- a/datasets/csv/pizza_paymentType.csv +++ /dev/null @@ -1 +0,0 @@ -paymentType Cash Credit Card Check Gift Card Coupon Complimentary \ No newline at end of file diff --git a/datasets/csv/pizza_stateSalesTax.csv b/datasets/csv/pizza_stateSalesTax.csv deleted file mode 100644 index a0f25ae..0000000 --- a/datasets/csv/pizza_stateSalesTax.csv +++ /dev/null @@ -1 +0,0 @@ -pieTypeName,pieTypeDescription Standard,Standard Custom,Custom Thin Crust,Thin and light crust. Less filling. Deep Dish,Deep Dish has more of the good stuff inside. GlutenFree,GlutenFree WholeWheat,Whole wheat Cornmeal Crust,A special treat using cornmeal instead of flour. Multigrain,Our unique recipe using multi-grain flour. Stuffed,Goodies stuffed in the crust \ No newline at end of file diff --git a/datasets/pizza_paymentType.csv b/datasets/pizza_paymentType.csv deleted file mode 100644 index 101f4be..0000000 --- a/datasets/pizza_paymentType.csv +++ /dev/null @@ -1 +0,0 @@ -idCustomer,customerName,user_idUserName,creditCard1ID,creditCard2ID,creditCard3ID,checkingAcctID,checkingAcct_idcheckingAcct,contact_idcontacts \ No newline at end of file diff --git a/datasets/psql/dataMay-18-2017.sql b/datasets/psql/dataMay-18-2017.sql deleted file mode 100644 index 140c11a..0000000 --- a/datasets/psql/dataMay-18-2017.sql +++ /dev/null @@ -1,25 +0,0 @@ -DROP TABLE IF EXISTS "pizza_contact"; - -CREATE TABLE "pizza_contact" ( - id SERIAL PRIMARY KEY, - contactType integer NULL, - contactStreet1 varchar(255) default NULL, - contactCity varchar(255), - contactState varchar(50) default NULL, - country varchar(100) default NULL, - contactZip varchar(10) default NULL, - contactPhone1 varchar(100) default NULL, - contactPhone2 varchar(100) default NULL, - contactEmail varchar(255) default NULL -); - -INSERT INTO "pizza_contact" (contactType,contactStreet1,contactCity,contactState,country,contactZip,contactPhone1,contactPhone2,contactEmail) VALUES (1,'438-5832 Magna St.','Dos Hermanas','Andalucía','Iran','34696','(427) 869-2720','(232) 323-2225','ligula.Nullam@consequatpurusMaecenas.co.uk'),(2,'917-4885 Pede Road','Zamość','LU','Saint Helena, Ascension and Tristan da Cunha','60282','(836) 325-5002','(967) 517-3410','sit.amet@Nullam.co.uk'),(3,'2144 Proin St.','Ostrowiec Świętokrzyski','SK','Belgium','M8N 9Z1','(413) 651-3209','(393) 565-5259','Nam.nulla@Nullam.edu'),(3,'2701 Sit Avenue','Parramatta','NSW','Cocos (Keeling) Islands','54439','(154) 108-3584','(825) 192-9790','vitae@Pellentesque.edu'),(3,'9843 Cursus St.','Ramara','Ontario','Congo (Brazzaville)','202866','(608) 228-1262','(511) 792-4398','interdum@enimnon.ca'),(1,'P.O. Box 952, 2272 Dolor Rd.','Kraków','MP','Namibia','C7P 3P0','(814) 615-5820','(951) 470-2643','sed.turpis.nec@ligulaconsectetuer.net'),(1,'P.O. Box 767, 1307 Ut, Rd.','Nässjö','F','Palau','5515','(977) 360-3432','(856) 999-0775','vitae.aliquet.nec@iaculisaliquetdiam.net'),(3,'P.O. Box 384, 813 Etiam Ave','Bama','Borno','Ukraine','GV8T 2ZX','(254) 974-3893','(277) 148-8954','erat@eu.com'),(1,'5577 Mattis Ave','Minitonas','MB','Grenada','R1B 6H7','(185) 746-4285','(501) 562-7289','Phasellus@tincidunt.com'),(3,'2490 Aenean Street','San Miguel','San José','Iraq','73838','(784) 633-5918','(788) 864-6325','pede.Suspendisse@dapibusrutrumjusto.com'); -INSERT INTO "pizza_contact" (contactType,contactStreet1,contactCity,contactState,country,contactZip,contactPhone1,contactPhone2,contactEmail) VALUES (1,'Ap #465-6666 Ipsum Road','Bhuj','Gujarat','Montserrat','64-186','(648) 485-8724','(386) 220-8837','elementum@consectetueradipiscing.com'),(3,'6141 A Avenue','San Antonio','TX','Martinique','71814','(944) 885-9228','(784) 306-8760','tempor.diam@tinciduntDonecvitae.com'),(3,'P.O. Box 378, 250 Elementum Road','Porto Alegre','RS','Russian Federation','8509','(798) 760-9451','(567) 898-4687','Quisque@vehicula.org'),(1,'P.O. Box 782, 9269 Purus. St.','Barry','GL','Congo (Brazzaville)','667047','(439) 108-0430','(841) 829-0524','sem@idsapien.com'),(2,'P.O. Box 956, 6204 Mauris. St.','Hartford','Connecticut','Armenia','Y1G 5R4','(938) 614-6955','(423) 513-8161','nostra.per.inceptos@vitaeeratvel.ca'),(3,'P.O. Box 335, 6480 Nisi. Rd.','St. Andrews','FI','Equatorial Guinea','31797','(821) 585-8532','(564) 619-6422','Curabitur.sed.tortor@tortorat.net'),(2,'260-4046 Nisi. Street','Vienna','Wie','Rwanda','1883','(186) 156-9546','(669) 279-0285','a.facilisis.non@et.ca'),(2,'P.O. Box 430, 7783 Vulputate Road','Joinville','SC','Saint Martin','304979','(912) 117-0805','(139) 746-5834','ac.ipsum@tortorNunccommodo.co.uk'),(2,'Ap #293-4738 Pellentesque Av.','Sherbrooke','QC','Turkmenistan','502166','(380) 799-5894','(832) 926-0485','dis.parturient@venenatisa.co.uk'),(1,'2412 Ut Avenue','Oviedo','Principado de Asturias','Namibia','R9C 9X6','(684) 133-1609','(271) 759-8953','scelerisque@ridiculusmusDonec.net'); -INSERT INTO "pizza_contact" (contactType,contactStreet1,contactCity,contactState,country,contactZip,contactPhone1,contactPhone2,contactEmail) VALUES (1,'P.O. Box 774, 1417 Quisque Street','San Felice a Cancello','CAM','Tokelau','4742','(922) 661-6074','(514) 265-8171','metus.eu.erat@dictumultricies.net'),(3,'5919 Interdum St.','Mielec','PK','Netherlands','86528','(983) 287-1799','(825) 457-8429','sit.amet@nisl.net'),(1,'Ap #675-6734 Id Road','Veere','Zl','Croatia','40826','(961) 407-9313','(807) 777-8388','blandit.enim.consequat@nulla.ca'),(1,'174 In Rd.','Roosendaal','Noord Brabant','Denmark','7518','(153) 217-8937','(936) 420-4514','ligula.eu.enim@parturientmontesnascetur.net'),(1,'Ap #684-9765 Semper Av.','Norfolk','VA','Hungary','866987','(598) 345-6416','(758) 522-0046','fermentum.risus.at@nislelementum.net'),(3,'883-4827 Eu St.','Rotterdam','Zuid Holland','Fiji','8334','(654) 814-3038','(390) 444-6151','a.arcu.Sed@non.ca'),(3,'271-3318 Auctor, Ave','Compiègne','PI','Israel','2254','(800) 215-7113','(733) 230-6258','gravida.sagittis@lectusrutrum.edu'),(3,'6825 Sem Rd.','Whakatane','North Island','Puerto Rico','6911','(643) 307-6110','(513) 179-6087','rutrum.urna.nec@arcuNuncmauris.com'),(3,'P.O. Box 204, 5645 Aliquam St.','Anderlecht','Brussels Hoofdstedelijk Gewest','Dominican Republic','82708','(490) 331-3342','(542) 876-7586','malesuada.vel.venenatis@tempusmauris.edu'),(1,'Ap #788-5061 Condimentum. Ave','Essen','NW','Hong Kong','7159AU','(519) 556-8844','(703) 144-3149','Aliquam@magnis.edu'); -INSERT INTO "pizza_contact" (contactType,contactStreet1,contactCity,contactState,country,contactZip,contactPhone1,contactPhone2,contactEmail) VALUES (1,'P.O. Box 827, 4386 Nascetur Rd.','Huara','I','Swaziland','S8X 4X8','(730) 650-1295','(530) 126-3033','est.tempor@est.edu'),(1,'7363 Mi Street','Pogliano Milanese','Lombardia','Guatemala','40-152','(228) 934-2804','(619) 322-4748','luctus@rhoncusProin.net'),(2,'501-586 Elit, Rd.','Lochranza','BU','Nigeria','5923RZ','(901) 849-5341','(247) 335-1805','volutpat.Nulla.dignissim@nondapibusrutrum.ca'),(1,'P.O. Box 742, 2352 Vitae, St.','Monteu Roero','PIE','Kuwait','P66 4PL','(684) 892-5226','(988) 168-0852','dolor@inhendreritconsectetuer.co.uk'),(3,'Ap #499-1370 Risus. Street','Dublin','Leinster','Ireland','376064','(744) 511-3461','(671) 321-9792','id@scelerisque.net'),(2,'Ap #698-5215 Nunc. Road','Portsmouth','HA','Albania','57699','(148) 424-5432','(857) 722-5000','amet.dapibus.id@eu.net'),(2,'5551 A Rd.','Katsina','KT','Antarctica','P0J 8J5','(432) 537-6898','(500) 104-9040','Proin.eget.odio@In.net'),(1,'P.O. Box 296, 2262 Lorem. Av.','Châlons-en-Champagne','CH','Swaziland','496557','(645) 475-5459','(946) 851-6480','risus.Nulla@bibendum.net'),(1,'4133 Sociis Road','Independence','MO','Namibia','27184','(680) 155-9420','(213) 216-7962','Maecenas.libero.est@fringillaeuismodenim.ca'),(3,'964-8244 Tellus Street','Birmingham','Alabama','Luxembourg','Y6R 0E1','(510) 231-1132','(377) 165-3929','adipiscing.enim@posuerecubilia.ca'); -INSERT INTO "pizza_contact" (contactType,contactStreet1,contactCity,contactState,country,contactZip,contactPhone1,contactPhone2,contactEmail) VALUES (3,'Ap #829-4163 Sed Rd.','Gravilias','San José','Jamaica','5657UF','(718) 609-9627','(187) 481-9243','dui.Cum.sociis@parturient.org'),(2,'P.O. Box 539, 3730 Nisi Rd.','Orhangazi','Bur','United Arab Emirates','51539','(380) 714-6951','(579) 807-8261','ipsum.Donec@dui.com'),(1,'285-6025 Mauris. Av.','Glendon','Alberta','Montserrat','51204','(650) 402-4352','(748) 921-4928','quis.diam@aptenttaciti.net'),(3,'Ap #553-4089 Cras St.','Maiduguri','BO','Mali','42345','(663) 234-6989','(976) 630-0351','sed.dolor@Loremipsum.edu'),(3,'P.O. Box 923, 9609 Nisi Ave','Trollhättan','Västra Götalands län','Senegal','525079','(906) 117-5542','(540) 172-1723','tincidunt.vehicula@vestibulum.net'),(1,'Ap #172-2694 Auctor. St.','Dublin','Leinster','Bermuda','12384','(440) 610-8259','(619) 632-3356','consectetuer@dignissimtempor.org'),(3,'P.O. Box 467, 3450 Sollicitudin Rd.','Rangiora','South Island','Solomon Islands','61908','(988) 847-2649','(340) 132-4573','arcu@Sedegetlacus.edu'),(1,'2427 Nonummy Av.','Lourdes','Manitoba','Tuvalu','3802','(366) 761-5730','(733) 903-9619','euismod.enim.Etiam@mitemporlorem.edu'),(1,'P.O. Box 391, 6885 Dapibus Street','Katowice','SL','Botswana','12780','(139) 260-8185','(466) 860-4128','enim.diam.vel@SuspendisseeleifendCras.org'),(1,'Ap #812-9958 Vitae, Rd.','Batiscan','QC','Grenada','62230','(482) 582-8414','(411) 301-2406','id@feugiatmetussit.co.uk'); -INSERT INTO "pizza_contact" (contactType,contactStreet1,contactCity,contactState,country,contactZip,contactPhone1,contactPhone2,contactEmail) VALUES (3,'Ap #819-9077 Lobortis St.','Etterbeek','Brussels Hoofdstedelijk Gewest','Poland','W28 9WS','(144) 512-2850','(170) 344-1954','pretium@commodoat.ca'),(1,'499-7580 Interdum. Ave','Liverpool','NSW','Mauritania','88828','(386) 943-3628','(296) 668-6734','ut.molestie@lacus.com'),(2,'348-3496 Mollis Road','Albi','Midi-Pyrénées','Laos','1050IO','(691) 995-8811','(359) 512-5437','risus@varius.org'),(1,'349-9303 Urna Av.','Dublin','L','Virgin Islands, British','66151','(510) 719-9512','(385) 944-5452','Donec.consectetuer@ametrisusDonec.ca'),(3,'Ap #499-8233 Consectetuer Avenue','Minturno','LAZ','Bangladesh','83362-922','(458) 802-3683','(519) 500-9151','quis@Sedauctor.com'),(1,'Ap #772-4697 Arcu. St.','Castri di Lecce','Puglia','Tajikistan','09515','(762) 887-7084','(819) 677-3057','eu.lacus.Quisque@scelerisquescelerisquedui.co.uk'),(2,'P.O. Box 587, 4473 Gravida St.','Feilding','North Island','Nigeria','VT9 2WS','(586) 609-9925','(222) 500-0485','Cras@rutrum.org'),(3,'3704 Cras Street','Lloydminster','AB','Cambodia','3750','(330) 879-4505','(915) 736-4447','Ut.nec.urna@Vestibulumuteros.org'),(2,'P.O. Box 549, 5701 Elit Road','Çermik','Diyarbakır','Timor-Leste','54498','(179) 335-7590','(340) 553-9460','amet.risus.Donec@mattis.net'),(2,'Ap #261-5280 Purus Rd.','Toledo','Castilla - La Mancha','Georgia','3051','(381) 805-9980','(143) 829-7437','volutpat.ornare.facilisis@non.com'); -INSERT INTO "pizza_contact" (contactType,contactStreet1,contactCity,contactState,country,contactZip,contactPhone1,contactPhone2,contactEmail) VALUES (1,'P.O. Box 885, 1981 Iaculis St.','Tarnów','Małopolskie','Moldova','77604','(265) 247-5581','(283) 854-0181','ligula.Aliquam@interdumligula.net'),(3,'P.O. Box 670, 3097 Tincidunt Av.','Stalowa Wola','Podkarpackie','Thailand','8547','(926) 557-4188','(428) 262-4607','Aliquam.erat@interdumNunc.com'),(2,'P.O. Box 574, 3225 Leo. Rd.','Anchorage','Alaska','Oman','7532','(229) 441-9584','(758) 127-4761','eu@ultricessitamet.co.uk'),(3,'7806 Hendrerit Rd.','Gliwice','Sląskie','Poland','50310','(778) 327-5435','(812) 514-9829','Vivamus.sit@MorbimetusVivamus.co.uk'),(3,'6728 Elementum Rd.','Pierrefonds','QC','Luxembourg','35426','(870) 828-8623','(996) 549-2327','commodo@convallis.org'),(1,'Ap #688-9939 Non, Rd.','Stratford','PE','Nauru','20857','(562) 308-2655','(260) 669-7059','orci.luctus@eleifend.org'),(1,'Ap #714-4049 Cursus. Av.','Abaetetuba','PA','Bangladesh','T1L 4V7','(710) 832-0063','(768) 821-7797','penatibus.et.magnis@dictumeleifend.org'),(3,'8482 Dolor. Road','Södertälje','AB','Costa Rica','39712','(400) 755-4388','(417) 774-9760','Donec.tempus.lorem@odiovelest.net'),(3,'Ap #405-9888 Mollis. Avenue','Gboko','BE','Guyana','5805','(228) 166-9393','(355) 364-8220','Aenean.eget.magna@ProinultricesDuis.edu'),(1,'5242 Ullamcorper. Avenue','Schagen','N.','Tokelau','57432','(830) 184-5989','(771) 934-0558','In.faucibus.Morbi@quis.co.uk'); -INSERT INTO "pizza_contact" (contactType,contactStreet1,contactCity,contactState,country,contactZip,contactPhone1,contactPhone2,contactEmail) VALUES (1,'4356 Tellus Street','Stokkem','L.','Madagascar','60650','(520) 335-4956','(961) 512-2566','feugiat.non.lobortis@loremeget.ca'),(3,'980-9803 In Street','Ñuñoa','RM','Yemen','A7N 0G2','(589) 822-7852','(746) 251-2115','ligula.Aenean.gravida@Donecdignissim.edu'),(3,'7577 Justo Ave','Owerri','Imo','Faroe Islands','8065','(770) 636-6292','(800) 245-8201','purus.in@IncondimentumDonec.co.uk'),(3,'7673 Nullam Av.','Vienna','Vienna','Sudan','940996','(348) 558-8928','(528) 838-7409','convallis.erat.eget@orcilacusvestibulum.edu'),(1,'329-4359 Velit. Rd.','Vienna','Wie','Israel','30138','(201) 987-7157','(483) 738-9780','fringilla.euismod@nequesedsem.edu'),(3,'675-3741 Risus. Rd.','Le Mans','PA','Taiwan','53574','(251) 701-9704','(279) 102-3985','odio.sagittis.semper@orci.org'),(2,'438-8065 Vitae Avenue','Alajuela','A','Guernsey','49036','(586) 597-0175','(606) 421-0352','magna@lectusquismassa.com'),(3,'Ap #744-3887 Luctus Road','Oss','Noord Brabant','San Marino','510746','(158) 523-7871','(515) 586-9023','egestas.ligula.Nullam@ultriciesdignissimlacus.net'),(1,'P.O. Box 951, 7618 Aliquet St.','Torrevieja','CV','Montserrat','H4Z 2K9','(979) 604-2688','(573) 214-8644','diam@sociosquadlitora.com'),(3,'Ap #711-2045 Cras Avenue','Tongerlo','AN','French Polynesia','872049','(197) 121-4518','(271) 645-6341','leo@lacusUtnec.edu'); -INSERT INTO "pizza_contact" (contactType,contactStreet1,contactCity,contactState,country,contactZip,contactPhone1,contactPhone2,contactEmail) VALUES (2,'5321 Sed St.','Dalkeith','ML','Thailand','10451','(546) 894-0145','(334) 641-0654','id@lacus.net'),(3,'2616 Imperdiet Rd.','Fremantle','Western Australia','Jordan','29119-419','(553) 431-1330','(744) 313-4993','penatibus@cursuset.ca'),(3,'P.O. Box 360, 7009 Mattis. Av.','Flin Flon','MB','Madagascar','6221','(741) 916-2159','(218) 450-4910','auctor@euismodmauriseu.com'),(1,'121-5743 Morbi Ave','Ananindeua','PA','Sri Lanka','4852','(820) 223-2258','(609) 185-2223','non.enim.commodo@eratvel.co.uk'),(1,'Ap #288-6805 Erat Avenue','Pozantı','Ada','Martinique','3438','(539) 217-4806','(913) 495-8717','ac@euodio.co.uk'),(1,'721-2381 Arcu. Av.','Blehen','Luik','Turkey','85-295','(556) 918-4072','(529) 990-3229','rutrum.urna.nec@utpharetrased.edu'),(1,'566-9819 Duis Ave','Oudergem','Brussels Hoofdstedelijk Gewest','Ethiopia','3515','(809) 311-6456','(731) 476-2919','Ut@Crasdolordolor.com'),(3,'5537 Netus St.','Lagos','Lagos','Comoros','73424','(449) 662-9853','(355) 715-9678','non.sapien.molestie@sagittisplaceratCras.com'),(1,'Ap #326-5031 Montes, St.','Berlin','Berlin','Norway','748110','(325) 767-0784','(669) 699-1179','sem.ut@duiSuspendisseac.ca'),(3,'161-5097 Dui. St.','Vänersborg','O','Armenia','48407','(343) 846-5626','(864) 141-3303','tincidunt.orci.quis@dignissimlacus.ca'); -INSERT INTO "pizza_contact" (contactType,contactStreet1,contactCity,contactState,country,contactZip,contactPhone1,contactPhone2,contactEmail) VALUES (3,'9960 Nunc Av.','Stockton-on-Tees','DU','Belgium','V1H 3G2','(241) 501-9751','(952) 682-3831','libero.Morbi.accumsan@cursusluctusipsum.org'),(1,'P.O. Box 584, 551 Ante, Rd.','Carlisle','CU','Burkina Faso','28650','(474) 403-5007','(621) 316-4436','netus.et.malesuada@ut.org'),(3,'9491 Ut Rd.','Lozzo Atestino','VEN','Guatemala','7309','(164) 711-8850','(705) 132-7260','consectetuer.mauris.id@semeget.com'),(2,'9351 Sem Ave','Santa Coloma de Gramenet','CA','Belarus','70211','(549) 297-9761','(413) 925-3580','nec@estacmattis.com'),(1,'Ap #253-7173 Non, Road','Pukekohe','NI','New Zealand','11165','(982) 811-6105','(930) 217-2672','molestie.arcu.Sed@ullamcorpereueuismod.org'),(1,'Ap #515-8714 Enim Ave','Penna in Teverina','Umbria','Åland Islands','5544','(700) 269-7212','(544) 608-4276','lectus.ante@Morbineque.co.uk'),(1,'5021 Commodo Street','Toronto','ON','Belgium','7561','(916) 248-1724','(269) 685-6784','elementum.dui.quis@elitNulla.edu'),(2,'2616 Suspendisse Avenue','Albury','NSW','Saint Barthélemy','4223','(980) 673-7010','(765) 571-9775','non.lorem@auctorveliteget.org'),(3,'747-6010 Cras Ave','Greater Sudbury','ON','Belize','577692','(675) 757-6934','(973) 341-6375','in.lobortis.tellus@nequeetnunc.com'),(2,'P.O. Box 999, 1898 Eu Rd.','Berlin','Berlin','Tokelau','151446','(676) 765-8454','(972) 162-9878','Quisque.imperdiet@viverraDonectempus.net'); diff --git a/datasets/sql/contact.sql b/datasets/sql/contact.sql deleted file mode 100644 index f2d05ad..0000000 --- a/datasets/sql/contact.sql +++ /dev/null @@ -1,26 +0,0 @@ -DROP TABLE `pizza_contact`; - -CREATE TABLE `pizza_contact` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `contactType` mediumint default NULL, - `contactStreet1` varchar(255) default NULL, - `contactCity` varchar(255), - `contactState` varchar(50) default NULL, - `country` varchar(100) default NULL, - `contactZip` varchar(10) default NULL, - `contactPhone1` varchar(100) default NULL, - `contactPhone2` varchar(100) default NULL, - `contactEmail` varchar(255) default NULL, - PRIMARY KEY (`id`) -) AUTO_INCREMENT=1; - -INSERT INTO `pizza_contact` (`contactType`,`contactStreet1`,`contactCity`,`contactState`,`country`,`contactZip`,`contactPhone1`,`contactPhone2`,`contactEmail`) VALUES (1,"P.O. Box 418, 1731 A St.","Verdun","Quebec","Tuvalu","34518","(734) 883-3269","(359) 942-7446","ultrices.Duis@tellusidnunc.org"),(1,"5228 Lorem Street","Ercilla","IX","Slovakia","58-334","(601) 388-8543","(396) 183-3156","mi@aliquet.net"),(1,"Ap #540-7069 Hendrerit St.","Frankston","Victoria","Uzbekistan","71206","(843) 784-5628","(433) 502-8907","ante@et.org"),(3,"Ap #429-9225 Magna. Avenue","Alcalá de Henares","Madrid","New Caledonia","48410","(730) 786-6036","(594) 442-6336","Duis.volutpat@morbitristique.net"),(2,"485-5224 Gravida Avenue","Toruń","Kujawsko-pomorskie","Morocco","41-170","(393) 984-5139","(784) 500-1544","auctor.ullamcorper@congueelit.net"),(1,"265-7608 Sed Rd.","San Rafael","Alajuela","Vanuatu","53038","(397) 171-0664","(392) 265-1187","aliquet.nec@varius.net"),(2,"8307 Rutrum St.","Norman","OK","New Caledonia","154519","(449) 644-8326","(841) 374-6329","lectus.a@risusaultricies.com"),(1,"Ap #437-1201 Dis Rd.","Independencia","Metropolitana de Santiago","Namibia","26397","(499) 775-2591","(275) 791-4502","Nam.ac@euismod.co.uk"),(3,"879-2807 Phasellus Rd.","Osasco","São Paulo","Pakistan","V5T 6E1","(429) 593-2317","(221) 916-8436","id.ante.Nunc@eu.com"),(1,"5786 Aenean Av.","Dublin","Leinster","France","66607","(125) 270-5877","(889) 683-7862","tincidunt@facilisis.ca"); -INSERT INTO `pizza_contact` (`contactType`,`contactStreet1`,`contactCity`,`contactState`,`country`,`contactZip`,`contactPhone1`,`contactPhone2`,`contactEmail`) VALUES (2,"7132 Mauris Av.","Carapicuíba","São Paulo","Turkey","6575QA","(392) 874-0064","(806) 701-4638","sapien.Aenean.massa@felisullamcorperviverra.ca"),(1,"Ap #996-1520 Porttitor Rd.","Reading","PA","Saint Kitts and Nevis","16-471","(309) 784-5693","(438) 335-0869","cursus.non@malesuadavelvenenatis.org"),(1,"Ap #862-2947 Dictum St.","Ananindeua","PA","United Arab Emirates","383468","(949) 895-5959","(338) 157-1495","ac@consequatlectus.com"),(2,"Ap #763-9103 Volutpat Avenue","Champigny-sur-Marne","IL","Azerbaijan","1860LC","(852) 231-2830","(488) 110-6602","rhoncus.Nullam.velit@velconvallisin.co.uk"),(3,"6206 Nulla Av.","Kapelle-op-den-Bos","Vlaams-Brabant","Jordan","64132","(453) 448-1457","(335) 690-6090","vitae@magnaLoremipsum.org"),(1,"Ap #811-4558 Blandit Avenue","Tacoma","WA","Georgia","2243QX","(857) 605-6702","(937) 109-5594","magna.Cras@lacusQuisque.net"),(1,"P.O. Box 767, 2519 Consectetuer Avenue","Bundaberg","Queensland","Spain","7266","(984) 435-3398","(742) 889-2331","auctor@fringillaporttitor.co.uk"),(3,"P.O. Box 403, 3382 Maecenas Av.","Lasnigo","LOM","Lithuania","89-924","(357) 454-3144","(337) 110-5127","dui.Suspendisse@felisDonectempor.net"),(1,"P.O. Box 278, 8142 Sit Avenue","Piracicaba","São Paulo","Maldives","1681","(720) 556-6104","(481) 694-2964","viverra.Maecenas@etmagnisdis.edu"),(1,"627-3558 Aliquet St.","Aurora","Colorado","Mauritius","6419","(703) 916-9278","(212) 467-4571","metus.sit.amet@dapibusgravidaAliquam.edu"); -INSERT INTO `pizza_contact` (`contactType`,`contactStreet1`,`contactCity`,`contactState`,`country`,`contactZip`,`contactPhone1`,`contactPhone2`,`contactEmail`) VALUES (1,"P.O. Box 664, 7527 Dictum Road","Sylvan Lake","Alberta","Rwanda","952675","(698) 879-9999","(808) 720-9420","dui@convallis.com"),(2,"Ap #293-9420 Neque. Street","Quesada","Alajuela","Zimbabwe","4987AM","(570) 973-4319","(174) 491-9908","Donec.elementum@consequatnec.net"),(3,"Ap #479-142 Ridiculus Avenue","Santiago","RM","Dominican Republic","8356","(123) 514-2458","(637) 417-6697","ut.molestie.in@commodoipsum.ca"),(2,"348-8246 Lectus. Avenue","Belfast","U","Maldives","8382SM","(928) 240-1738","(873) 481-9815","mauris@Cras.net"),(2,"Ap #343-5903 Per St.","Kayseri","Kayseri","Viet Nam","60508","(731) 867-7252","(576) 369-0982","quis@enim.ca"),(3,"Ap #196-4824 Vulputate, Street","Menai Bridge","AG","Cook Islands","922364","(759) 662-7014","(136) 148-0122","ac@Curabiturutodio.com"),(2,"895 Nisl Avenue","Moradabad","Uttar Pradesh","Spain","01638-897","(844) 989-0128","(558) 714-6265","Maecenas.libero@velit.net"),(1,"9579 Amet Avenue","Katsina","KT","Saint Kitts and Nevis","2085IH","(465) 979-6282","(432) 953-2018","varius.Nam.porttitor@lacusQuisque.co.uk"),(1,"Ap #269-7652 Eu, St.","Damoh","Madhya Pradesh","Fiji","70078","(190) 169-1975","(200) 997-0223","elit.elit.fermentum@sagittis.ca"),(2,"P.O. Box 454, 8944 Molestie St.","Collines-de-l'Outaouais","QC","Ghana","5549","(537) 739-1614","(542) 605-6232","ligula.elit@purus.net"); -INSERT INTO `pizza_contact` (`contactType`,`contactStreet1`,`contactCity`,`contactState`,`country`,`contactZip`,`contactPhone1`,`contactPhone2`,`contactEmail`) VALUES (3,"508-7176 Nibh Avenue","Gävle","X","Bosnia and Herzegovina","97382","(643) 753-7300","(318) 193-3500","aliquam.enim@eu.co.uk"),(1,"Ap #366-6581 Torquent St.","Créteil","Île-de-France","Virgin Islands, United States","96124-349","(820) 587-5064","(614) 368-5678","vitae.mauris@lobortisquis.net"),(2,"P.O. Box 124, 5437 Mauris. St.","Purranque","X","Estonia","6879","(958) 162-4396","(736) 573-4531","nonummy.Fusce.fermentum@Namconsequatdolor.edu"),(1,"Ap #570-7263 Dis Av.","Vienna","Wie","Kazakhstan","135653","(384) 320-1281","(626) 574-8134","nec.urna@condimentum.org"),(1,"P.O. Box 895, 1581 Sem, Road","Kano","Kano","Slovakia","3269","(103) 109-4741","(566) 378-3013","arcu@acfacilisis.org"),(1,"8375 Nulla Av.","Delhi","DL","Western Sahara","4500","(200) 995-8579","(322) 813-5360","facilisis.Suspendisse@semsempererat.net"),(3,"Ap #434-858 Tempus Street","Quesada","A","Mexico","13530","(870) 333-6397","(562) 753-0924","erat.vitae.risus@feugiatnec.co.uk"),(1,"1762 Metus St.","Farciennes","HE","Tunisia","92725","(671) 635-2819","(509) 929-8783","diam.Pellentesque.habitant@ipsum.net"),(3,"435-5760 Metus St.","Cascavel","Paraná","Germany","5552","(685) 570-9615","(694) 382-2718","a.aliquet@scelerisquesedsapien.org"),(2,"156-6232 Lacus. St.","Bahraich","UP","Korea, North","11261","(902) 712-1526","(958) 918-7716","libero.mauris.aliquam@posuere.ca"); -INSERT INTO `pizza_contact` (`contactType`,`contactStreet1`,`contactCity`,`contactState`,`country`,`contactZip`,`contactPhone1`,`contactPhone2`,`contactEmail`) VALUES (3,"Ap #233-7998 Vestibulum. Ave","Anápolis","Goiás","Seychelles","KK84 2AA","(361) 295-1257","(869) 950-3394","ornare.elit@necligula.org"),(2,"160-5411 Non, Rd.","Pali","Rajasthan","Somalia","10519","(449) 907-1229","(553) 564-3813","in.dolor.Fusce@maurisblandit.edu"),(2,"Ap #575-8111 Vestibulum. Av.","Pontarlier","Franche-Comté","Korea, North","SB3F 2KI","(977) 334-2944","(185) 151-3656","enim@odiosemper.net"),(1,"7646 Magna. Street","Borghetto di Borbera","Piemonte","Guadeloupe","KA08 8UK","(943) 109-7371","(160) 936-4433","quis@enimgravida.net"),(2,"Ap #798-2162 In, Avenue","Lang","Saskatchewan","Niger","76358","(266) 628-4165","(922) 790-0061","risus.odio.auctor@enimEtiam.ca"),(2,"876 In St.","Morpeth","NB","Mali","76327","(520) 345-5352","(634) 688-5442","mauris.eu.elit@gravidamauris.co.uk"),(1,"4901 Ac Street","Alcorcón","MA","Rwanda","96127-657","(979) 678-9455","(837) 481-4269","volutpat.nunc.sit@Classaptent.edu"),(1,"9073 Sagittis Rd.","Hamburg","HH","Puerto Rico","05743","(999) 935-3203","(994) 158-4988","erat@veliteusem.ca"),(3,"P.O. Box 494, 2736 Neque Ave","Puri","Odisha","France","07104","(621) 320-7982","(133) 668-1359","dolor.Donec.fringilla@NullamenimSed.edu"),(3,"971-3986 Ac, Rd.","Cork","M","Peru","80879","(161) 656-6131","(845) 471-5726","lectus.sit@sitamet.edu"); -INSERT INTO `pizza_contact` (`contactType`,`contactStreet1`,`contactCity`,`contactState`,`country`,`contactZip`,`contactPhone1`,`contactPhone2`,`contactEmail`) VALUES (1,"P.O. Box 448, 6504 Quisque Avenue","Toulon","PR","Tonga","21197","(910) 365-0680","(184) 128-2250","arcu.Aliquam@accumsan.co.uk"),(3,"P.O. Box 451, 8640 Pellentesque Avenue","Calle Blancos","SJ","Macao","5750","(926) 961-2818","(511) 304-9810","et@sit.co.uk"),(3,"P.O. Box 466, 1103 Lectus Rd.","Thines","WB","Iceland","45592","(214) 366-3205","(613) 444-8495","metus.facilisis.lorem@sed.edu"),(3,"P.O. Box 703, 6390 Posuere, Avenue","Llanidloes","Montgomeryshire","Mozambique","C5H 4Y2","(175) 811-8121","(264) 393-1098","Suspendisse@porttitorinterdum.ca"),(2,"5034 Phasellus Av.","Fontenoille","Luxemburg","Laos","V65 4FI","(647) 308-1637","(250) 204-1093","nibh.sit.amet@metusfacilisis.org"),(1,"296-1140 Donec Av.","Kızılcahamam","Ankara","El Salvador","34343","(889) 575-2809","(452) 457-3327","eu.ligula@mi.net"),(1,"4360 Ac St.","Hamburg","Hamburg","Macedonia","968063","(687) 739-6046","(511) 130-1557","aliquet@mauris.org"),(2,"1620 Ante Street","Milford Haven","Pembrokeshire","Norway","8348","(750) 944-6035","(503) 180-2645","tempor.diam@estmollis.net"),(1,"P.O. Box 351, 8511 Adipiscing. Ave","Uyo","Akwa Ibom","Peru","4852","(560) 680-4471","(188) 401-0850","tellus.imperdiet.non@infaucibus.edu"),(2,"P.O. Box 502, 4213 Tristique St.","Kungälv","Västra Götalands län","Niger","71719","(285) 338-6665","(212) 805-8479","ac@turpis.org"); -INSERT INTO `pizza_contact` (`contactType`,`contactStreet1`,`contactCity`,`contactState`,`country`,`contactZip`,`contactPhone1`,`contactPhone2`,`contactEmail`) VALUES (1,"P.O. Box 231, 5893 Quisque Av.","Macklin","SK","Luxembourg","20803","(860) 765-3573","(557) 866-5710","dictum.Proin@dolor.com"),(3,"Ap #508-3656 Nibh St.","Scalloway","SH","Monaco","934883","(784) 180-3819","(577) 688-3766","faucibus.ut.nulla@adipiscing.net"),(3,"P.O. Box 968, 4705 Velit Road","Vienna","Vienna","Spain","80419","(103) 712-9138","(680) 853-6048","nonummy.ipsum@vitaeerat.net"),(3,"P.O. Box 275, 6553 Donec Road","Racine","Wisconsin","Palau","M9T 3Y0","(625) 166-1981","(157) 388-4465","ut.dolor@Nam.com"),(2,"P.O. Box 680, 9623 Mollis St.","Den Helder","Noord Holland","Nepal","K4L 9L7","(613) 755-6707","(129) 907-4510","massa.Mauris.vestibulum@magna.co.uk"),(1,"P.O. Box 292, 7058 Lorem, St.","L'Hospitalet de Llobregat","CA","Burundi","06054","(957) 571-5724","(755) 784-7456","mauris.Morbi@ac.co.uk"),(3,"P.O. Box 800, 7278 Auctor, Ave","Hohenems","Vbg","Chad","46345","(748) 989-5762","(665) 700-0097","neque.Sed.eget@tristiquesenectus.edu"),(1,"P.O. Box 708, 6340 Neque St.","Casablanca","V","Marshall Islands","803706","(359) 821-4854","(538) 963-8009","sapien.Aenean.massa@odio.org"),(1,"131 Nec, St.","Soria","Castilla y León","Iraq","2097","(858) 784-7339","(878) 593-0799","dolor.Quisque@nislelementum.net"),(2,"5116 Imperdiet, St.","Jaén","AN","Canada","5714QA","(230) 876-0864","(290) 619-1480","Proin.ultrices@enim.ca"); -INSERT INTO `pizza_contact` (`contactType`,`contactStreet1`,`contactCity`,`contactState`,`country`,`contactZip`,`contactPhone1`,`contactPhone2`,`contactEmail`) VALUES (3,"Ap #588-1798 In Ave","Columbus","GA","Belize","6121","(452) 602-0450","(726) 103-9367","nisi.nibh@sagittissemperNam.com"),(2,"570-3657 Nam St.","Gold Coast","Queensland","Bahamas","69822-583","(128) 843-4074","(782) 195-5540","Vestibulum.ante@mauris.com"),(3,"704-8036 Ultricies St.","Licantén","VII","Iraq","P1K 2C2","(263) 757-1455","(653) 814-6044","ut@metusfacilisislorem.edu"),(2,"787-6323 Arcu. Avenue","Uyo","AK","Barbados","8347","(520) 318-1345","(562) 402-7864","feugiat@elitpellentesque.ca"),(1,"1229 At Rd.","Newbury","ON","Thailand","3177","(244) 852-0310","(306) 671-9231","sem.mollis.dui@bibendumsedest.edu"),(1,"P.O. Box 588, 9079 Feugiat Av.","Issy-les-Moulineaux","Île-de-France","South Sudan","050597","(737) 896-9024","(591) 503-8268","risus.Nulla@ipsumac.com"),(1,"P.O. Box 375, 5105 Sollicitudin St.","Hamilton","Victoria","Saint Helena, Ascension and Tristan da Cunha","148045","(376) 406-6879","(738) 974-3488","Cum.sociis.natoque@sedpede.co.uk"),(3,"P.O. Box 137, 3470 Nec Rd.","Strasbourg","Alsace","Yemen","12374","(232) 353-4328","(392) 976-9725","amet.consectetuer@volutpat.co.uk"),(3,"P.O. Box 664, 6324 Fringilla Street","Mjölby","Östergötlands län","New Zealand","10255-047","(559) 375-7586","(864) 417-0972","lacinia.Sed.congue@natoquepenatibuset.co.uk"),(1,"Ap #297-698 Non Av.","Ankara","Ank","Bouvet Island","NG0 2DG","(164) 173-0270","(371) 422-7002","urna@Etiamvestibulum.co.uk"); -INSERT INTO `pizza_contact` (`contactType`,`contactStreet1`,`contactCity`,`contactState`,`country`,`contactZip`,`contactPhone1`,`contactPhone2`,`contactEmail`) VALUES (1,"198-9134 Vel Av.","Osogbo","OS","Laos","852140","(765) 429-4984","(729) 648-0652","semper.tellus.id@Craseu.net"),(3,"Ap #831-4866 Vehicula Av.","Meridian","ID","Congo, the Democratic Republic of the","312342","(615) 959-6433","(305) 598-3126","Nunc.commodo.auctor@libero.net"),(3,"2042 Nisl St.","Delitzsch","Saxony","Wallis and Futuna","37703","(197) 335-6859","(339) 216-6334","tortor.Nunc@semperduilectus.net"),(2,"9325 Tempus Street","Vienna","Wie","Mauritania","91471-785","(759) 483-0483","(340) 962-8977","tempor.diam@nuncacmattis.edu"),(2,"Ap #135-9545 Faucibus Ave","Haddington","East Lothian","Svalbard and Jan Mayen Islands","364781","(387) 689-4817","(375) 641-7434","ipsum.Suspendisse@utpharetrased.com"),(2,"899-8384 Aliquet. Rd.","Zamora","CL","Malawi","270869","(696) 307-4042","(176) 534-1338","lorem@utipsumac.com"),(3,"P.O. Box 703, 4458 Semper St.","Sluis","Zl","Lebanon","68-198","(606) 772-5238","(360) 658-9318","mollis.vitae@Praesentinterdum.edu"),(1,"Ap #190-6434 Tristique Street","Melton","Victoria","Kyrgyzstan","31010","(888) 927-1365","(934) 313-7378","a@sollicitudin.org"),(1,"7309 Cum Rd.","Ludvika","Dalarnas län","Falkland Islands","N2I 9AP","(563) 471-7003","(744) 393-2260","cursus.et@Suspendisseeleifend.co.uk"),(3,"Ap #944-158 Bibendum Avenue","Vienna","Vienna","Mauritania","79078-516","(968) 683-7591","(218) 494-4460","facilisis@tortor.net"); -INSERT INTO `pizza_contact` (`contactType`,`contactStreet1`,`contactCity`,`contactState`,`country`,`contactZip`,`contactPhone1`,`contactPhone2`,`contactEmail`) VALUES (2,"Ap #707-9496 Non, St.","Aurora","Colorado","Bosnia and Herzegovina","87578","(495) 140-4161","(403) 902-6560","interdum.ligula@ligulaAliquam.co.uk"),(2,"P.O. Box 395, 8774 Id Road","Dublin","Leinster","Andorra","84-554","(602) 696-6965","(884) 312-6561","faucibus.lectus.a@tinciduntadipiscing.edu"),(2,"Ap #707-6746 Curabitur Ave","Barranca","Puntarenas","Iceland","19351","(615) 146-6304","(692) 641-4023","nec@nonenimMauris.com"),(1,"4690 Duis St.","Kanpur Cantonment","UP","Nicaragua","99312","(666) 953-1016","(830) 564-5881","sagittis.placerat.Cras@Nuncmauris.org"),(2,"P.O. Box 672, 5342 Erat Rd.","Shillong","ML","Puerto Rico","9444","(662) 457-6190","(685) 199-1050","dictum.magna@vitaediamProin.co.uk"),(1,"P.O. Box 962, 816 Non, Rd.","Turnhout","Antwerpen","Gibraltar","5856ZJ","(549) 296-4347","(677) 429-3547","auctor.nunc@acmieleifend.org"),(1,"Ap #294-9347 Ipsum St.","Zeist","Utrecht","Micronesia","55892","(612) 282-5877","(602) 824-7495","ullamcorper@CraspellentesqueSed.org"),(2,"3228 Libero Rd.","Invercargill","South Island","Zimbabwe","1837","(120) 185-4399","(393) 179-0452","metus@consequat.co.uk"),(2,"716-3837 Luctus, Street","Forchies-la-Marche","Henegouwen","Tuvalu","669950","(970) 580-8733","(930) 874-9153","et@purusgravida.net"),(2,"6877 Sociis St.","Colombo","Paraná","Kyrgyzstan","83967","(645) 655-7086","(300) 921-5151","Donec@augue.org"); diff --git a/datasets/sql/contactNoBackticks.sql b/datasets/sql/contactNoBackticks.sql deleted file mode 100644 index d4d27db..0000000 --- a/datasets/sql/contactNoBackticks.sql +++ /dev/null @@ -1,26 +0,0 @@ -DROP TABLE pizza_contact; - -CREATE TABLE pizza_contact ( - id mediumint(8) unsigned NOT NULL auto_increment, - contactType mediumint default NULL, - contactStreet1 varchar(255) default NULL, - contactCity varchar(255), - contactState varchar(50) default NULL, - country varchar(100) default NULL, - contactZip varchar(10) default NULL, - contactPhone1 varchar(100) default NULL, - contactPhone2 varchar(100) default NULL, - contactEmail varchar(255) default NULL, - PRIMARY KEY (id) -) AUTO_INCREMENT=1; - -INSERT INTO pizza_contact (contactType,contactStreet1,contactCity,contactState,country,contactZip,contactPhone1,contactPhone2,contactEmail) VALUES (1,"P.O. Box 418, 1731 A St.","Verdun","Quebec","Tuvalu","34518","(734) 883-3269","(359) 942-7446","ultrices.Duis@tellusidnunc.org"),(1,"5228 Lorem Street","Ercilla","IX","Slovakia","58-334","(601) 388-8543","(396) 183-3156","mi@aliquet.net"),(1,"Ap #540-7069 Hendrerit St.","Frankston","Victoria","Uzbekistan","71206","(843) 784-5628","(433) 502-8907","ante@et.org"),(3,"Ap #429-9225 Magna. Avenue","Alcalá de Henares","Madrid","New Caledonia","48410","(730) 786-6036","(594) 442-6336","Duis.volutpat@morbitristique.net"),(2,"485-5224 Gravida Avenue","Toruń","Kujawsko-pomorskie","Morocco","41-170","(393) 984-5139","(784) 500-1544","auctor.ullamcorper@congueelit.net"),(1,"265-7608 Sed Rd.","San Rafael","Alajuela","Vanuatu","53038","(397) 171-0664","(392) 265-1187","aliquet.nec@varius.net"),(2,"8307 Rutrum St.","Norman","OK","New Caledonia","154519","(449) 644-8326","(841) 374-6329","lectus.a@risusaultricies.com"),(1,"Ap #437-1201 Dis Rd.","Independencia","Metropolitana de Santiago","Namibia","26397","(499) 775-2591","(275) 791-4502","Nam.ac@euismod.co.uk"),(3,"879-2807 Phasellus Rd.","Osasco","São Paulo","Pakistan","V5T 6E1","(429) 593-2317","(221) 916-8436","id.ante.Nunc@eu.com"),(1,"5786 Aenean Av.","Dublin","Leinster","France","66607","(125) 270-5877","(889) 683-7862","tincidunt@facilisis.ca"); -INSERT INTO pizza_contact (contactType,contactStreet1,contactCity,contactState,country,contactZip,contactPhone1,contactPhone2,contactEmail) VALUES (2,"7132 Mauris Av.","Carapicuíba","São Paulo","Turkey","6575QA","(392) 874-0064","(806) 701-4638","sapien.Aenean.massa@felisullamcorperviverra.ca"),(1,"Ap #996-1520 Porttitor Rd.","Reading","PA","Saint Kitts and Nevis","16-471","(309) 784-5693","(438) 335-0869","cursus.non@malesuadavelvenenatis.org"),(1,"Ap #862-2947 Dictum St.","Ananindeua","PA","United Arab Emirates","383468","(949) 895-5959","(338) 157-1495","ac@consequatlectus.com"),(2,"Ap #763-9103 Volutpat Avenue","Champigny-sur-Marne","IL","Azerbaijan","1860LC","(852) 231-2830","(488) 110-6602","rhoncus.Nullam.velit@velconvallisin.co.uk"),(3,"6206 Nulla Av.","Kapelle-op-den-Bos","Vlaams-Brabant","Jordan","64132","(453) 448-1457","(335) 690-6090","vitae@magnaLoremipsum.org"),(1,"Ap #811-4558 Blandit Avenue","Tacoma","WA","Georgia","2243QX","(857) 605-6702","(937) 109-5594","magna.Cras@lacusQuisque.net"),(1,"P.O. Box 767, 2519 Consectetuer Avenue","Bundaberg","Queensland","Spain","7266","(984) 435-3398","(742) 889-2331","auctor@fringillaporttitor.co.uk"),(3,"P.O. Box 403, 3382 Maecenas Av.","Lasnigo","LOM","Lithuania","89-924","(357) 454-3144","(337) 110-5127","dui.Suspendisse@felisDonectempor.net"),(1,"P.O. Box 278, 8142 Sit Avenue","Piracicaba","São Paulo","Maldives","1681","(720) 556-6104","(481) 694-2964","viverra.Maecenas@etmagnisdis.edu"),(1,"627-3558 Aliquet St.","Aurora","Colorado","Mauritius","6419","(703) 916-9278","(212) 467-4571","metus.sit.amet@dapibusgravidaAliquam.edu"); -INSERT INTO pizza_contact (contactType,contactStreet1,contactCity,contactState,country,contactZip,contactPhone1,contactPhone2,contactEmail) VALUES (1,"P.O. Box 664, 7527 Dictum Road","Sylvan Lake","Alberta","Rwanda","952675","(698) 879-9999","(808) 720-9420","dui@convallis.com"),(2,"Ap #293-9420 Neque. Street","Quesada","Alajuela","Zimbabwe","4987AM","(570) 973-4319","(174) 491-9908","Donec.elementum@consequatnec.net"),(3,"Ap #479-142 Ridiculus Avenue","Santiago","RM","Dominican Republic","8356","(123) 514-2458","(637) 417-6697","ut.molestie.in@commodoipsum.ca"),(2,"348-8246 Lectus. Avenue","Belfast","U","Maldives","8382SM","(928) 240-1738","(873) 481-9815","mauris@Cras.net"),(2,"Ap #343-5903 Per St.","Kayseri","Kayseri","Viet Nam","60508","(731) 867-7252","(576) 369-0982","quis@enim.ca"),(3,"Ap #196-4824 Vulputate, Street","Menai Bridge","AG","Cook Islands","922364","(759) 662-7014","(136) 148-0122","ac@Curabiturutodio.com"),(2,"895 Nisl Avenue","Moradabad","Uttar Pradesh","Spain","01638-897","(844) 989-0128","(558) 714-6265","Maecenas.libero@velit.net"),(1,"9579 Amet Avenue","Katsina","KT","Saint Kitts and Nevis","2085IH","(465) 979-6282","(432) 953-2018","varius.Nam.porttitor@lacusQuisque.co.uk"),(1,"Ap #269-7652 Eu, St.","Damoh","Madhya Pradesh","Fiji","70078","(190) 169-1975","(200) 997-0223","elit.elit.fermentum@sagittis.ca"),(2,"P.O. Box 454, 8944 Molestie St.","Collines-de-l'Outaouais","QC","Ghana","5549","(537) 739-1614","(542) 605-6232","ligula.elit@purus.net"); -INSERT INTO pizza_contact (contactType,contactStreet1,contactCity,contactState,country,contactZip,contactPhone1,contactPhone2,contactEmail) VALUES (3,"508-7176 Nibh Avenue","Gävle","X","Bosnia and Herzegovina","97382","(643) 753-7300","(318) 193-3500","aliquam.enim@eu.co.uk"),(1,"Ap #366-6581 Torquent St.","Créteil","Île-de-France","Virgin Islands, United States","96124-349","(820) 587-5064","(614) 368-5678","vitae.mauris@lobortisquis.net"),(2,"P.O. Box 124, 5437 Mauris. St.","Purranque","X","Estonia","6879","(958) 162-4396","(736) 573-4531","nonummy.Fusce.fermentum@Namconsequatdolor.edu"),(1,"Ap #570-7263 Dis Av.","Vienna","Wie","Kazakhstan","135653","(384) 320-1281","(626) 574-8134","nec.urna@condimentum.org"),(1,"P.O. Box 895, 1581 Sem, Road","Kano","Kano","Slovakia","3269","(103) 109-4741","(566) 378-3013","arcu@acfacilisis.org"),(1,"8375 Nulla Av.","Delhi","DL","Western Sahara","4500","(200) 995-8579","(322) 813-5360","facilisis.Suspendisse@semsempererat.net"),(3,"Ap #434-858 Tempus Street","Quesada","A","Mexico","13530","(870) 333-6397","(562) 753-0924","erat.vitae.risus@feugiatnec.co.uk"),(1,"1762 Metus St.","Farciennes","HE","Tunisia","92725","(671) 635-2819","(509) 929-8783","diam.Pellentesque.habitant@ipsum.net"),(3,"435-5760 Metus St.","Cascavel","Paraná","Germany","5552","(685) 570-9615","(694) 382-2718","a.aliquet@scelerisquesedsapien.org"),(2,"156-6232 Lacus. St.","Bahraich","UP","Korea, North","11261","(902) 712-1526","(958) 918-7716","libero.mauris.aliquam@posuere.ca"); -INSERT INTO pizza_contact (contactType,contactStreet1,contactCity,contactState,country,contactZip,contactPhone1,contactPhone2,contactEmail) VALUES (3,"Ap #233-7998 Vestibulum. Ave","Anápolis","Goiás","Seychelles","KK84 2AA","(361) 295-1257","(869) 950-3394","ornare.elit@necligula.org"),(2,"160-5411 Non, Rd.","Pali","Rajasthan","Somalia","10519","(449) 907-1229","(553) 564-3813","in.dolor.Fusce@maurisblandit.edu"),(2,"Ap #575-8111 Vestibulum. Av.","Pontarlier","Franche-Comté","Korea, North","SB3F 2KI","(977) 334-2944","(185) 151-3656","enim@odiosemper.net"),(1,"7646 Magna. Street","Borghetto di Borbera","Piemonte","Guadeloupe","KA08 8UK","(943) 109-7371","(160) 936-4433","quis@enimgravida.net"),(2,"Ap #798-2162 In, Avenue","Lang","Saskatchewan","Niger","76358","(266) 628-4165","(922) 790-0061","risus.odio.auctor@enimEtiam.ca"),(2,"876 In St.","Morpeth","NB","Mali","76327","(520) 345-5352","(634) 688-5442","mauris.eu.elit@gravidamauris.co.uk"),(1,"4901 Ac Street","Alcorcón","MA","Rwanda","96127-657","(979) 678-9455","(837) 481-4269","volutpat.nunc.sit@Classaptent.edu"),(1,"9073 Sagittis Rd.","Hamburg","HH","Puerto Rico","05743","(999) 935-3203","(994) 158-4988","erat@veliteusem.ca"),(3,"P.O. Box 494, 2736 Neque Ave","Puri","Odisha","France","07104","(621) 320-7982","(133) 668-1359","dolor.Donec.fringilla@NullamenimSed.edu"),(3,"971-3986 Ac, Rd.","Cork","M","Peru","80879","(161) 656-6131","(845) 471-5726","lectus.sit@sitamet.edu"); -INSERT INTO pizza_contact (contactType,contactStreet1,contactCity,contactState,country,contactZip,contactPhone1,contactPhone2,contactEmail) VALUES (1,"P.O. Box 448, 6504 Quisque Avenue","Toulon","PR","Tonga","21197","(910) 365-0680","(184) 128-2250","arcu.Aliquam@accumsan.co.uk"),(3,"P.O. Box 451, 8640 Pellentesque Avenue","Calle Blancos","SJ","Macao","5750","(926) 961-2818","(511) 304-9810","et@sit.co.uk"),(3,"P.O. Box 466, 1103 Lectus Rd.","Thines","WB","Iceland","45592","(214) 366-3205","(613) 444-8495","metus.facilisis.lorem@sed.edu"),(3,"P.O. Box 703, 6390 Posuere, Avenue","Llanidloes","Montgomeryshire","Mozambique","C5H 4Y2","(175) 811-8121","(264) 393-1098","Suspendisse@porttitorinterdum.ca"),(2,"5034 Phasellus Av.","Fontenoille","Luxemburg","Laos","V65 4FI","(647) 308-1637","(250) 204-1093","nibh.sit.amet@metusfacilisis.org"),(1,"296-1140 Donec Av.","Kızılcahamam","Ankara","El Salvador","34343","(889) 575-2809","(452) 457-3327","eu.ligula@mi.net"),(1,"4360 Ac St.","Hamburg","Hamburg","Macedonia","968063","(687) 739-6046","(511) 130-1557","aliquet@mauris.org"),(2,"1620 Ante Street","Milford Haven","Pembrokeshire","Norway","8348","(750) 944-6035","(503) 180-2645","tempor.diam@estmollis.net"),(1,"P.O. Box 351, 8511 Adipiscing. Ave","Uyo","Akwa Ibom","Peru","4852","(560) 680-4471","(188) 401-0850","tellus.imperdiet.non@infaucibus.edu"),(2,"P.O. Box 502, 4213 Tristique St.","Kungälv","Västra Götalands län","Niger","71719","(285) 338-6665","(212) 805-8479","ac@turpis.org"); -INSERT INTO pizza_contact (contactType,contactStreet1,contactCity,contactState,country,contactZip,contactPhone1,contactPhone2,contactEmail) VALUES (1,"P.O. Box 231, 5893 Quisque Av.","Macklin","SK","Luxembourg","20803","(860) 765-3573","(557) 866-5710","dictum.Proin@dolor.com"),(3,"Ap #508-3656 Nibh St.","Scalloway","SH","Monaco","934883","(784) 180-3819","(577) 688-3766","faucibus.ut.nulla@adipiscing.net"),(3,"P.O. Box 968, 4705 Velit Road","Vienna","Vienna","Spain","80419","(103) 712-9138","(680) 853-6048","nonummy.ipsum@vitaeerat.net"),(3,"P.O. Box 275, 6553 Donec Road","Racine","Wisconsin","Palau","M9T 3Y0","(625) 166-1981","(157) 388-4465","ut.dolor@Nam.com"),(2,"P.O. Box 680, 9623 Mollis St.","Den Helder","Noord Holland","Nepal","K4L 9L7","(613) 755-6707","(129) 907-4510","massa.Mauris.vestibulum@magna.co.uk"),(1,"P.O. Box 292, 7058 Lorem, St.","L'Hospitalet de Llobregat","CA","Burundi","06054","(957) 571-5724","(755) 784-7456","mauris.Morbi@ac.co.uk"),(3,"P.O. Box 800, 7278 Auctor, Ave","Hohenems","Vbg","Chad","46345","(748) 989-5762","(665) 700-0097","neque.Sed.eget@tristiquesenectus.edu"),(1,"P.O. Box 708, 6340 Neque St.","Casablanca","V","Marshall Islands","803706","(359) 821-4854","(538) 963-8009","sapien.Aenean.massa@odio.org"),(1,"131 Nec, St.","Soria","Castilla y León","Iraq","2097","(858) 784-7339","(878) 593-0799","dolor.Quisque@nislelementum.net"),(2,"5116 Imperdiet, St.","Jaén","AN","Canada","5714QA","(230) 876-0864","(290) 619-1480","Proin.ultrices@enim.ca"); -INSERT INTO pizza_contact (contactType,contactStreet1,contactCity,contactState,country,contactZip,contactPhone1,contactPhone2,contactEmail) VALUES (3,"Ap #588-1798 In Ave","Columbus","GA","Belize","6121","(452) 602-0450","(726) 103-9367","nisi.nibh@sagittissemperNam.com"),(2,"570-3657 Nam St.","Gold Coast","Queensland","Bahamas","69822-583","(128) 843-4074","(782) 195-5540","Vestibulum.ante@mauris.com"),(3,"704-8036 Ultricies St.","Licantén","VII","Iraq","P1K 2C2","(263) 757-1455","(653) 814-6044","ut@metusfacilisislorem.edu"),(2,"787-6323 Arcu. Avenue","Uyo","AK","Barbados","8347","(520) 318-1345","(562) 402-7864","feugiat@elitpellentesque.ca"),(1,"1229 At Rd.","Newbury","ON","Thailand","3177","(244) 852-0310","(306) 671-9231","sem.mollis.dui@bibendumsedest.edu"),(1,"P.O. Box 588, 9079 Feugiat Av.","Issy-les-Moulineaux","Île-de-France","South Sudan","050597","(737) 896-9024","(591) 503-8268","risus.Nulla@ipsumac.com"),(1,"P.O. Box 375, 5105 Sollicitudin St.","Hamilton","Victoria","Saint Helena, Ascension and Tristan da Cunha","148045","(376) 406-6879","(738) 974-3488","Cum.sociis.natoque@sedpede.co.uk"),(3,"P.O. Box 137, 3470 Nec Rd.","Strasbourg","Alsace","Yemen","12374","(232) 353-4328","(392) 976-9725","amet.consectetuer@volutpat.co.uk"),(3,"P.O. Box 664, 6324 Fringilla Street","Mjölby","Östergötlands län","New Zealand","10255-047","(559) 375-7586","(864) 417-0972","lacinia.Sed.congue@natoquepenatibuset.co.uk"),(1,"Ap #297-698 Non Av.","Ankara","Ank","Bouvet Island","NG0 2DG","(164) 173-0270","(371) 422-7002","urna@Etiamvestibulum.co.uk"); -INSERT INTO pizza_contact (contactType,contactStreet1,contactCity,contactState,country,contactZip,contactPhone1,contactPhone2,contactEmail) VALUES (1,"198-9134 Vel Av.","Osogbo","OS","Laos","852140","(765) 429-4984","(729) 648-0652","semper.tellus.id@Craseu.net"),(3,"Ap #831-4866 Vehicula Av.","Meridian","ID","Congo, the Democratic Republic of the","312342","(615) 959-6433","(305) 598-3126","Nunc.commodo.auctor@libero.net"),(3,"2042 Nisl St.","Delitzsch","Saxony","Wallis and Futuna","37703","(197) 335-6859","(339) 216-6334","tortor.Nunc@semperduilectus.net"),(2,"9325 Tempus Street","Vienna","Wie","Mauritania","91471-785","(759) 483-0483","(340) 962-8977","tempor.diam@nuncacmattis.edu"),(2,"Ap #135-9545 Faucibus Ave","Haddington","East Lothian","Svalbard and Jan Mayen Islands","364781","(387) 689-4817","(375) 641-7434","ipsum.Suspendisse@utpharetrased.com"),(2,"899-8384 Aliquet. Rd.","Zamora","CL","Malawi","270869","(696) 307-4042","(176) 534-1338","lorem@utipsumac.com"),(3,"P.O. Box 703, 4458 Semper St.","Sluis","Zl","Lebanon","68-198","(606) 772-5238","(360) 658-9318","mollis.vitae@Praesentinterdum.edu"),(1,"Ap #190-6434 Tristique Street","Melton","Victoria","Kyrgyzstan","31010","(888) 927-1365","(934) 313-7378","a@sollicitudin.org"),(1,"7309 Cum Rd.","Ludvika","Dalarnas län","Falkland Islands","N2I 9AP","(563) 471-7003","(744) 393-2260","cursus.et@Suspendisseeleifend.co.uk"),(3,"Ap #944-158 Bibendum Avenue","Vienna","Vienna","Mauritania","79078-516","(968) 683-7591","(218) 494-4460","facilisis@tortor.net"); -INSERT INTO pizza_contact (contactType,contactStreet1,contactCity,contactState,country,contactZip,contactPhone1,contactPhone2,contactEmail) VALUES (2,"Ap #707-9496 Non, St.","Aurora","Colorado","Bosnia and Herzegovina","87578","(495) 140-4161","(403) 902-6560","interdum.ligula@ligulaAliquam.co.uk"),(2,"P.O. Box 395, 8774 Id Road","Dublin","Leinster","Andorra","84-554","(602) 696-6965","(884) 312-6561","faucibus.lectus.a@tinciduntadipiscing.edu"),(2,"Ap #707-6746 Curabitur Ave","Barranca","Puntarenas","Iceland","19351","(615) 146-6304","(692) 641-4023","nec@nonenimMauris.com"),(1,"4690 Duis St.","Kanpur Cantonment","UP","Nicaragua","99312","(666) 953-1016","(830) 564-5881","sagittis.placerat.Cras@Nuncmauris.org"),(2,"P.O. Box 672, 5342 Erat Rd.","Shillong","ML","Puerto Rico","9444","(662) 457-6190","(685) 199-1050","dictum.magna@vitaediamProin.co.uk"),(1,"P.O. Box 962, 816 Non, Rd.","Turnhout","Antwerpen","Gibraltar","5856ZJ","(549) 296-4347","(677) 429-3547","auctor.nunc@acmieleifend.org"),(1,"Ap #294-9347 Ipsum St.","Zeist","Utrecht","Micronesia","55892","(612) 282-5877","(602) 824-7495","ullamcorper@CraspellentesqueSed.org"),(2,"3228 Libero Rd.","Invercargill","South Island","Zimbabwe","1837","(120) 185-4399","(393) 179-0452","metus@consequat.co.uk"),(2,"716-3837 Luctus, Street","Forchies-la-Marche","Henegouwen","Tuvalu","669950","(970) 580-8733","(930) 874-9153","et@purusgravida.net"),(2,"6877 Sociis St.","Colombo","Paraná","Kyrgyzstan","83967","(645) 655-7086","(300) 921-5151","Donec@augue.org"); diff --git a/datasets/sql/customer.sql b/datasets/sql/customer.sql deleted file mode 100644 index 09c846e..0000000 --- a/datasets/sql/customer.sql +++ /dev/null @@ -1,20 +0,0 @@ -DROP TABLE `pizza_customer`; - -CREATE TABLE `pizza_customer` ( - `id` mediumint(8) unsigned NOT NULL auto_increment, - `idCustomer` varchar(255) default NULL, - `email` varchar(255) default NULL, - `createDateTime` varchar(255), - PRIMARY KEY (`id`) -) AUTO_INCREMENT=1; - -INSERT INTO `pizza_customer` (`idCustomer`,`email`,`createDateTime`) VALUES ("Charde Erickson","auctor@venenatis.ca","2017-05-20 15:57:37"),("Jameson Kennedy","magna.Cras.convallis@disparturient.co.uk","2016-11-09 02:13:41"),("Vielka Conrad","nascetur.ridiculus.mus@egetlaoreet.ca","2016-12-28 07:15:09"),("Lareina Levy","ad@Nunc.net","2017-02-20 07:36:22"),("Azalia Fulton","blandit@Aliquamadipiscinglobortis.edu","2016-06-12 07:27:53"),("Arden Travis","in@Proin.co.uk","2016-06-05 03:47:52"),("Aurora Yates","enim@montesnascetur.edu","2016-08-10 15:26:54"),("Zeph Moses","dignissim.Maecenas.ornare@pedeacurna.ca","2016-11-17 21:12:39"),("Phyllis Lynch","magna.tellus@convallis.edu","2018-03-14 13:42:26"),("Gillian Mckenzie","consectetuer.rhoncus@dictum.ca","2017-06-04 23:44:22"); -INSERT INTO `pizza_customer` (`idCustomer`,`email`,`createDateTime`) VALUES ("Nissim Stuart","malesuada.id.erat@risus.com","2017-03-31 19:02:22"),("Ina Melton","accumsan.sed.facilisis@rutrumnonhendrerit.co.uk","2016-11-01 03:57:20"),("Athena Barrett","Donec.porttitor.tellus@nec.co.uk","2018-01-18 00:56:42"),("Zena Sherman","a.auctor.non@dolor.net","2016-11-09 10:35:58"),("Xanthus Gibson","laoreet.ipsum.Curabitur@Quisquevarius.org","2016-07-26 00:55:07"),("Colby Gilliam","mauris@ipsumSuspendissenon.net","2017-09-17 03:33:56"),("Abigail Owen","dictum@eleifendegestas.edu","2017-02-25 08:05:28"),("Zoe Lowe","sapien.gravida@semper.net","2016-10-03 10:33:45"),("Kellie Orr","vitae.semper@convallis.ca","2017-08-08 07:30:16"),("Ignatius Higgins","Nunc.quis.arcu@ut.edu","2017-12-05 02:19:30"); -INSERT INTO `pizza_customer` (`idCustomer`,`email`,`createDateTime`) VALUES ("Jameson Buckner","vehicula.et.rutrum@pretiumaliquet.org","2017-10-28 08:25:53"),("Oren Golden","mauris@ProindolorNulla.co.uk","2017-03-12 13:33:42"),("Dante Herrera","vel.faucibus.id@gravidaPraesenteu.net","2018-05-11 16:51:42"),("Graiden Watson","lorem.vehicula.et@Morbi.ca","2016-06-29 01:47:39"),("Byron Grant","adipiscing.Mauris.molestie@disparturient.ca","2017-07-14 15:11:11"),("Madison Fernandez","lacinia@consectetueradipiscingelit.ca","2017-01-15 10:58:21"),("Lucius Simpson","bibendum@musProinvel.ca","2017-10-18 07:17:19"),("Lee Patterson","lacinia.vitae.sodales@Integer.net","2016-06-04 12:53:25"),("Silas Potts","pellentesque@imperdiet.edu","2017-02-22 18:46:37"),("Chiquita Clay","est@vehicula.com","2017-05-29 16:40:49"); -INSERT INTO `pizza_customer` (`idCustomer`,`email`,`createDateTime`) VALUES ("Mariam Watkins","ligula.Aliquam@quamvel.edu","2017-01-29 21:06:56"),("Honorato Bird","eu.arcu.Morbi@mollisnoncursus.edu","2016-06-21 03:23:42"),("Courtney Stephenson","nulla@amalesuadaid.co.uk","2017-05-25 11:21:24"),("Idola Moreno","orci@etipsumcursus.com","2017-03-11 07:44:41"),("Hammett Larson","malesuada.id@Etiam.net","2017-03-31 05:59:14"),("Inez Gaines","volutpat.ornare.facilisis@dictumplacerataugue.net","2017-11-05 10:44:57"),("Jolie Silva","nisl.elementum.purus@tellus.com","2017-11-18 13:58:13"),("Sasha Hicks","dui@scelerisque.org","2016-08-15 23:02:27"),("Yvette May","blandit.mattis@accumsansedfacilisis.ca","2016-06-10 10:13:43"),("Joseph Patrick","Donec@veliteusem.com","2018-02-12 09:55:43"); -INSERT INTO `pizza_customer` (`idCustomer`,`email`,`createDateTime`) VALUES ("Kiayada Henderson","ultricies@dolorNulla.ca","2017-07-29 17:17:54"),("Charles Gregory","sapien@amet.org","2017-01-17 09:29:59"),("Amaya Kerr","Duis.elementum@mollis.co.uk","2017-07-18 05:33:31"),("Lyle Guzman","eget@necante.edu","2018-03-25 03:44:05"),("Lee Baxter","Proin.eget@aliquetProin.edu","2016-06-03 01:17:03"),("Minerva Fletcher","Nullam.enim.Sed@vitae.co.uk","2017-09-01 22:37:20"),("Sydney Fuller","ultrices.Duis@risusNuncac.co.uk","2017-01-27 00:30:27"),("Hollee Chase","metus.urna.convallis@nonegestasa.net","2017-01-23 14:13:19"),("Damon Fowler","gravida@interdumfeugiat.co.uk","2017-12-13 11:35:01"),("Gisela Meyer","eget@Cras.com","2016-12-21 14:55:02"); -INSERT INTO `pizza_customer` (`idCustomer`,`email`,`createDateTime`) VALUES ("Constance Rosa","metus@maurisIntegersem.org","2016-11-22 21:52:45"),("Larissa Burnett","Maecenas.malesuada.fringilla@Suspendisse.com","2016-07-12 10:58:32"),("Illiana Fuller","Duis@magna.ca","2016-08-18 08:31:33"),("Marshall Blackburn","leo.in@adipiscinglobortis.net","2017-06-06 23:11:01"),("Honorato Sweeney","a.dui.Cras@Quisquefringillaeuismod.org","2018-02-16 17:43:18"),("Shad Dunlap","dolor@vestibulumneque.ca","2017-02-14 19:06:23"),("Lee Morrow","lobortis.mauris@penatibuset.ca","2017-06-22 09:51:33"),("MacKensie Bruce","aliquam@dis.org","2016-10-16 06:45:25"),("Warren Eaton","libero.Proin.sed@dictum.edu","2017-11-08 17:22:19"),("Wynne Matthews","arcu.Sed.eu@at.co.uk","2017-02-05 18:14:35"); -INSERT INTO `pizza_customer` (`idCustomer`,`email`,`createDateTime`) VALUES ("Sylvia Patel","fermentum.risus.at@Quisque.com","2018-02-14 15:45:18"),("Jana Berry","convallis.erat@non.net","2016-06-28 15:33:46"),("Tyrone Torres","fringilla@Phasellus.org","2016-09-08 07:36:29"),("Clarke Duran","eros@nonummyFusce.org","2017-05-20 19:57:12"),("Jack Harmon","ridiculus.mus@lectusjustoeu.net","2017-08-19 19:04:56"),("Slade Merrill","blandit.viverra@Pellentesqueultriciesdignissim.net","2017-12-19 15:45:56"),("Fleur Meyers","amet.lorem@vitae.ca","2016-07-31 20:30:59"),("Iola Francis","a@IntegermollisInteger.net","2017-02-09 03:47:42"),("Clayton Gillespie","interdum@euligula.edu","2016-06-20 13:53:46"),("Ciaran Wood","metus.In.nec@molestie.co.uk","2017-01-25 20:10:40"); -INSERT INTO `pizza_customer` (`idCustomer`,`email`,`createDateTime`) VALUES ("Halla Mcintosh","fermentum.arcu.Vestibulum@ut.ca","2017-09-02 11:33:57"),("Vielka Ball","elit.a@consectetuermauris.com","2017-04-03 09:25:35"),("Constance Torres","ante.iaculis.nec@Aliquamnisl.org","2017-11-30 13:22:00"),("Preston Heath","pharetra.sed@estarcu.ca","2018-03-20 06:54:54"),("Cameron Sheppard","sapien@mollis.edu","2017-06-17 08:02:03"),("Conan Bender","nunc.Quisque.ornare@Donecconsectetuermauris.ca","2016-07-02 06:06:25"),("Iola Hanson","Pellentesque.ut@interdum.org","2017-01-10 15:15:30"),("Piper Clemons","convallis.in@metus.ca","2017-02-06 14:36:15"),("Indira Combs","Cras.vehicula.aliquet@feugiat.co.uk","2016-07-20 15:01:33"),("Blaze Gonzales","convallis.in.cursus@Sednecmetus.ca","2017-12-06 09:49:21"); -INSERT INTO `pizza_customer` (`idCustomer`,`email`,`createDateTime`) VALUES ("Barry Rutledge","in.magna.Phasellus@lacusAliquamrutrum.net","2017-05-20 06:43:04"),("Claudia Frederick","tellus@condimentumegetvolutpat.edu","2017-10-15 19:40:12"),("Christopher Mcfadden","dolor@convallisdolorQuisque.net","2017-01-10 08:16:23"),("Laura Bradford","ridiculus.mus.Donec@estvitae.ca","2016-09-03 21:33:27"),("Daphne Michael","fringilla.est.Mauris@loremfringillaornare.edu","2017-08-17 22:11:42"),("Berk Curry","Donec.est.mauris@pharetra.com","2016-11-22 23:03:07"),("Libby Hobbs","consectetuer@nonsollicitudina.co.uk","2016-07-08 22:04:32"),("Leonard James","lectus.justo.eu@dolorsitamet.net","2017-05-10 21:21:58"),("Teegan Cobb","sed.consequat.auctor@consectetuercursus.com","2016-08-14 09:20:55"),("Thomas Arnold","et.ultrices.posuere@tristique.edu","2017-02-24 18:53:54"); -INSERT INTO `pizza_customer` (`idCustomer`,`email`,`createDateTime`) VALUES ("Desirae Barrett","massa@bibendum.ca","2018-04-13 00:25:09"),("Pearl Mcclure","sollicitudin.commodo.ipsum@magna.org","2016-07-01 05:35:31"),("Maxine Riddle","porttitor.vulputate@consequat.co.uk","2017-08-31 04:11:40"),("Nasim Gilliam","elit@Nuncquisarcu.ca","2018-03-31 17:28:58"),("Josephine Guzman","pellentesque@tellusSuspendissesed.org","2016-10-11 11:00:42"),("Vance Mclean","Nullam@mienimcondimentum.co.uk","2017-04-25 22:26:34"),("Unity Charles","Vivamus@enimSed.edu","2017-01-30 19:21:14"),("Leandra Wolf","lobortis.nisi@rutrumnon.net","2017-02-06 10:34:51"),("Maryam Hull","dui@egetlacus.edu","2016-06-27 03:33:57"),("Tanek Wilder","dui.in@rhoncusProinnisl.edu","2016-09-25 12:27:13"); diff --git a/datasets/sql/customerNoBackticks.sql b/datasets/sql/customerNoBackticks.sql deleted file mode 100644 index 07b5be2..0000000 --- a/datasets/sql/customerNoBackticks.sql +++ /dev/null @@ -1,20 +0,0 @@ -DROP TABLE pizza_customer; - -CREATE TABLE pizza_customer ( - id mediumint(8) unsigned NOT NULL auto_increment, - idCustomer varchar(255) default NULL, - email varchar(255) default NULL, - createDateTime varchar(255), - PRIMARY KEY (id) -) AUTO_INCREMENT=1; - -INSERT INTO pizza_customer (idCustomer,email,createDateTime) VALUES ("Charde Erickson","auctor@venenatis.ca","2017-05-20 15:57:37"),("Jameson Kennedy","magna.Cras.convallis@disparturient.co.uk","2016-11-09 02:13:41"),("Vielka Conrad","nascetur.ridiculus.mus@egetlaoreet.ca","2016-12-28 07:15:09"),("Lareina Levy","ad@Nunc.net","2017-02-20 07:36:22"),("Azalia Fulton","blandit@Aliquamadipiscinglobortis.edu","2016-06-12 07:27:53"),("Arden Travis","in@Proin.co.uk","2016-06-05 03:47:52"),("Aurora Yates","enim@montesnascetur.edu","2016-08-10 15:26:54"),("Zeph Moses","dignissim.Maecenas.ornare@pedeacurna.ca","2016-11-17 21:12:39"),("Phyllis Lynch","magna.tellus@convallis.edu","2018-03-14 13:42:26"),("Gillian Mckenzie","consectetuer.rhoncus@dictum.ca","2017-06-04 23:44:22"); -INSERT INTO pizza_customer (idCustomer,email,createDateTime) VALUES ("Nissim Stuart","malesuada.id.erat@risus.com","2017-03-31 19:02:22"),("Ina Melton","accumsan.sed.facilisis@rutrumnonhendrerit.co.uk","2016-11-01 03:57:20"),("Athena Barrett","Donec.porttitor.tellus@nec.co.uk","2018-01-18 00:56:42"),("Zena Sherman","a.auctor.non@dolor.net","2016-11-09 10:35:58"),("Xanthus Gibson","laoreet.ipsum.Curabitur@Quisquevarius.org","2016-07-26 00:55:07"),("Colby Gilliam","mauris@ipsumSuspendissenon.net","2017-09-17 03:33:56"),("Abigail Owen","dictum@eleifendegestas.edu","2017-02-25 08:05:28"),("Zoe Lowe","sapien.gravida@semper.net","2016-10-03 10:33:45"),("Kellie Orr","vitae.semper@convallis.ca","2017-08-08 07:30:16"),("Ignatius Higgins","Nunc.quis.arcu@ut.edu","2017-12-05 02:19:30"); -INSERT INTO pizza_customer (idCustomer,email,createDateTime) VALUES ("Jameson Buckner","vehicula.et.rutrum@pretiumaliquet.org","2017-10-28 08:25:53"),("Oren Golden","mauris@ProindolorNulla.co.uk","2017-03-12 13:33:42"),("Dante Herrera","vel.faucibus.id@gravidaPraesenteu.net","2018-05-11 16:51:42"),("Graiden Watson","lorem.vehicula.et@Morbi.ca","2016-06-29 01:47:39"),("Byron Grant","adipiscing.Mauris.molestie@disparturient.ca","2017-07-14 15:11:11"),("Madison Fernandez","lacinia@consectetueradipiscingelit.ca","2017-01-15 10:58:21"),("Lucius Simpson","bibendum@musProinvel.ca","2017-10-18 07:17:19"),("Lee Patterson","lacinia.vitae.sodales@Integer.net","2016-06-04 12:53:25"),("Silas Potts","pellentesque@imperdiet.edu","2017-02-22 18:46:37"),("Chiquita Clay","est@vehicula.com","2017-05-29 16:40:49"); -INSERT INTO pizza_customer (idCustomer,email,createDateTime) VALUES ("Mariam Watkins","ligula.Aliquam@quamvel.edu","2017-01-29 21:06:56"),("Honorato Bird","eu.arcu.Morbi@mollisnoncursus.edu","2016-06-21 03:23:42"),("Courtney Stephenson","nulla@amalesuadaid.co.uk","2017-05-25 11:21:24"),("Idola Moreno","orci@etipsumcursus.com","2017-03-11 07:44:41"),("Hammett Larson","malesuada.id@Etiam.net","2017-03-31 05:59:14"),("Inez Gaines","volutpat.ornare.facilisis@dictumplacerataugue.net","2017-11-05 10:44:57"),("Jolie Silva","nisl.elementum.purus@tellus.com","2017-11-18 13:58:13"),("Sasha Hicks","dui@scelerisque.org","2016-08-15 23:02:27"),("Yvette May","blandit.mattis@accumsansedfacilisis.ca","2016-06-10 10:13:43"),("Joseph Patrick","Donec@veliteusem.com","2018-02-12 09:55:43"); -INSERT INTO pizza_customer (idCustomer,email,createDateTime) VALUES ("Kiayada Henderson","ultricies@dolorNulla.ca","2017-07-29 17:17:54"),("Charles Gregory","sapien@amet.org","2017-01-17 09:29:59"),("Amaya Kerr","Duis.elementum@mollis.co.uk","2017-07-18 05:33:31"),("Lyle Guzman","eget@necante.edu","2018-03-25 03:44:05"),("Lee Baxter","Proin.eget@aliquetProin.edu","2016-06-03 01:17:03"),("Minerva Fletcher","Nullam.enim.Sed@vitae.co.uk","2017-09-01 22:37:20"),("Sydney Fuller","ultrices.Duis@risusNuncac.co.uk","2017-01-27 00:30:27"),("Hollee Chase","metus.urna.convallis@nonegestasa.net","2017-01-23 14:13:19"),("Damon Fowler","gravida@interdumfeugiat.co.uk","2017-12-13 11:35:01"),("Gisela Meyer","eget@Cras.com","2016-12-21 14:55:02"); -INSERT INTO pizza_customer (idCustomer,email,createDateTime) VALUES ("Constance Rosa","metus@maurisIntegersem.org","2016-11-22 21:52:45"),("Larissa Burnett","Maecenas.malesuada.fringilla@Suspendisse.com","2016-07-12 10:58:32"),("Illiana Fuller","Duis@magna.ca","2016-08-18 08:31:33"),("Marshall Blackburn","leo.in@adipiscinglobortis.net","2017-06-06 23:11:01"),("Honorato Sweeney","a.dui.Cras@Quisquefringillaeuismod.org","2018-02-16 17:43:18"),("Shad Dunlap","dolor@vestibulumneque.ca","2017-02-14 19:06:23"),("Lee Morrow","lobortis.mauris@penatibuset.ca","2017-06-22 09:51:33"),("MacKensie Bruce","aliquam@dis.org","2016-10-16 06:45:25"),("Warren Eaton","libero.Proin.sed@dictum.edu","2017-11-08 17:22:19"),("Wynne Matthews","arcu.Sed.eu@at.co.uk","2017-02-05 18:14:35"); -INSERT INTO pizza_customer (idCustomer,email,createDateTime) VALUES ("Sylvia Patel","fermentum.risus.at@Quisque.com","2018-02-14 15:45:18"),("Jana Berry","convallis.erat@non.net","2016-06-28 15:33:46"),("Tyrone Torres","fringilla@Phasellus.org","2016-09-08 07:36:29"),("Clarke Duran","eros@nonummyFusce.org","2017-05-20 19:57:12"),("Jack Harmon","ridiculus.mus@lectusjustoeu.net","2017-08-19 19:04:56"),("Slade Merrill","blandit.viverra@Pellentesqueultriciesdignissim.net","2017-12-19 15:45:56"),("Fleur Meyers","amet.lorem@vitae.ca","2016-07-31 20:30:59"),("Iola Francis","a@IntegermollisInteger.net","2017-02-09 03:47:42"),("Clayton Gillespie","interdum@euligula.edu","2016-06-20 13:53:46"),("Ciaran Wood","metus.In.nec@molestie.co.uk","2017-01-25 20:10:40"); -INSERT INTO pizza_customer (idCustomer,email,createDateTime) VALUES ("Halla Mcintosh","fermentum.arcu.Vestibulum@ut.ca","2017-09-02 11:33:57"),("Vielka Ball","elit.a@consectetuermauris.com","2017-04-03 09:25:35"),("Constance Torres","ante.iaculis.nec@Aliquamnisl.org","2017-11-30 13:22:00"),("Preston Heath","pharetra.sed@estarcu.ca","2018-03-20 06:54:54"),("Cameron Sheppard","sapien@mollis.edu","2017-06-17 08:02:03"),("Conan Bender","nunc.Quisque.ornare@Donecconsectetuermauris.ca","2016-07-02 06:06:25"),("Iola Hanson","Pellentesque.ut@interdum.org","2017-01-10 15:15:30"),("Piper Clemons","convallis.in@metus.ca","2017-02-06 14:36:15"),("Indira Combs","Cras.vehicula.aliquet@feugiat.co.uk","2016-07-20 15:01:33"),("Blaze Gonzales","convallis.in.cursus@Sednecmetus.ca","2017-12-06 09:49:21"); -INSERT INTO pizza_customer (idCustomer,email,createDateTime) VALUES ("Barry Rutledge","in.magna.Phasellus@lacusAliquamrutrum.net","2017-05-20 06:43:04"),("Claudia Frederick","tellus@condimentumegetvolutpat.edu","2017-10-15 19:40:12"),("Christopher Mcfadden","dolor@convallisdolorQuisque.net","2017-01-10 08:16:23"),("Laura Bradford","ridiculus.mus.Donec@estvitae.ca","2016-09-03 21:33:27"),("Daphne Michael","fringilla.est.Mauris@loremfringillaornare.edu","2017-08-17 22:11:42"),("Berk Curry","Donec.est.mauris@pharetra.com","2016-11-22 23:03:07"),("Libby Hobbs","consectetuer@nonsollicitudina.co.uk","2016-07-08 22:04:32"),("Leonard James","lectus.justo.eu@dolorsitamet.net","2017-05-10 21:21:58"),("Teegan Cobb","sed.consequat.auctor@consectetuercursus.com","2016-08-14 09:20:55"),("Thomas Arnold","et.ultrices.posuere@tristique.edu","2017-02-24 18:53:54"); -INSERT INTO pizza_customer (idCustomer,email,createDateTime) VALUES ("Desirae Barrett","massa@bibendum.ca","2018-04-13 00:25:09"),("Pearl Mcclure","sollicitudin.commodo.ipsum@magna.org","2016-07-01 05:35:31"),("Maxine Riddle","porttitor.vulputate@consequat.co.uk","2017-08-31 04:11:40"),("Nasim Gilliam","elit@Nuncquisarcu.ca","2018-03-31 17:28:58"),("Josephine Guzman","pellentesque@tellusSuspendissesed.org","2016-10-11 11:00:42"),("Vance Mclean","Nullam@mienimcondimentum.co.uk","2017-04-25 22:26:34"),("Unity Charles","Vivamus@enimSed.edu","2017-01-30 19:21:14"),("Leandra Wolf","lobortis.nisi@rutrumnon.net","2017-02-06 10:34:51"),("Maryam Hull","dui@egetlacus.edu","2016-06-27 03:33:57"),("Tanek Wilder","dui.in@rhoncusProinnisl.edu","2016-09-25 12:27:13"); diff --git a/98--PizzaPicadilly-J1.mwb b/documentation/98--PizzaPicadilly-J1.mwb similarity index 100% rename from 98--PizzaPicadilly-J1.mwb rename to documentation/98--PizzaPicadilly-J1.mwb diff --git a/documentation/Screen Shot 2017-05-18 at 1.03.21 PM.png b/documentation/98-PizzaPicadilly EER.png similarity index 100% rename from documentation/Screen Shot 2017-05-18 at 1.03.21 PM.png rename to documentation/98-PizzaPicadilly EER.png diff --git a/documentation/98-PizzaPicadilly.mwb b/documentation/98-PizzaPicadilly.mwb new file mode 100644 index 0000000..1c285e8 Binary files /dev/null and b/documentation/98-PizzaPicadilly.mwb differ diff --git a/datasets/csv/.DS_Store b/frontend_ui/.DS_Store similarity index 74% rename from datasets/csv/.DS_Store rename to frontend_ui/.DS_Store index 0770e4b..b23e1af 100644 Binary files a/datasets/csv/.DS_Store and b/frontend_ui/.DS_Store differ diff --git a/frontend_ui/Formitable.class.php b/frontend_ui/Formitable.class.php deleted file mode 100644 index 9559dcf..0000000 --- a/frontend_ui/Formitable.class.php +++ /dev/null @@ -1,1890 +0,0 @@ -'; - var $msg_insertFail = '
'; - var $msg_updateSuccess = '
'; - var $msg_updateFail = '
'; - - // these vars hold the strings output before and after error messages - var $err_pre = '
'; - var $err_post = ''; - - // these vars hold the strings output before and after the error box - var $err_box_pre = '
'; - var $err_box_post = '
'; - - var $feedback = 'both'; - - // these vars set the string ouput after option labels, field labels, and fields - var $optionBreak = "
\n"; - var $labelBreak = "
\n"; - var $fieldBreak = "

\n\n"; - - // toggle print or return output - var $returnOutput = false; - - public $skip; - - // class constructor sets form name and gets table info. Args are DB link, DB name, table name. - function Formitable(&$conn,$DB,$table){ - - $this->conn = $conn; - - $this->DB = $DB; - - $this->table = $table; - - $this->formName = is_array($table) ? implode('_',$table) : $table; - - $this->_multi = false; - - $this->pkey = ""; - - $this->submitted = 0; - - $this->_magic_quotes = get_magic_quotes_gpc(); - - $this->enableFieldSets = true; - - $this->hasFiles = false; - - $this->skipFields( array('formitable_signature','formitable_multipage','formitable_setcheck', - 'pkey','submit','x','y','MAX_FILE_SIZE') ); - - // template delimeters - $this->tplStart = '{'; - $this->tplEnd = '}'; - - $this->mysql_errors = false; - - // process $_POST - $this->_post = $this->_processPost(); - - // if multi-table then initialize child Formitable objects - if( is_array($table) ){ - - $this->_multi = 'root'; - foreach($table as $form){ - - // create child objects, set type, and reference back to parent - $this->tables[$form] = new Formitable($conn,$DB,$form); - $this->tables[$form]->_multi = 'node'; - $this->tables[$form]->_root = &$this; - - // process $_POST again as a node - $this->tables[$form]->_post = $this->tables[$form]->_processPost(); - - // empty msgs - $this->tables[$form]->msg_insertSuccess = - $this->tables[$form]->msg_updateSuccess = - $this->tables[$form]->msg_insertFail = - $this->tables[$form]->msg_updateFail = ''; - } - - // otherwise setup as normal - } else { - - $fields = $this->query('SELECT * FROM `'.$table.'` LIMIT 1'); - $this->columns = @mysql_num_fields($fields); - - // loop through all fields and gather info about each - for($n=0; $n < $this->columns; $n++){ - - $name = @mysql_field_name($fields,$n); - - $fieldInfo = array('length'=>@mysql_field_len($fields,$n)); - - /* mysql_field_flags - "not_null", "primary_key", "unique_key", - "multiple_key", "blob", "unsigned", "zerofill", "binary", - "enum", "set", "auto_increment" and "timestamp" <-- values not in mysql_fetch_field */ - $flags = explode( ' ', @mysql_field_flags($fields,$n) ); - foreach($flags as $flag){ - if( in_array($flag, array('enum','set','timestamp')) ){ - $fieldInfo['subtype'] = $flag; - // get options for enum or set - if($flag !== 'timestamp'){ - $fieldInfo['options'] = $this->_mysql_enum_values($name); - } - } else if($flag) { - $fieldInfo[$flag] = true; - } - } - - // add a few more flags not available from mysql_field_flags - $flags = @mysql_fetch_field($fields,$n); - foreach( $flags as $flag=>$value ){ - if($value && !array_key_exists($flag, $fieldInfo)){ - $fieldInfo[$flag=='def'?'default':$flag] = $value; - } - } - - // automatically detect and store primary key if available - if( in_array('primary_key',$fieldInfo) ){ - $this->setPrimaryKey($name); - } - - // remove redundant values and save field info - unset($fieldInfo['name'],$fieldInfo['table'], $fieldInfo['blob']); - $this->fields[$name] = array_diff_assoc($fieldInfo, array('name','table','blob')); - } - - // store cross references for field number and field name - $this->fieldNames = array_keys($this->fields); - $this->fieldNums = array_flip($this->fieldNames); - - //print '
'.print_r($this->fields,1).'
'; - //print ''; - - } - - } - - // this function submits the form to the database; - // IF form 'pkey' value is set then UPDATE record - // ELSE INSERT a new record - function submitForm($echo=true){ - - // return if there's no post - if($this->_post === false){ return 0; } - - // return saved value if already submitted - // this avoids double submit if called explicitly and auto submitted - if($this->submitted){ return $this->submitted; } - - // apply to each node if a multiform root - if( $this->_multi == 'root' ){ - - // set false success flag to submit nodes w/ a dry run - // this prevents partial node submission when validation fails on one or more - $this->_multiSuccess = false; - $result = $this->_applyMethod('submitForm'); - - // upon full validation $result should be equal to the number of tables - if( $result == count($this->tables) ){ - - // set true success flag to really submit nodes - $this->_multiSuccess = true; - $this->_applyMethod('submitForm'); - $this->submitted = 1; - - if( $echo || !$this->returnOutput ){ - echo $this->msg_insertSuccess; - } else { - return $this->msg_insertSuccess; - } - - return 1; - - } else return -1; - - } - - // cycle through allowed fields and assign values - // ex. $this->_allowedFrom['table__fieldName'] = 'field'; - if( isset($this->_allowedFrom) ){ - foreach($this->_allowedFrom as $fromField=>$field){ - - // set the value if already in post - if( isset($_POST[$fromField]) ){ - $this->_post[$field] = $_POST[$fromField]; - - // otherwise test if fromField is a pkey from another table - } else if( isset($this->_root) && strpos($fromField,'__') ){ - - $fromField = explode('__',$fromField); - if( array_key_exists($fromField[0], $this->_root->tables) ){ - - $fromTable = $this->_root->tables[ $fromField[0] ]; - if( isset($fromTable->pkeyID) && - $fromTable->pkey == $fromField[1] ){ - $this->_post[$field] = $fromTable->pkeyID; - } - - } - - } - - } - } - - // don't run this block if an unvalidated multiform node - if( $this->_multi != 'node' || $this->_root->_multiSuccess ){ - - // cycle through form signature if set - // if a "set" field is missing then assign empty value - // and if any other field type is missing then assign NULL - if( isset($this->_post['formitable_signature']) ){ - $this->_signature = split(',', $this->decrypt($this->_post['formitable_signature'])); - foreach($this->_signature as $key){ - if(!isset($this->_post[$key])){ - if( isset($this->fields[$key]) && $this->fields[$key]=='set' ){ - $this->_post[$key] = ''; - } else { - $this->_post[$key] = NULL; - } - } - } - // signature should always accompany encryption - } else if( isset($this->rc4key) ){ - print $this->msg_insertFail; - return false; - } - - } - - // submit via UPDATE - if( isset($this->_post['pkey']) ){ - - // don't run this block if an unvalidated multiform node - if( $this->_multi != 'node' || !$this->_root->_multiSuccess ){ - - // decrypt primary key if encrypted - if( isset($this->rc4key) ){ - $this->_post['pkey'] = $this->decrypt($this->_post['pkey']); - $this->_post['pkey'] = str_replace($this->rc4key,'',$this->_post['pkey']); - } - - // set pkey for form output in case validation fails - $this->pkeyID = $this->_post['pkey']; - - // assign empty values for checkboxes/multiselects if necessary - if( isset($this->_post['formitable_setcheck']) ){ - foreach($this->_post['formitable_setcheck'] as $key){ - $key = $this->decrypt($key); - if( !isset($this->_post[$key]) ){ - $this->_post[$key] = ''; - } - } - } - - // validate all fields and return -1 if validation failed - if( $this->_checkValidation() == -1 ){ - $this->submitted = -1; - return -1; - } - - // if a multiform node then assume query is ok for now - if( $this->_multi == 'node' ){ - return 1; - } - - } - - // cycle through $this->_post variables to form query assignments - foreach($this->_post as $key=>$value){ - - // ignore skipped fields, formitable specific variables, and fields not in signature - if( isset($this->skip[$key]) || strstr($key,'_verify') || - (isset($this->_signature) && !in_array($key, $this->_signature)) - ){ continue; } - - // assign comma seperated value if checkbox or multiselect, otherwise normal assignment - if(is_array($value)) @$fields .= ",`$key` = '".implode(",",$this->_post[$key])."'"; - else if(is_null($value)) @$fields .= ",`$key` = NULL"; - else @$fields .= ",`$key` = '".$this->_handle_magic_quotes($value,true)."'"; - - } - - // remove first comma - $fields = substr($fields,1); - - // build query - $SQLquery = "UPDATE $this->table SET $fields WHERE `$this->pkey` = '".$this->_post['pkey']."'"; - - // execute query and test errors - $this->query($SQLquery); - if( @mysql_error()=='' ){ - - // set pkeyID for output if multiple page form - if( @$this->_post['formitable_multipage'] == 'next' ){ - - // decrypt primary key first if encrypted - $this->pkeyID = decrypt($this->_post['pkey']); - - } else { - - // skip success message when first page or multiform node - if( $this->_multi != 'node' && (!isset($this->_post['formitable_multipage']) || $this->_post['formitable_multipage'] != 'start') ){ - if($echo || !$this->returnOutput) echo $this->msg_updateSuccess; - else return $this->msg_updateSuccess; - } - - } - - $this->submitted = 1; - return 1; - - } - - // submit via INSERT - } else { - - // don't run this block if an unvalidated multiform node - if( $this->_multi != 'node' || !$this->_root->_multiSuccess ){ - - if($this->_checkValidation() == -1){ $this->submitted=-1; return -1; } - - // if a multiform node then assume query is ok and return - if( $this->_multi == 'node' ){ - return 1; - } - - } - - foreach($this->_post as $key=>$value){ - - // skip if told to, or if verify field, or if not in signature - if( isset($this->skip[$key]) || strstr($key,'_verify') || - (isset($this->_signature) && !in_array($key, $this->_signature)) ) continue; - - @$fields .= ",`".$key."`"; - - if(is_array($value)) @$values .= ",'".implode(",",$value)."'"; - else if(is_null($value)) @$values .= ',NULL'; - else @$values .= ",'".$this->_handle_magic_quotes($value,true)."'"; - - } - - // remove first comma - $fields = substr($fields,1); - $values = substr($values,1); - - // form and execute query, eventually echoing results - $SQLquery = "INSERT INTO $this->table ($fields) VALUES ($values)"; - - // execute query and test errors - $this->query($SQLquery); - if( @mysql_error()=='' ){ - - // flag successful submit - $this->submitted = 1; - - // get primary key - // if( isset($this->_post['formitable_multipage']) && $this->_post['formitable_multipage'] == 'start' ) - $this->pkeyID = $this->getPrimaryKey(); - - // skip success message when not last page or is a multiform node - if( $this->_multi != 'node' && (!isset($this->_post['formitable_multipage']) || $this->_post['formitable_multipage']=='end') ){ - if($echo || !$this->returnOutput) echo $this->msg_insertSuccess; - else return $this->msg_insertSuccess; - } - - return 1; - } - - } - - // the query failed if it made it this far - $result = $this->msg_updateFail.($this->mysql_errors ? '
'.$SQLquery.'
'.mysql_error().'' : ''); - if($echo){ - echo $result; - return 0; - } else { - return $result; - } - - } - - // this function returns the primary key value for the last inserted record - // new in version 1.5 - function getPrimaryKey(){ - if( isset($this->pkeyID) ){ return $this->pkeyID; } - if($this->submitted){ - // mysql_insert_id Retrieves the ID generated for an - // AUTO_INCREMENT column by the previous INSERT query - $lastID = @mysql_insert_id($this->conn); - // next best thing if mysql_insert_id failed, not guaranteed to be accurate - if(!$lastID && $this->pkey){ - $SQLquery = "SELECT `$this->pkey` FROM `$this->table` ORDER BY `$this->pkey` DESC LIMIT 1"; - $lastID = @mysql_result(@mysql_query($SQLquery,$this->conn),0); - } - return (int)$lastID; - } else return false; - } - - // this function will execute an arbitrary query on the current database - // returning the raw resource or an array of results in the format specified by $fetchFlag - // new in version 1.5 - function query($sql,$result_type=false){ - @mysql_select_db($this->DB,$this->conn); - $result = @mysql_query($sql,$this->conn); - if( $result && in_array($result_type,array(MYSQL_ASSOC,MYSQL_NUM,MYSQL_BOTH)) ){ - $rows = array(); - while( $row = @mysql_fetch_array($result,$result_type) ) { $rows[] = $row; } - $result = $rows; - } - return $result; - } - - // this function will query the table for a record - // with a primary key value of argument $id. - // use the decrypt arg if the value came from an encrypted form - function getRecord($id, $decryptId=false){ - - // apply to each node if a multiform root - if( $this->_multi == 'root' ){ - return $this->_applyMethod('getRecord', array($id,$decryptId), $id); - } - - // need to decrypt id if it came from the form - if( isset($this->rc4key) && $decryptId ){ - $id = $this->decrypt($id); - $id = str_replace($this->rc4key,'',$id); - } - - // build and execute query - $SQLquery = "SELECT * FROM $this->table WHERE $this->pkey = '$id'"; - @mysql_select_db($this->DB,$this->conn); - $result = @mysql_query($SQLquery,$this->conn); - - // get fields if there was only one record - if( @mysql_num_rows($result) == 1 ){ - $this->pkeyID = $id; - $this->record = @mysql_fetch_assoc($result); - return true; - // otherwise consider it a faliure - } else return false; - - } - - // this function retrieves records from another table to be used as values for input - function normalizedField($fieldName, $tableName, $tableKey = 'ID', $tableValue = 'name', $orderBy = 'value ASC', $whereClause = '1'){ - // apply to nodes if a multiform root - if( $this->_multi == 'root' ){ - $args = array($fieldName,$tableName,$tableKey,$tableValue,$orderBy,$whereClause); - return $this->_applyMethod('normalizedField', $args, $fieldName); - } - // otherwise as normal - $this->normalized[$fieldName]['tableName'] = $tableName; - $this->normalized[$fieldName]['tableKey'] = $tableKey; - $this->normalized[$fieldName]['tableValue'] = $tableValue; - $this->normalized[$fieldName]['orderBy'] = $orderBy; - $this->normalized[$fieldName]['whereClause'] = $whereClause; - } - - // this function retrieves records from another table to be used as labels for enum/set fields - // it is used to supply descriptions for smaller names -New in version .99- - function getLabels($fieldName, $tableName, $tableKey = 'ID', $tableValue = 'name'){ - // apply to nodes if a multiform root - if( $this->_multi == 'root' ){ - $args = array($fieldName,$tableName,$tableKey,$tableValue); - return $this->_applyMethod('getLabels', $args, $fieldName); - } - // otherwise as normal - $this->labelValues[$fieldName]['tableName'] = $tableName; - $this->labelValues[$fieldName]['tableKey'] = $tableKey; - $this->labelValues[$fieldName]['tableValue'] = $tableValue; - } - - // this function forces a form field to an explicit input type regardless of size - // args are field name and input type, input types are as follows: - // for enum field - "select" or "radio" - // for set field- "multiselect" or "checkbox" - // for string or blob field - "text" or "textarea" - // string can also be forced as "password" or "file" - function forceType($fieldName,$inputType){ - - // apply to nodes if a multiform root - if( $this->_multi == 'root' ){ - return $this->_applyMethod('forceType', array($fieldName,$inputType), $fieldName); - } - // otherwise as normal - if($inputType == 'file'){ - $this->hasFiles = true; - if( $this->_multi == 'node' ){ $this->_root->hasFiles = true; } - } - $this->forced[$fieldName] = $inputType; - - } - - function forceTypes($fieldNames,$inputTypes){ - - if( count($fieldNames) != count($inputTypes) ) return false; - - for($i=0;$iforceType($fieldNames[$i],$inputTypes[$i]); - - return true; - - } - - // this function sets a default value for the field - function setDefaultValue($fieldName, $fieldValue='', $overrideRetrieved=false) { - // apply to nodes if a multiform root - if( $this->_multi == 'root' ){ - $args = array($fieldName,$fieldValue,$overrideRetrieved); - return $this->_applyMethod('setDefaultValue', $args, $fieldName); - } - // otherwise as normal - $this->defaultValues[$fieldName]['value'] = $fieldValue; - if($overrideRetrieved) $this->defaultValues[$fieldName]['override'] = true; - } - - // this function forces a form field to be skipped on INSERT or UPDATE - // arg is field name - function skipField($fieldName){ - - // apply to nodes if a multiform root - if( $this->_multi == 'root' ){ - return $this->_applyMethod('skipField', array($fieldName), $fieldName); - } - // otherwise as normal - $this->skip[$fieldName] = true; - - } - - function skipFields($fieldNames){ - - if( !is_array($fieldNames) ) return false; - - foreach( $fieldNames as $field ){ - $this->skipField($field); - } - - return true; - - } - - // this function hides a field from HTML output - // arg is field name, plural version below - function hideField($fieldName){ - - if( !is_string($fieldName) ){ return false; } - // apply to nodes if a multiform root - if( $this->_multi == 'root' ){ - return $this->_applyMethod('hideField', array($fieldName), $fieldName); - // otherwise as normal - } else { - $this->hidden[$fieldName] = 'hide'; - } - return true; - - } - - function hideFields($fieldNames){ - - if( !is_array($fieldNames) ){ return false; } - foreach( $fieldNames as $field ){ - $this->hideField($field); - } - return true; - - } - - // this function sets a field's label text - // args are field name and label text, plural version below - function labelField($fieldName,$fieldLabel){ - - // apply to nodes if a multiform root - if( $this->_multi == 'root' ){ - return $this->_applyMethod('labelField', array($fieldName,$fieldLabel), $fieldName); - // otherwise as normal - } else { - $this->labels[$fieldName] = $fieldLabel; - } - - } - - function labelFields($fieldNames,$fieldLabels){ - - if( count($fieldNames) != count($fieldLabels) ){ return false; } - for($i=0; $ilabelField( $fieldNames[$i], $fieldLabels[$i] ); - } - return true; - - } - - // this function sets the HTML immediately - // following label tags, arg is HTML code - function setLabelBreak($HTML){ - - // apply to nodes if a multiform root - if( $this->_multi == 'root' ){ - return $this->_applyMethod('setLabelBreak', array($HTML) ); - } - // otherwise as normal - $this->labelBreak = $HTML; - - } - - // this function sets the HTML immediately - // following each field type, arg is HTML code - function setFieldBreak($HTML){ - - // apply to nodes if a multiform root - if( $this->_multi == 'root' ){ - return $this->_applyMethod('setFieldBreak', array($HTML) ); - } - // otherwise as normal - $this->fieldBreak = $HTML; - - } - - // this function sets the HTML immediately - // following each radio option, arg is HTML code - function setOptionBreak($HTML){ - - // apply to nodes if a multiform root - if( $this->_multi == 'root' ){ - return $this->_applyMethod('setOptionBreak', array($HTML) ); - } - // otherwise as normal - $this->optionBreak = $HTML; - - } - - // this function allows you set all breaks including label, field and option - // it's useful for changing 2 or 3 breaks at the same time, option break is optional - function setBreaks($label, $field, $option=NULL){ - - // apply to nodes if a multiform root - if( $this->_multi == 'root' ){ - return $this->_applyMethod('setBreaks', array($label,$field,$option) ); - } - // otherwise as normal - $this->labelBreak = $label; - $this->fieldBreak = $field; - if(!is_null($option)) $this->optionBreak = $option; - - } - - // this function sets the name of the table's primary key, - // its necessary to retrieve/update a record or for multiPage functionality - function setPrimaryKey($pkey_name){ - - // apply to nodes if a multiform root - if( $this->_multi == 'root' ){ - return $this->_applyMethod('setPrimaryKey', array($pkey_name) ); - } - // otherwise as normal - $this->pkey = $pkey_name; - - } - - // this function sets the enableFieldSets option, value is either true or false - function toggleFieldSets($toggle){ - - // apply to nodes if a multiform root - if( $this->_multi == 'root' ){ - return $this->_applyMethod('toggleFieldSets', array($toggle) ); - } - $this->enableFieldSets=$toggle; - - } - - // this function checks existing records for field value, arg is field name - function uniqueField($fieldName,$msg='Already taken.'){ - - // apply to nodes if a multiform root - if( $this->_multi == 'root' ){ - return $this->_applyMethod('uniqueField', array($fieldName,$msg), $fieldName ); - } - $this->unique[$fieldName]['msg'] = $msg; - - } - - // this function registers a new validation type - // args are method name, regular expression, and optional error text - function registerValidation($methodName, $regex, $errText = 'Invalid input.'){ - - // apply to nodes if a multiform root - if( $this->_multi == 'root' ){ - return $this->_applyMethod('registerValidation', array($methodName, $regex, $errText) ); - } - $this->_validationMethod[$methodName]['regex'] = $regex; - $this->_validationMethod[$methodName]['err'] = $errText; - - } - - // this function sets a field's validation type - // args are field name, method name, and optional custom error text - function validateField($fieldName, $methodName, $errText=NULL){ - - // apply to nodes if a multiform root - if( $this->_multi == 'root' ){ - return $this->_applyMethod('validateField', array($fieldName, $methodName, $errText), $fieldName ); - } - $this->validate[$fieldName]['method'] = $methodName; - if(!is_null($errText)) $this->validate[$fieldName]['err'] = $errText; - - } - - // this function opens the form tag and submits the form if pkey is set - function openForm($attr='', $autoSubmit=true){ - - // not callable by a multiform node - if( $this->_multi == 'node' ) return false; - - // assign all error messages from nodes to root - if( $this->_multi == 'root' ){ - foreach($this->tables as $form){ - if( isset($form->errMsg) ){ - foreach($form->errMsg as $key=>$value){ - $this->errMsg[$key] = $value; - } - } - } - } - - if( $this->returnOutput ){ ob_start(); } - - if( isset($_POST['submit']) && $autoSubmit ){ - // submit form and store results - $this->submitted = $this->submitForm(); - } - - // output error text box if validation failed - if( $this->submitted == -1 && ($this->feedback=='box' || $this->feedback=='both') ){ - echo $this->err_box_pre; - foreach($this->errMsg as $key=>$value){ - if( isset($this->labels[$key]) ) $label = $this->labels[$key]; - else $label = ucwords( str_replace('_', ' ', $key) ); - echo ''.$label.': '.$value.'
'; - } - echo $this->err_box_post; - } - - // don't open form if single page form or last page of multiple and no errors - if( $this->submitted != 1 || (isset($_POST['formitable_multipage']) && $_POST['formitable_multipage']!='end') ){ - - // output opening form tag, checking for overridden name and action - echo '
hasFiles?' enctype="multipart/form-data"':''). - ($attr!=''?' '.$attr:'').">\n"; - - // output hidden MAX_FILE_SIZE field if files are present. - // to set the upload size smaller than the value in php.ini - // create an .htaccess file with the following directive - // php_value upload_max_filesize 1M - // http:// us3.php.net/manual/en/ini.core.php#ini.upload-max-filesize - if($this->hasFiles){ - $maxBytes = trim(ini_get('upload_max_filesize')); - $lastChar = strtolower($maxBytes[strlen($maxBytes)-1]); - if($lastChar=="k"){ $maxBytes=$maxBytes*1024; } - else if($lastChar=="m"){ $maxBytes=$maxBytes*1024*1024; } - echo ''."\n"; - } - - } - - if( $this->returnOutput ){ - $html_block = ob_get_contents(); - ob_end_clean(); - return $html_block; - } - - } - - // this function closes the form tag & prints a hidden field 'pkey' if a record has been set either manually or through multiPage - function closeForm($submitValue='Submit',$attr='',$resetValue='Reset Form',$printReset=true,$closeForm=true){ - - if( $this->returnOutput ){ ob_start(); } - - // don't output signature or primary key if a multitable root - if($this->_multi != 'root'){ - - $fieldTable = $this->_multi ? $this->table.'__' : ''; - - // output hidden pkey field for update opertaions - if( isset($this->pkeyID) ){ - if( isset($this->rc4key) ){ - $pkeyVal = $this->encrypt( $this->rc4key.$this->pkeyID ); - } else $pkeyVal = $this->pkeyID; - echo ''."\n"; - } - - // output hidden signature field for security check - if( isset($this->rc4key) && isset($this->signature) ){ - $sigVal = $this->encrypt( implode(",",$this->signature) ); - echo ''."\n"; - } - - // but still apply to nodes if a multiform root - } else { - - if( $this->_multi == 'root' ){ - $this->_applyMethod('closeForm', array() ); - } - - } - - // don't output buttons or close form when a multitable node - if($this->_multi != 'node'){ - - if( isset($this->multiPageSubmitValue) ){ - $submitValue = $this->multiPageSubmitValue; - } - echo '
'.($printReset?'':''); - if(strstr($submitValue,"image:")){ - echo '"; - } else { - echo ''; - } - echo '
'.($closeForm?'
':'')."\n"; - - } - - if( $this->returnOutput ){ - $html_block = ob_get_contents(); - ob_end_clean(); - return $html_block; - } - - } - - // This function outputs a single field called by name. It searches the fields resource using mysql_field_name - // until it finds the field provided in the argument, it then calls _outputField($n) where $n is the record offset - function printField($fieldName,$attr='',$verify=false){ - - // apply to nodes if a multiform root - if( $this->_multi == 'root' ){ - return $this->_applyMethod('printField', array($fieldName,$attr,$verify), $fieldName); - } - - // otherwise as normal - for ($n=0; $n < $this->columns; $n++){ - - if( $fieldName == $this->fieldNames[$n] ){ - - if( $this->returnOutput ){ ob_start(); } - - $this->_outputField($n, $attr, $verify); - - if( $this->returnOutput ){ - $html_block = ob_get_contents(); - ob_end_clean(); - return $html_block; - } - - return 1; - } - - } return 0; - - } - - // this sets a key string for rc4 encryption of pkey - function setEncryptionKey($key){ - - // not callable by a multiform node - if( $this->_multi == 'node' && !isset($this->_root->_encFlag) ) return false; - - if($key){ - - $this->rc4key = $key; - $this->rc4 = new rc4crypt(); - - // set flag and apply to nodes if a multiform root - if( $this->_multi == 'root' ){ - $this->_encFlag = true; - $this->_applyMethod('setEncryptionKey', array($key)); - unset($this->_encFlag); - } - return true; - - } else return false; - - } - - // this function outputs a hidden field that enables a multi page form, takes argument $step - // $step should be "start" for first page, "end" for last page and "next" for intermediate pages - function multiPage($step,$buttonValue='Continue'){ - - // not callable by a multiform node - if( $this->_multi == 'node' ) return false; - - if( $this->returnOutput ){ ob_start(); } - - if($step == 'start' || $step == 'next' || $step == 'end') - echo ''; - if($step == 'end' && $buttonValue == 'Continue') $this->multiPageSubmitValue = 'Finish'; - else $this->multiPageSubmitValue = $buttonValue; - - if( $this->returnOutput ){ - $html_block = ob_get_contents(); - ob_end_clean(); - return $html_block; - } - - } - - // This function returns a field's default mysql value, - // or false when no default is available. - // new in version 1.5 - function getFieldDefault($fieldName) - { - // only apply to a single node if a multiform root - if( $this->_multi == 'root' ){ - return strpos($fieldName,'.') ? $this->_applyMethod('getFieldDefault', array($fieldName), $fieldName) : false; - } - - return isset($this->fields[$fieldName]['default']) ? $this->fields[$fieldName]['default'] : false; - } - - // This function returns a single field value. It is useful to test a field value without printing it - // this is equivilent to accessing a field like so: $FormitableObj->record["fieldName"] but with some error checking - function getFieldValue($fieldName){ - - // only apply to a single node if a multiform root - if( $this->_multi == 'root' ){ - if( strpos($fieldName,'.') ){ - return $this->_applyMethod('getFieldValue', array($fieldName), $fieldName ); - } else return false; - } - - if( isset($this->record[$fieldName]) ) return $this->record[$fieldName]; - else if( isset($this->_post[$fieldName]) ) return $this->_post[$fieldName]; - else return false; - - } - - // This function returns a single field label. It is useful to get a field label without printing it - // this is equivilent to accessing a field like so: $FormitableObj->labels["fieldName"] but with some error checking - function getFieldLabel($fieldName){ - - // only apply to a single node if a multiform root - if( $this->_multi == 'root' ){ - if( strpos($fieldName,'.') ){ - return $this->_applyMethod('getFieldLabel', array($fieldName), $fieldName ); - } else return false; - } - - if( isset($this->labels[$fieldName]) ) return $this->labels[$fieldName]; - else return ucwords( str_replace("_", " ", $fieldName) ); - - } - - // This function enables the submission of an arbitrary field when encryption is enabled - // and the field was not output in the form (therefore not included in the form signature) - function allowField($fieldName,$from=null){ - - // apply to nodes if a multiform root - if( $this->_multi == 'root' ){ - $field = explode('.',$fieldName); - if( count($field) == 2 && array_key_exists($field[0],$this->tables) ) - return $this->_applyMethod('allowField', array($field[1],$from), $fieldName ); - } else { - if( $fieldName ) $this->signature[] = $fieldName; - if( $from ) $this->_allowedFrom[ str_replace('.','__',$from) ] = $fieldName; - } - - } - - // this function outputs the entire form, one field at a time - function printForm($openArgs=array(),$closeArgs=array()){ - - if( $this->returnOutput ){ - - ob_start(); - $this->returnOutput = false; - $this->printForm($openArgs,$closeArgs); - $this->returnOutput = true; - $html_block = ob_get_contents(); - ob_end_clean(); - return $html_block; - - } else { - - // don't open if this is a multiform node - if( $this->_multi != 'node' ){ echo call_user_func_array( array(&$this, 'openForm'), $openArgs ); } - // if this is a multiform root cycle through nodes - if( $this->_multi == 'root' ){ - foreach( $this->tables as $form ){ - for($n=0; $n < $form->columns; $n++) $form->_outputField($n); - } - // otherwise output as normal - } else if( $this->submitted != 1 ){ - for($n=0; $n < $this->columns; $n++) $this->_outputField($n); - } - // close form - if( $this->submitted != 1 ){ - echo call_user_func_array( array(&$this, 'closeForm'), $closeArgs ); - } - - } - - } - - // this function outputs the entire form, one field at a time - function printFromTemplate($tpl){ - - // not callable by a multiform node - if( $this->_multi == 'node' ) return false; - - if( is_file($tpl) ){ - if( !is_readable($tpl) ){ return false; } - $tpl = file_get_contents($tpl); - if($tpl === false){ return false; } - } - - // store return flag to restore later - $tmpReturn = $this->returnOutput; - $this->returnOutput = true; - - $pattern = '/\\'.$this->tplStart.'([^\\'.$this->tplEnd.']+)\\'.$this->tplEnd.'/U'; - preg_match_all($pattern, $tpl, $fields); - - foreach($fields[1] as $field){ - if( strstr($field, '_verify') ){ continue; } - $replace = $this->tplStart.$field.$this->tplEnd; - if( strstr($field, ':') ) { - $pieces = explode(':',$field); - $ct = count($pieces); - // replace with a php variable, up to a 2 dimension array - if($pieces[0]=='php'){ - global $$pieces[1]; - if($ct==2){ - $tpl = str_replace($replace, (isset(${$pieces[1]}) ? ${$pieces[1]}:''), $tpl); - } else if($ct==3){ - $tpl = str_replace($replace, (isset(${$pieces[1]}[$pieces[2]]) ? ${$pieces[1]}[$pieces[2]]:''), $tpl); - } else if($ct==4){ - $tpl = str_replace($replace, (isset(${$pieces[1]}[$pieces[2]][$pieces[3]]) ? ${$pieces[1]}[$pieces[2]][$pieces[3]]:''), $tpl); - } - } else if($pieces[0]=='setBreak'){ - if($ct==3){ - switch( strtolower($pieces[1]) ){ - case 'label': - $tpl = str_replace($replace,$this->setLabelBreak($pieces[2]), $tpl); - break; - case 'field': - $tpl = str_replace($replace,$this->setFieldBreak($pieces[2]), $tpl); - break; - case 'option': - $tpl = str_replace($replace,$this->setOptionBreak($pieces[2]), $tpl); - break; - } - } - } - } else if( $field == 'open_form' || strstr($field,'open_form,') ) { - $pieces = explode(',',$field); - $tpl = str_replace($replace, - $this->openForm( - (isset($pieces[1])?$pieces[1]:''), // $attr - (isset($pieces[2])?$pieces[2]:true), // $autosubmit - (isset($pieces[3])?$pieces[3]:'') // $action - ), $tpl); - } else if( $field=='close_form' || strstr($field,'close_form,') ) { - $pieces = explode(',',$field); - $tpl = str_replace($replace, - $this->closeForm( - (isset($pieces[1])?$pieces[1]:'Submit'), // $submitValue - (isset($pieces[2])?$pieces[2]:''), // $attr - (isset($pieces[3])?$pieces[3]:'Reset Form'), // $resetValue - (isset($pieces[4])?$pieces[4]:true), // $printReset - (isset($pieces[5])?$pieces[5]:true) // $closeForm - ), $tpl); - } else { - - $verifyReplace = $this->tplStart.$field.'_verify'.$this->tplEnd; - - // get attribute arg if avail - if( strpos($field, ',') !== false ){ - list($field, $fieldAttr) = explode(',',$field,2); - } else { $fieldAttr = null; } - - // get table and field if a multiform - if( $this->_multi == 'root' && strpos($field, '.') !== false ){ - list($table, $field) = explode('.',$field,2); - if( array_key_exists($table,$this->tables) ){ - $formitable = &$this->tables[$table]; - } - } - - // get the correct object if its not a multiform - if(!isset($formitable)){ $formitable = &$this; } - - // store node output flag if a root - if( $this->_multi == 'root' ){ - $tmpMultiReturn = $formitable->returnOutput; - $formitable->returnOutput = true; - } - - // replace the matched string w/ output of printField or empty string - $tpl = str_replace($replace, - ( in_array($field,$formitable->fieldNames) ? $formitable->printField($field, $fieldAttr) : '' ), $tpl); - - // replace verify string if available - if( in_array( (isset($table)?$table.'.':'').$field.'_verify', $fields ) ){ - $tpl = str_replace($verifyReplace, $formitable->printField($field, $fieldAttr, true), $tpl); - } - - // restore node output flag if a root - if( $this->_multi == 'root' ){ - $formitable->returnOutput = $tmpMultiReturn; - } - - unset($fieldAttr); - } - } // end foreach - - $this->returnOutput = $tmpReturn; - if($tmpReturn){ - return $tpl; - } else { - print $tpl; - return true; - } - - } - - function setTemplateDelimiters($start, $end){ - - // not callable by a multiform node - if( $this->_multi == 'node' ) return false; - - if( (string)$start=='' || (string)$end=='' ){ return false; } - $this->tplStart = $start; - $this->tplEnd = $end; - - } - - // this function sets the error feedback method - function setFeedback($mode){ - - // not callable by a multiform node - if( $this->_multi == 'node' ) return false; - - if( @in_array($mode, array('line','box','both')) ){ - $this->feedback = $mode; - return true; - } else return false; - - } - - // this function sets a callback function - function registerCallback($fieldName, $funcName, $mode = 'post', $args = ''){ - - // apply to nodes if a multiform root - if( $this->_multi == 'root' ){ - return $this->_applyMethod('registerCallback', array($fieldName,$funcName,$mode,$args) ); - } - - if( @in_array(strtolower($mode), array('post','retrieve','both')) && is_callable($funcName) ){ - - $this->callback[$fieldName]['args'] = $args; - - if($mode == 'both'){ - $this->callback[$fieldName]['post'] = $this->callback[$fieldName]['retrieve'] = $funcName; - } else { - $this->callback[$fieldName][$mode] = $funcName; - } - - return true; - - } else return false; - - } - - function getProcessedData() - { - return array_diff_key($this->_post, $this->skip); - } - - // this function encrypts a value using the RC4 cipher - function encrypt($value){ - - if($this->rc4key){ - $value = $this->rc4->_encrypt ( - $this->rc4key, $value - ); - } - - return $value; - - } - - // this function decrypts a value using the RC4 cipher - function decrypt($value){ - - if($this->rc4key){ - $value = $this->rc4->_decrypt ( - $this->rc4key, - $this->_handle_magic_quotes($value) - ); - } - - return $value; - - } - - /*** BEGIN PRIVATE METHODS ***/ - - function _mysql_enum_values($fieldName){ - - // let's only query the database once - static $fields = null; - if(is_null($fields)){ - - // make sure something is assigned regardless of the results - $fields = array(); - $rows = $this->query('DESCRIBE '.$this->table, MYSQL_ASSOC); - foreach($rows as $row){ - $pieces = explode('(',$row['Type']); - if( count($pieces) > 1 && ($pieces[0] == 'enum' || $pieces[0] == 'set') ){ - // trim parens and separate values, 1 == "'" and -2 == "')" - $options = split("','",substr($pieces[1],1,-2)); - $fields[$row['Field']] = $options; - } - } - - } - - if($fieldName) - return isset( $fields[$fieldName] ) ? $fields[$fieldName] : false; - else - return $fields; - - } - - // this function will process the $_POST vars for a multiform node - // or just assign $_POST for a normal table - function _processPost(){ - if( empty($_POST) ) return false; - if( $this->_multi == 'node' ){ - $post = array(); - foreach($_POST as $fieldName=>$fieldValue){ - // split at __, if count eq 2 continue - $field = explode('__',$fieldName); - if( count($field) == 2 ){ - // shuffle post values if tables match - if( $field[0] == $this->table ){ - $post[$field[1]] = $fieldValue; - } - } - } - return $post; - } else return $_POST; - } - - // retrieve normalized data from another field - function _getFieldData($fieldName){ - - $SQLquery = 'SELECT `' - .$this->normalized[$fieldName]['tableKey'].'` AS pkey'. - ', ' - .$this->normalized[$fieldName]['tableValue'].' AS value '. - 'FROM `' - .$this->normalized[$fieldName]['tableName'].'` '. - 'WHERE ' - .$this->normalized[$fieldName]['whereClause'].' '. - 'ORDER BY ' - .$this->normalized[$fieldName]['orderBy']; - - $retrievedData = @mysql_query($SQLquery,$this->conn); - if(@mysql_error()!=''){ - echo 'ERROR: Unable to retrieve normalized data from `'.$this->normalized[$fieldName]['tableName'].'`'.( $this->mysql_errors ? '
'.mysql_error() : '' ); - return false; - } - - $numPairs = @mysql_num_rows($retrievedData); - $this->normalized[$fieldName]['pairs'] = $numPairs; - - for($i=0; $i<$numPairs; $i++){ - - $set = @mysql_fetch_assoc($retrievedData); - $this->normalized[$fieldName]['keys'][$i] = $set['pkey']; - $this->normalized[$fieldName]['values'][$i] = $set['value']; - - } - - } - - // retrieve field labels from another field - function _getFieldLabels($fieldName,$fieldOptions){ - - $fieldOptions= "'".implode("','",$fieldOptions)."'"; - $SQLquery = "SELECT `" - .$this->labelValues[$fieldName]['tableKey']."` AS pkey". - ", `" - .$this->labelValues[$fieldName]['tableValue']."` AS value ". - "FROM `" - .$this->labelValues[$fieldName]['tableName']."` ". - "WHERE `".$this->labelValues[$fieldName]['tableKey']."` IN(".$fieldOptions.")"; - - $retrievedData = @mysql_query($SQLquery,$this->conn); - if(@mysql_error()!=""){ - echo "ERROR: Unable to retrieve field labels from '".$this->labelValues[$fieldName]['tableName']."'.".($this->mysql_errors?"
".mysql_error():""); - return false; - } - - $numPairs = @mysql_num_rows($retrievedData); - - for($i=0; $i<$numPairs; $i++){ - - $set = @mysql_fetch_assoc($retrievedData); - $this->labelValues[$fieldName][$set['pkey']] = $set['value']; - - } - - } - - // outputs a hidden field that gets checked on submit to - // prevent empty set/enum fields from being overlooked when empty (i.e. no fields checked) - function _putSetCheckField($name){ - if(!isset($this->pkeyID) || isset($this->rc4key)) return; - $fieldTable = $this->_multi ? $this->table.'__' : ''; - echo ''."\n\n"; - } - - // prevent empty set/enum fields from being overlooked when empty (i.e. no fields checked) - // cycle through formitable_setcheck POST variable to assign empty values if necessary - function _setCheck(){ - if( isset($this->_post['formitable_setcheck']) ) - foreach($this->_post['formitable_setcheck'] as $key){ - $key = $this->decrypt($key); - if(!isset($this->_post[$key])) $this->_post[$key]=''; - } - } - - // checks magic quotes and returns value accordingly - function _handle_magic_quotes($value,$add=false){ - if($add) - return $this->_magic_quotes ? $value : addslashes($value); - else - return $this->_magic_quotes ? stripslashes($value) : $value; - } - - // validate field - function _validateField($fieldName,$fieldValue,$methodName){ - - // special case for verify fields - if($methodName == "_verify"){ - - if( $this->_post[$fieldName] == $this->_post[str_replace("_verify","",$fieldName)] ) return true; - else{ $this->errMsg[$fieldName] = "Values do not match"; return false; } - - } else if( @ereg($this->_validationMethod[$methodName]['regex'],$fieldValue) ){ - return true; - } else { - // test if custom error is set - if( isset($this->validate[$fieldName]['err']) ) - $this->errMsg[$fieldName] = $this->validate[$fieldName]['err']; - else // otherwise use default error - $this->errMsg[$fieldName] = $this->_validationMethod[$methodName]['err']; - return false; - } - - } - - // check validation - function _checkValidation(){ - - // cycle through $this->_post variables to test for validation - foreach($this->_post as $key=>$value){ - - if( isset($this->skip[$key]) ) continue; - - // decrypt hidden values if encrypted - if( isset($this->forced[$key]) && $this->forced[$key]=="hidden"){ - $this->_post[$key] = $value = $this->decrypt($value); - } - - $validated = true; - if( isset($this->validate[$key]) ) - $validated = $this->_validateField($key,$value,$this->validate[$key]['method']); - - // run callback if set and is callable - if( isset($this->callback[$key]["post"]) && $validated ){ - - $tmpValue = $this->callback[$key]["post"]($key,$value,$this->callback[$key]["args"]); - if( isset($tmpValue["status"]) && $tmpValue["status"] == "failed"){ - $this->errMsg[$key] = $tmpValue["errMsg"]; - $validated = false; - } - else $this->_post[$key] = $tmpValue; - - } - - // special cases for unique and verify fields - if( isset($this->unique[$key]) && $validated ) $this->_queryUnique($key); - if( strstr($key,"_verify") && $validated ) $this->_validateField($key,$value,"_verify"); - - } - - // test if there are errors from validation - if( isset($this->errMsg) ) return -1; - - } - - // this function checks if a field value is unique (not already stored in a record) - function _queryUnique($fieldName){ - - $SQLquery = "SELECT `".$fieldName."` FROM ".$this->table." WHERE `".$fieldName."` ='".$this->_post[$fieldName]."'"; - // if updating make sure it doesn't select self - if( isset($this->_post['pkey']) ) $SQLquery .= " AND ".$this->pkey." != '".$this->_post['pkey']."'"; - if( @mysql_num_rows(@mysql_query($SQLquery)) ) $this->errMsg[$fieldName] = $this->unique[$fieldName]['msg']; - - } - - // this function is used to apply a method to multiform nodes - // $fieldName should be provided for methods that use dot syntax (table.field) - function _applyMethod($method, $args=array(), $fieldName=false){ - - // apply to a single node - if( $fieldName && strpos($fieldName,'.') ){ - - // parse $fieldName, expecting table name at $field[0] and field name at $field[1] - $field = explode('.',$fieldName); - // test if there's exactly 2 results and if the table is legit - if( count($field)!=2 || !isset($this->tables[ $field[0] ]) ){ return false; } - // replace the first arg if its the fieldname - if( $args[0] == $fieldName ){ $args[0] = $field[1]; } - - return call_user_func_array( array(&$this->tables[ $field[0] ], $method), $args ); - - // apply to each node - } else { - - // apply the method to each node, updating the return value each time - foreach( $this->tables as $table=>$form ){ - $result = call_user_func_array( array(&$form, $method), $args ); - switch( gettype($result) ){ - default: - case 'boolean': $return = $result && (isset($return) ? $return : true); break; - case 'integer': $return = $result + (isset($return) ? $return : 0); break; - case 'array': // fallthrough - case 'resource': $return[$table] = $result; break; - case 'NULL': $return = null; break; - } - } - return $return; - - } - - } - - // this function is used by printForm to write the HTML for all label tags - // args are field name and label text with optional css class, focus value and fieldset - function _putLabel($fieldName, $fieldLabel, $css='text', $focus=true, $fieldSet=false){ - - $inputName = $this->_multi ? $this->table.'__'.$fieldName : $fieldName; - echo ''; - if(!$fieldSet) echo $this->labelBreak; else echo $this->optionBreak; - - } - - // this function is called by _outputField. it returns the correct field value by - // testing if a record has been retrieved using getRecord(), or the form was posted, - // or a default value has been set. - function _putValue($fieldName,$fieldType='text',$fieldValue=NULL){ - - $retrieved = isset($this->record); - if($retrieved){ - $recordValue = isset($this->defaultValues[$fieldName]['override']) ? - $this->defaultValues[$fieldName]['value'] : $this->record[$fieldName]; - } - - $posted = isset($this->_post[$fieldName]); - if($posted) $postValue = $this->_post[$fieldName]; - - $default = isset($this->defaultValues[$fieldName]); - if($default) $defaultValue = $this->defaultValues[$fieldName]['value']; - - switch($fieldType){ - - case 'textarea': - if( $posted && isset($postValue) ) - return $postValue; - else if( $retrieved ) - return isset($this->callback[$fieldName]['retrieve']) ? - $this->callback[$fieldName]['retrieve']($fieldName,$recordValue,$this->callback[$fieldName]['args']) - : htmlspecialchars($recordValue); - else if( isset($defaultValue) ) - return htmlspecialchars($defaultValue); - break; - - case 'hidden': - case 'text': - if( isset($postValue) ){ - if( $fieldType=='hidden' && isset($this->rc4key) ){ - $postValue = $this->encrypt($postValue); - } else { - $postValue = htmlspecialchars($postValue); - } - return ' value="'.$postValue.'"'; - } - else if( isset($recordValue) ){ - $value = isset($this->callback[$fieldName]['retrieve']) ? - $this->callback[$fieldName]['retrieve']($fieldName,$recordValue,$this->callback[$fieldName]['args']) - : $recordValue; - if( $fieldType=='hidden' && isset($this->rc4key) ){ - $value = $this->encrypt($value); - } else { - $value = htmlspecialchars($value); - } - return ' value="'.$value.'"'; - } - else if( isset($defaultValue) ){ - if( $fieldType=='hidden' && isset($this->rc4key) ) - $defaultValue = $this->encrypt($defaultValue); - return ' value="'.$defaultValue.'"'; - } - // accounts for default date & time formats - else if( !is_null($fieldValue) ) - return ' value="'.$fieldValue.'"'; - break; - - case 'radio': - $selectedText = ' checked'; - case 'select': - if(!isset($selectedText)) $selectedText = ' selected'; - if( ($posted && $postValue == $fieldValue) || - (!$posted && $retrieved && $recordValue == $fieldValue) || - (!$posted && !$retrieved && $default && $defaultValue == $fieldValue) - ) return $selectedText; - break; - - case 'checkbox': - $selectedText = ' checked'; - case 'multi': - if(!isset($selectedText)) $selectedText = ' selected'; - if( - ($posted && $postValue && preg_match( '/\b'.$fieldValue.'\b/', implode(",",$postValue) )) || - (!$posted && $retrieved && preg_match('/\b'.$fieldValue.'\b/', $recordValue)) || - (!$posted && !$retrieved && $default && preg_match('/\b'.$fieldValue.'\b/', $defaultValue)) - ){ return $selectedText; } - break; - - } - - return ''; - - } - - // this function forms the core of the class; - // it is called by public function printField and outputs a single field using a record offset - function _outputField($n,$attr='',$verify=false){ - - $name = $this->fieldNames[$n]; - $flags = $this->fields[$name]; - $type = $flags['type']; - $len = $flags['length']; - $subtype = @$flags['subtype']; - $byForce = false; - - // check if multiple tables are enabled - if($this->_multi){ - $inputName = $this->table.'__'.$name; - } else { $inputName = $name; } - - // check if type is forced, set var accordingly - if( isset($this->forced[$name]) ) $byForce = $this->forced[$name]; - - // if hidden, set type to skip - if( isset($this->hidden[$name]) ) $type = 'skip'; - else $this->signature[] = $name; - - // handle hidden type - if( $byForce == 'hidden' ){ - echo '_putValue($name,'hidden').($attr!=''?' '.$attr:'')."/>\n"; - return; - } - - // set custom label or uppercased-spaced field name - if($verify) $verified='_verify'; else $verified=''; - if( isset($this->labels[$name.$verified]) ) $label = $this->labels[$name.$verified]; - else $label = ucwords( str_replace('_', ' ', $name.$verified) ); - - // add error text to label if validation failed - if( $this->feedback=='line' || $this->feedback=='both' ){ - - // test if verify field and validation failed - if( $verify && isset($this->errMsg[$name.'_verify']) ) $label .= $this->err_pre.$this->errMsg[$name.'_verify'].$this->err_post; - // else test if regular field validation failed - else if( isset($this->errMsg[$name]) && $byForce != 'button' ) $label .= $this->err_pre.$this->errMsg[$name].$this->err_post; - - } - - // set vars if normalized data was retrieved - if( isset($this->normalized[$name]) ) $valuePairs = true; else $valuePairs = false; - - // set vars if enum labels were retrieved - if( isset($this->labelValues[$name]) ) $labelPairs = true; else $labelPairs = false; - - switch($type){ - - case 'real': - case 'int': - if($valuePairs){ - $this->_putLabel($name,$label,'select',false); - $this->_getFieldData($name); - echo ''.$this->fieldBreak; - } - else { - $this->_putLabel($name,$label); - if($len<$this->textInputLength) $length = $len; else $length=$this->textInputLength; - echo '_putValue($name).($attr!=""?" ".$attr:"").'>'.$this->fieldBreak; - } - break; - - case 'blob': - $this->_putLabel($name,$label); - if( $byForce == 'file' ){ - echo ''.$this->fieldBreak; - } else if( ($len>$this->strField_toggle || $byForce == 'textarea') && $byForce!='text' ){ - echo ''.$this->fieldBreak; - } else { - echo '_putValue($name).($attr!=''?' '.$attr:'').'/>'.$this->fieldBreak; - } - break; - - case 'string': - - if($subtype == 'enum'){ - - if($valuePairs){ - $this->_getFieldData($name); - $len=sizeof($this->normalized[$name]); - } else { - $options = $flags['options']; - if($labelPairs) $this->_getFieldLabels($name,$options); - $len=sizeof($options); - } - - if( ($len > $this->enumField_toggle || $byForce == 'select') && $byForce != 'radio'){ - $this->_putLabel($name,$label,'',false); - echo ''.$this->fieldBreak; - } else { - if($this->enableFieldSets){ - echo '
'."\n"; - echo ''.$label.''."\n"; - } else $this->_putLabel($name,$label,"",false); - if( $valuePairs ) - for($i=0;$i<$this->normalized[$name]['pairs'];$i++){ - echo ' _putValue($name,'radio',$this->normalized[$name]['keys'][$i]). - ($attr!=''?' '.$attr:'').'/>'; - $this->_putLabel($name."_".$this->normalized[$name]['keys'][$i],$this->normalized[$name]['values'][$i],'radio',true,true); - } - else - foreach($options as $opt){ - if( isset($this->labelValues[$name][$opt]) ) $optionLabel=$this->labelValues[$name][$opt]; else $optionLabel=$opt; - echo ' _putValue($name,'radio',$opt).($attr!=''?' '.$attr:'').'/>'; - $this->_putLabel($name."_".$opt,$optionLabel,'radio',true,true); - } - if($this->enableFieldSets) echo '

'."\n\n"; - } - - } else if($subtype == 'set') { - - if( $valuePairs ){ - $this->_getFieldData($name); - $len=sizeof($this->normalized[$name]); - } - else { - $options = $flags['options']; - if($labelPairs) $this->_getFieldLabels($name,$options); - $len=sizeof($options); - } - if( ($len > $this->enumField_toggle || $byForce == 'multiselect') && $byForce != 'checkbox' ){ - $this->_putLabel($name,$label,"",false); - echo ''.$this->fieldBreak; - } else { - if($this->enableFieldSets){ - echo '
'."\n"; - echo ''.$label.''."\n"; - } else $this->_putLabel($name,$label,"",false); - $cb=0; - if( $valuePairs ) - for($i=0;$i<$this->normalized[$name]['pairs'];$i++){ - echo ' _putValue($name,'checkbox',$this->normalized[$name]['keys'][$i]). - ($attr!=''?' '.$attr:'').'/>'; - $this->_putLabel($name.'_'.$cb,$this->normalized[$name]['values'][$i],'checkbox',true,true); - $cb++; - } - else - foreach($options as $opt){ - if( isset($this->labelValues[$name][$opt]) ) $optionLabel=$this->labelValues[$name][$opt]; else $optionLabel=$opt; - echo ' _putValue($name,'checkbox',$opt).($attr!=''?' '.$attr:'').'/>'; - $this->_putLabel($name.'_'.$cb,$optionLabel,'checkbox',true,true); - $cb++; - } - if($this->enableFieldSets) echo '

'."\n\n"; - } - $this->_putSetCheckField($name); - - } else { // plain text field - - if($verify) $inputName = $inputName.'_verify'; - if( $byForce != 'button' ){ $this->_putLabel($name,$label); } - if($len < $this->textInputLength) $length = $len; else $length=$this->textInputLength; - - if( ($len>$this->strField_toggle || $byForce == 'textarea') && - $byForce != 'text' && $byForce != 'file' ){ - echo ''.$this->fieldBreak; - } else { - if( $byForce == 'file' ){ - echo ''.$this->fieldBreak; - } else if( $byForce == 'button' ){ - echo ''.$this->fieldBreak; - } else { - $fieldType = ($byForce=='password' ? 'password' : 'text'); - echo '_putValue( (isset($this->_post[$name])?$name:str_replace('_verify','',$name)) ). - ($attr!=''?' '.$attr:'').'/>'.$this->fieldBreak; - } - } - - } - break; - - case 'date': - $fieldVals['date'] = array('size'=>'10', 'default'=>date('Y-m-d')); - - case 'datetime': - $fieldVals['datetime'] = array('size'=>'19', 'default'=>date('Y-m-d H:i:s')); - - case 'timestamp': - $fieldVals['timestamp'] = array('size'=>$len, 'default'=>time()); - - case 'time': - $fieldVals['time'] = array('size'=>'8', 'default'=>date('H:i:s')); - - case 'year': - $fieldVals['year'] = array('size'=>'4', 'default'=>date('Y')); - - $this->_putLabel($name,$label); - echo '_putValue($name,"text",$fieldVals[$type]['default']). - ($attr && stristr($attr,'class=')?'':' class="text"').($attr!=''?' '.$attr:'').'/>'.$this->fieldBreak; - break; - - case 'skip': - break; - - } // end switch - - } // end _outputField - -} // end Formitable class - - -// RC4Crypt 3.2 (C) Copyright 2006 Mukul Sabharwal [http://mjsabby.com] All Rights Reserved -class rc4crypt { - function _crypt ($pwd, $data, $ispwdHex = 0){ - if ($ispwdHex) - $pwd = @pack('H*', $pwd); // valid input, please! - - $key[] = ''; - $box[] = ''; - $cipher = ''; - - $pwd_length = strlen($pwd); - $data_length = strlen($data); - - for ($i = 0; $i < 256; $i++){ - $key[$i] = ord($pwd[$i % $pwd_length]); - $box[$i] = $i; - } - for ($j = $i = 0; $i < 256; $i++){ - $j = ($j + $box[$i] + $key[$i]) % 256; - $tmp = $box[$i]; - $box[$i] = $box[$j]; - $box[$j] = $tmp; - } - for ($a = $j = $i = 0; $i < $data_length; $i++){ - $a = ($a + 1) % 256; - $j = ($j + $box[$a]) % 256; - $tmp = $box[$a]; - $box[$a] = $box[$j]; - $box[$j] = $tmp; - $k = $box[(($box[$a] + $box[$j]) % 256)]; - $cipher .= chr(ord($data[$i]) ^ $k); - } - return $cipher; - } - function _encrypt ($pwd, $data, $ispwdHex = 0){ - return rawurlencode($this->_crypt($pwd, $data, $ispwdHex)); - } - function _decrypt ($pwd, $data, $ispwdHex = 0){ - //return $this->_crypt($pwd, urldecode(get_magic_quotes_gpc()?stripslashes($data):$data), $ispwdHex); - return $this->_crypt($pwd, urldecode($data), $ispwdHex); - } -} - -?> diff --git a/css/.DS_Store b/frontend_ui/css/.DS_Store similarity index 100% rename from css/.DS_Store rename to frontend_ui/css/.DS_Store diff --git a/frontend_ui/css/Formitable_style.css b/frontend_ui/css/Formitable_style.css deleted file mode 100644 index 6d70aab..0000000 --- a/frontend_ui/css/Formitable_style.css +++ /dev/null @@ -1,130 +0,0 @@ -/* This file covers all of the styles used natively within Formitable. Use what you want and discard the rest. */ - -body{ font-family:arial,verdana,helvetica,sans-serif; font-size: 12px; !important } - -.label { - font-size:12px; - letter-spacing:2px; -} - -.textlabel { - font-size:12px; - letter-spacing:2px; -} - -.checkboxlabel { - font-size:12px; - letter-spacing:2px; -} - -.radiolabel { - font-size:12px; - letter-spacing:2px; -} - -.selectlabel { - font-size:12px; - letter-spacing:2px; -} - -.font { - width:100%; -} - -.err { - font-size:10px; - color:red; -} - -.errBox { - padding:10px; - background-color:#F3F4E9; - color: #888888; - border:1px solid #CCCCCC; - margin-bottom:5px; - font-size:12px; - text-align:left; -} - -.errBoxName { - font-weight: bold; -} - -.text { - font-family:arial,helvetica,verdana,sans-serif; - font-size:12px; - color: #888888; - width:100%; - height:20px; - border:1px solid #CCCCCC; -} - -.textarea { - font-family:arial,helvetica,verdana,sans-serif; - font-size:12px; - color: #888888; - width:100%; - height:125px; - border:1px solid #CCCCCC; - overflow:auto; - scrollbar-track-color: #CCCCCC; - scrollbar-face-color: white; - scrollbar-highlight-color: white; - scrollbar-3dlight-color: white; - scrollbar-darkshadow-color: white; - scrollbar-shadow-color: white; - scrollbar-arrow-color: #888888; -} - -.select { - font-family:arial,helvetica,verdana,sans-serif; - font-size:12px; - color: #888888; - width:100%; - height:19px; -} - -.multiselect { - font-family:arial,helvetica,verdana,sans-serif; - font-size:12px; - color: #888888; - width:100%; - height:75px; -} - -.fieldset { - border:1px solid #CCCCCC; - padding:3px; -} - -.legend { - border:1px solid #CCCCCC; - padding:3px; - letter-spacing:2px; -} - -.button { text-align:center; } - -.button input { - font-family:arial,helvetica,verdana,sans-serif; - font-size:12px; - color: #888888; - letter-spacing:2px; - border:1px solid #CCCCCC; - background-color:white; - width:146px; - margin:2px; - cursor:pointer; - cursor:hand; -} - -.boxed{ - padding:7px; - width:316px; - text-align:left; - font-size:12px; - border:1px solid #888888; - margin:5px; -} - -.boxed h3{ margin-top:0px; } diff --git a/datasets/sql/.DS_Store b/sql/.DS_Store similarity index 92% rename from datasets/sql/.DS_Store rename to sql/.DS_Store index 3e16977..5008ddf 100644 Binary files a/datasets/sql/.DS_Store and b/sql/.DS_Store differ diff --git a/sql/checkingAcctINSERT b/sql/checkingAcctINSERT new file mode 100644 index 0000000..a2df3b5 --- /dev/null +++ b/sql/checkingAcctINSERT @@ -0,0 +1,43 @@ +INSERT INTO PizzaPicadilly.checkingAcct ( idcheckingAcct,bankNumber,acctNumber,acctHolderName,acctStreet,acctCity,acctState,acctZip,idCustomer ) VALUES ( '',6,2,'?','?','Santa Fe','NM',5,'' ); + +INSERT INTO PizzaPicadilly.checkingAcct ( idcheckingAcct,bankNumber,acctNumber,acctHolderName,acctStreet,acctCity,acctState,acctZip,idCustomer ) VALUES ( '',7,2,'?','?','Salt Lake City','UT',1,'' ); + +INSERT INTO PizzaPicadilly.checkingAcct ( idcheckingAcct,bankNumber,acctNumber,acctHolderName,acctStreet,acctCity,acctState,acctZip,idCustomer ) VALUES ( '',9,8,'?','?','Mesa','AZ',6,'' ); + +INSERT INTO PizzaPicadilly.checkingAcct ( idcheckingAcct,bankNumber,acctNumber,acctHolderName,acctStreet,acctCity,acctState,acctZip,idCustomer ) VALUES ( '',0,3,'?','?','Vail','CO',7,'' ); + +INSERT INTO PizzaPicadilly.checkingAcct ( idcheckingAcct,bankNumber,acctNumber,acctHolderName,acctStreet,acctCity,acctState,acctZip,idCustomer ) VALUES ( '',1,8,'?','?','Santa Fe','NM',5,'' ); + +INSERT INTO PizzaPicadilly.checkingAcct ( idcheckingAcct,bankNumber,acctNumber,acctHolderName,acctStreet,acctCity,acctState,acctZip,idCustomer ) VALUES ( '',8,4,'?','?','Salt Lake City','UT',1,'' ); + +INSERT INTO PizzaPicadilly.checkingAcct ( idcheckingAcct,bankNumber,acctNumber,acctHolderName,acctStreet,acctCity,acctState,acctZip,idCustomer ) VALUES ( '',9,5,'?','?','Mesa','AZ',6,'' ); + +INSERT INTO PizzaPicadilly.checkingAcct ( idcheckingAcct,bankNumber,acctNumber,acctHolderName,acctStreet,acctCity,acctState,acctZip,idCustomer ) VALUES ( '',0,8,'?','?','Vail','CO',7,'' ); + +INSERT INTO PizzaPicadilly.checkingAcct ( idcheckingAcct,bankNumber,acctNumber,acctHolderName,acctStreet,acctCity,acctState,acctZip,idCustomer ) VALUES ( '',1,6,'?','?','Santa Fe','NM',5,'' ); + +INSERT INTO PizzaPicadilly.checkingAcct ( idcheckingAcct,bankNumber,acctNumber,acctHolderName,acctStreet,acctCity,acctState,acctZip,idCustomer ) VALUES ( '',6,2,'?','?','Salt Lake City','UT',1,'' ); + +INSERT INTO PizzaPicadilly.checkingAcct ( idcheckingAcct,bankNumber,acctNumber,acctHolderName,acctStreet,acctCity,acctState,acctZip,idCustomer ) VALUES ( '',7,7,'?','?','Mesa','AZ',6,'' ); + +INSERT INTO PizzaPicadilly.checkingAcct ( idcheckingAcct,bankNumber,acctNumber,acctHolderName,acctStreet,acctCity,acctState,acctZip,idCustomer ) VALUES ( '',8,8,'?','?','Vail','CO',7,'' ); + +INSERT INTO PizzaPicadilly.checkingAcct ( idcheckingAcct,bankNumber,acctNumber,acctHolderName,acctStreet,acctCity,acctState,acctZip,idCustomer ) VALUES ( '',9,8,'?','?','Santa Fe','NM',5,'' ); + +INSERT INTO PizzaPicadilly.checkingAcct ( idcheckingAcct,bankNumber,acctNumber,acctHolderName,acctStreet,acctCity,acctState,acctZip,idCustomer ) VALUES ( '',8,9,'?','?','Salt Lake City','UT',1,'' ); + +INSERT INTO PizzaPicadilly.checkingAcct ( idcheckingAcct,bankNumber,acctNumber,acctHolderName,acctStreet,acctCity,acctState,acctZip,idCustomer ) VALUES ( '',9,5,'?','?','Mesa','AZ',6,'' ); + +INSERT INTO PizzaPicadilly.checkingAcct ( idcheckingAcct,bankNumber,acctNumber,acctHolderName,acctStreet,acctCity,acctState,acctZip,idCustomer ) VALUES ( '',1,6,'?','?','Vail','CO',7,'' ); + +INSERT INTO PizzaPicadilly.checkingAcct ( idcheckingAcct,bankNumber,acctNumber,acctHolderName,acctStreet,acctCity,acctState,acctZip,idCustomer ) VALUES ( '',6,7,'?','?','Santa Fe','NM',5,'' ); + +INSERT INTO PizzaPicadilly.checkingAcct ( idcheckingAcct,bankNumber,acctNumber,acctHolderName,acctStreet,acctCity,acctState,acctZip,idCustomer ) VALUES ( '',2,8,'?','?','Orem','UT',7,'' ); + +INSERT INTO PizzaPicadilly.checkingAcct ( idcheckingAcct,bankNumber,acctNumber,acctHolderName,acctStreet,acctCity,acctState,acctZip,idCustomer ) VALUES ( '',8,9,'?','?','Mesa','AZ',6,'' ); + +INSERT INTO PizzaPicadilly.checkingAcct ( idcheckingAcct,bankNumber,acctNumber,acctHolderName,acctStreet,acctCity,acctState,acctZip,idCustomer ) VALUES ( '',3,0,'?','?','Vail','CO',7,'' ); + +INSERT INTO PizzaPicadilly.checkingAcct ( idcheckingAcct,bankNumber,acctNumber,acctHolderName,acctStreet,acctCity,acctState,acctZip,idCustomer ) VALUES ( '',7,1,'?','?','Santa Fe','NM',5,'' ); + +INSERT INTO PizzaPicadilly.checkingAcct ( idcheckingAcct,bankNumber,acctNumber,acctHolderName,acctStreet,acctCity,acctState,acctZip,idCustomer ) VALUES ( '',4,2,'?','?','Salt Lake City','UT',1,'' ); diff --git a/sql/contactINSERT b/sql/contactINSERT new file mode 100644 index 0000000..882d4ab --- /dev/null +++ b/sql/contactINSERT @@ -0,0 +1,47 @@ +INSERT INTO PizzaPicadilly.contact ( idContact,contactType,contactStreet1,contactStreet2,contactCity,contactState,contactZip,contactPhone1,contactPhone2,contactEmail,idCustomer,idSupplier,website ) VALUES ( '','Customer','?','?','Santa Fe','NM',5,4,'','','','','' ); + +INSERT INTO PizzaPicadilly.contact ( idContact,contactType,contactStreet1,contactStreet2,contactCity,contactState,contactZip,contactPhone1,contactPhone2,contactEmail,idCustomer,idSupplier,website ) VALUES ( '','Customer','?','?','Salt Lake City','UT',1,4,'','','','','' ); + +INSERT INTO PizzaPicadilly.contact ( idContact,contactType,contactStreet1,contactStreet2,contactCity,contactState,contactZip,contactPhone1,contactPhone2,contactEmail,idCustomer,idSupplier,website ) VALUES ( '','Customer','?','?','Mesa','AZ',6,4,'','','','','' ); + +INSERT INTO PizzaPicadilly.contact ( idContact,contactType,contactStreet1,contactStreet2,contactCity,contactState,contactZip,contactPhone1,contactPhone2,contactEmail,idCustomer,idSupplier,website ) VALUES ( '','Customer','?','?','Vail','CO',7,4,'','','','','' ); + +INSERT INTO PizzaPicadilly.contact ( idContact,contactType,contactStreet1,contactStreet2,contactCity,contactState,contactZip,contactPhone1,contactPhone2,contactEmail,idCustomer,idSupplier,website ) VALUES ( '','Customer','?','?','Santa Fe','NM',5,4,'','','','','' ); + +INSERT INTO PizzaPicadilly.contact ( idContact,contactType,contactStreet1,contactStreet2,contactCity,contactState,contactZip,contactPhone1,contactPhone2,contactEmail,idCustomer,idSupplier,website ) VALUES ( '','Customer','?','?','Salt Lake City','UT',1,4,'','','','','' ); + +INSERT INTO PizzaPicadilly.contact ( idContact,contactType,contactStreet1,contactStreet2,contactCity,contactState,contactZip,contactPhone1,contactPhone2,contactEmail,idCustomer,idSupplier,website ) VALUES ( '','Customer','?','?','Mesa','AZ',6,4,'','','','','' ); + +INSERT INTO PizzaPicadilly.contact ( idContact,contactType,contactStreet1,contactStreet2,contactCity,contactState,contactZip,contactPhone1,contactPhone2,contactEmail,idCustomer,idSupplier,website ) VALUES ( '','Manufacturer','?','?','Vail','CO',7,4,'','','','','www.centralrestaurant.com/' ); + +INSERT INTO PizzaPicadilly.contact ( idContact,contactType,contactStreet1,contactStreet2,contactCity,contactState,contactZip,contactPhone1,contactPhone2,contactEmail,idCustomer,idSupplier,website ) VALUES ( '','Customer','?','?','Santa Fe','NM',5,4,'','','','','' ); + +INSERT INTO PizzaPicadilly.contact ( idContact,contactType,contactStreet1,contactStreet2,contactCity,contactState,contactZip,contactPhone1,contactPhone2,contactEmail,idCustomer,idSupplier,website ) VALUES ( '','Customer','?','?','Salt Lake City','UT',1,4,'','','','','' ); + +INSERT INTO PizzaPicadilly.contact ( idContact,contactType,contactStreet1,contactStreet2,contactCity,contactState,contactZip,contactPhone1,contactPhone2,contactEmail,idCustomer,idSupplier,website ) VALUES ( '','Customer','?','?','Mesa','AZ',6,4,'','','','','' ); + +INSERT INTO PizzaPicadilly.contact ( idContact,contactType,contactStreet1,contactStreet2,contactCity,contactState,contactZip,contactPhone1,contactPhone2,contactEmail,idCustomer,idSupplier,website ) VALUES ( '','Customer','?','?','Vail','CO',7,4,'','','','','' ); + +INSERT INTO PizzaPicadilly.contact ( idContact,contactType,contactStreet1,contactStreet2,contactCity,contactState,contactZip,contactPhone1,contactPhone2,contactEmail,idCustomer,idSupplier,website ) VALUES ( '','Customer','?','?','Santa Fe','NM',5,4,'','','','','' ); + +INSERT INTO PizzaPicadilly.contact ( idContact,contactType,contactStreet1,contactStreet2,contactCity,contactState,contactZip,contactPhone1,contactPhone2,contactEmail,idCustomer,idSupplier,website ) VALUES ( '','Manufacturer','?','?','Salt Lake City','UT',1,4,'','','','','littleladyfoods.com' ); + +INSERT INTO PizzaPicadilly.contact ( idContact,contactType,contactStreet1,contactStreet2,contactCity,contactState,contactZip,contactPhone1,contactPhone2,contactEmail,idCustomer,idSupplier,website ) VALUES ( '','Customer','?','?','Mesa','AZ',6,4,'','','','','' ); + +INSERT INTO PizzaPicadilly.contact ( idContact,contactType,contactStreet1,contactStreet2,contactCity,contactState,contactZip,contactPhone1,contactPhone2,contactEmail,idCustomer,idSupplier,website ) VALUES ( '','Customer','?','?','Vail','CO',7,4,'','','','','' ); + +INSERT INTO PizzaPicadilly.contact ( idContact,contactType,contactStreet1,contactStreet2,contactCity,contactState,contactZip,contactPhone1,contactPhone2,contactEmail,idCustomer,idSupplier,website ) VALUES ( '','Customer','?','?','Santa Fe','NM',5,4,'','','','','' ); + +INSERT INTO PizzaPicadilly.contact ( idContact,contactType,contactStreet1,contactStreet2,contactCity,contactState,contactZip,contactPhone1,contactPhone2,contactEmail,idCustomer,idSupplier,website ) VALUES ( '','Customer','?','?','Orem','UT',7,4,'','','','','' ); + +INSERT INTO PizzaPicadilly.contact ( idContact,contactType,contactStreet1,contactStreet2,contactCity,contactState,contactZip,contactPhone1,contactPhone2,contactEmail,idCustomer,idSupplier,website ) VALUES ( '','Supplier','?','?','Mesa','AZ',6,4,'','','','','www.pmq.com/Fall-2002/Pizza-Industry-Food-Distributor' ); + +INSERT INTO PizzaPicadilly.contact ( idContact,contactType,contactStreet1,contactStreet2,contactCity,contactState,contactZip,contactPhone1,contactPhone2,contactEmail,idCustomer,idSupplier,website ) VALUES ( '','Supplier','?','?','Vail','CO',7,4,'','','','','' ); + +INSERT INTO PizzaPicadilly.contact ( idContact,contactType,contactStreet1,contactStreet2,contactCity,contactState,contactZip,contactPhone1,contactPhone2,contactEmail,idCustomer,idSupplier,website ) VALUES ( '','Supplier','?','?','Santa Fe','NM',5,4,'','','','','' ); + +INSERT INTO PizzaPicadilly.contact ( idContact,contactType,contactStreet1,contactStreet2,contactCity,contactState,contactZip,contactPhone1,contactPhone2,contactEmail,idCustomer,idSupplier,website ) VALUES ( '','Supplier','?','?','Salt Lake City','UT',1,4,'','','','','littleladyfoods.com' ); + +INSERT INTO PizzaPicadilly.contact ( idContact,contactType,contactStreet1,contactStreet2,contactCity,contactState,contactZip,contactPhone1,contactPhone2,contactEmail,idCustomer,idSupplier,website ) VALUES ( '','','','','','','','','','','','','' ); + +INSERT INTO PizzaPicadilly.contact ( idContact,contactType,contactStreet1,contactStreet2,contactCity,contactState,contactZip,contactPhone1,contactPhone2,contactEmail,idCustomer,idSupplier,website ) VALUES ( '','','','','','','','','','','','','' ); diff --git a/sql/creditCardINSERT b/sql/creditCardINSERT new file mode 100644 index 0000000..486922a --- /dev/null +++ b/sql/creditCardINSERT @@ -0,0 +1,34 @@ +CREATE TABLE creditCard ( + `idcreditCard` INT, + `cardCompany` VARCHAR(11) CHARACTER SET utf8, + `cardIssuer` VARCHAR(15) CHARACTER SET utf8, + `cardNumber` INT, + `cvvNumber` INT, + `nameOnCard` VARCHAR(1) CHARACTER SET utf8, + `billStreet` VARCHAR(1) CHARACTER SET utf8, + `billCity` VARCHAR(14) CHARACTER SET utf8, + `billState` VARCHAR(2) CHARACTER SET utf8, + `billZip` INT +); +INSERT INTO creditCard VALUES (1,'Mastercard','Chase Bank',72126477272,441,'?','?','Santa Fe','NM',87505); +INSERT INTO creditCard VALUES (2,'Diners Club','Bank of America',12127397312,391,'?','?','Salt Lake City','UT',84101); +INSERT INTO creditCard VALUES (3,'AMEX','Wells Fargo',78128407478,393,'?','?','Mesa','AZ',84206); +INSERT INTO creditCard VALUES (4,'Visa','Patelco CU',13103417513,395,'?','?','Vail','CO',81657); +INSERT INTO creditCard VALUES (5,'Discover','Wells Fargo',78104487678,397,'?','?','Santa Fe','NM',87505); +INSERT INTO creditCard VALUES (6,'Mastercard','Bank of America',14105497714,399,'?','?','Salt Lake City','UT',84101); +INSERT INTO creditCard VALUES (7,'Mastercard','Wells Fargo',15106507815,401,'?','?','Mesa','AZ',84206); +INSERT INTO creditCard VALUES (8,'Mastercard','Bank of America',78107517978,407,'?','?','Vail','CO',81657); +INSERT INTO creditCard VALUES (9,'Discover','Wells Fargo',16108766816,409,'?','?','Santa Fe','NM',87505); +INSERT INTO creditCard VALUES (10,'Visa','Bank of America',72109776972,407,'?','?','Salt Lake City','UT',84101); +INSERT INTO creditCard VALUES (11,'AMEX','Patelco CU',17110787017,409,'?','?','Mesa','AZ',84206); +INSERT INTO creditCard VALUES (12,'Discover','Bank of America',78111797178,411,'?','?','Vail','CO',81657); +INSERT INTO creditCard VALUES (13,'Mastercard','Bank of America',18112687218,413,'?','?','Santa Fe','NM',87505); +INSERT INTO creditCard VALUES (14,'Visa','Wells Fargo',19113697319,415,'?','?','Salt Lake City','UT',84101); +INSERT INTO creditCard VALUES (15,'AMEX','Bank of America',45114117445,417,'?','?','Mesa','AZ',84206); +INSERT INTO creditCard VALUES (16,'Discover','Bank of America',46115167546,419,'?','?','Vail','CO',81657); +INSERT INTO creditCard VALUES (17,'Mastercard','Wells Fargo',47116127647,421,'?','?','Santa Fe','NM',87505); +INSERT INTO creditCard VALUES (18,'Diners Club','Patelco CU',48117187748,421,'?','?','Orem','UT',84097); +INSERT INTO creditCard VALUES (19,'AMEX','Wells Fargo',49118137849,407,'?','?','Mesa','AZ',84206); +INSERT INTO creditCard VALUES (20,'Visa','Bank of America',50119177950,409,'?','?','Vail','CO',81657); +INSERT INTO creditCard VALUES (21,'Mastercard','Wells Fargo',51120148051,411,'?','?','Santa Fe','NM',87505); +INSERT INTO creditCard VALUES (22,'Mastercard','Wells Fargo',52121158152,413,'?','?','Salt Lake City','UT',84101); \ No newline at end of file diff --git a/sql/ingredientINSERT b/sql/ingredientINSERT new file mode 100644 index 0000000..01112ee --- /dev/null +++ b/sql/ingredientINSERT @@ -0,0 +1,69 @@ +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 1,'Roma Tomatoes ','T2743O56122','$0.10 ',4,6,8,0,1 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 2,'Red Onions ','O2844S57123','$0.10 ',4,6,8,0,2 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 3,'Spinach ','S2945B58124','$0.10 ',4,6,8,0,2 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 4,'Broccoli ','B1146P71125','$0.10 ',4,6,8,0,2 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 5,'Pineapple ','P7247H72126','$0.10 ',4,6,8,0,3 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 6,'Jalapeno Peppers ','P1239S73127','$0.10 ',4,6,8,0,1 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 7,'Kalamata Olives ','O7840F74128','$0.10 ',4,6,8,0,1 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 8,'Fresh Mushrooms ','V1341P75103','$0.10 ',4,6,8,0,1 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 9,'Green Olives ','O7848T76104','$0.10 ',4,6,8,0,1 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 0,'Green Peppers ','P1449Z77105','$0.10 ',4,6,8,0,1 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 1,'Roasted Garlic ','V1550G78106','$0.10 ',4,6,8,0,1 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 2,'Hot Banana Peppers ','P7851O79107','$0.10 ',4,6,8,0,1 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 3,'Roasted Red Peppers ','P1676M68108','$0.10 ',4,6,8,0,1 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 4,'Sun Dried Tomatoes ','T7277O69109','$0.10 ',4,6,8,0,1 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 5,'Grilled Zucchini ','Z1778G70110','$0.10 ',4,6,8,0,1 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 6,'Potato slice ','R7879O71111','$0.10 ',4,6,8,0,1 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 7,'Caramelized Onions ','O1868M72112','$0.10 ',4,6,8,0,1 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 8,'Cilantro ','H1969O73113','$0.10 ',4,6,8,0,1 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 9,'Tomato Sauce','V4511G74114','$0.10 ',4,6,8,0,1 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 0,'Flour_White','F4616P75115','$0.10 ',4,6,8,0,4 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 1,'Flour_Wheat','F4712P76116','$0.10 ',4,6,8,0,4 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 2,'Flour_Gluten_Free','F4818T77117','$0.10 ',4,6,8,0,4 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 3,'Flour_Cornmeal','F4913Z78118','$0.10 ',4,6,8,0,4 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 4,'Flour_Multigrain','F5017H79119','$0.10 ',4,6,8,0,4 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 5,'Carmelized Carrots','R5114S80120','$0.10 ',4,6,8,0,1 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 6,'Eggplant','R5215F81121','$0.10 ',4,6,8,0,2 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 7,'Yak chips','M7972F29104','$0.10 ',4,6,8,0,3 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 8,'Buffalo Loins','M6812P11105','$0.10 ',4,6,8,0,3 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 9,'Lamb','C6978T72106','$0.10 ',4,6,8,0,3 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 0,'Shrimp','S1113Z12113','$0.10 ',4,6,8,0,3 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 1,'Salmon','S1678G78114','$0.10 ',4,6,8,0,3 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 2,'Prawns','S1214O13115','$0.10 ',4,6,8,0,3 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 3,'Steak','M1816M78116','$0.10 ',4,6,8,0,3 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 4,'Baked Beans','L1672T45117','$0.10 ',4,6,8,0,1 ); + +INSERT INTO PizzaPicadilly.ingredient ( idIngredient,ingredientName,productSKU,costPerOz,ozInSmall,ozInMedium,ozInLarge,ozInExtraLarge,idSupplier ) VALUES ( 5,'Kiwi','C7217Z46118','$0.10 ',4,6,8,0,2 ); diff --git a/sql/pieTypeINSERT b/sql/pieTypeINSERT new file mode 100644 index 0000000..634a69d --- /dev/null +++ b/sql/pieTypeINSERT @@ -0,0 +1,17 @@ +INSERT INTO PizzaPicadilly.pieType ( idPieType,pieTypeName,pieTypeDescription ) VALUES ( 1,'Standard','Standard' ); + +INSERT INTO PizzaPicadilly.pieType ( idPieType,pieTypeName,pieTypeDescription ) VALUES ( 2,'Custom','Custom' ); + +INSERT INTO PizzaPicadilly.pieType ( idPieType,pieTypeName,pieTypeDescription ) VALUES ( 3,'Thin Crust','Thin and light crust. Less filling.' ); + +INSERT INTO PizzaPicadilly.pieType ( idPieType,pieTypeName,pieTypeDescription ) VALUES ( 4,'Deep Dish','Deep Dish has more of the good stuff inside.' ); + +INSERT INTO PizzaPicadilly.pieType ( idPieType,pieTypeName,pieTypeDescription ) VALUES ( 5,'GlutenFree','GlutenFree' ); + +INSERT INTO PizzaPicadilly.pieType ( idPieType,pieTypeName,pieTypeDescription ) VALUES ( 6,'WholeWheat','Whole wheat ' ); + +INSERT INTO PizzaPicadilly.pieType ( idPieType,pieTypeName,pieTypeDescription ) VALUES ( 7,'Cornmeal Crust','A special treat using cornmeal instead of flour.' ); + +INSERT INTO PizzaPicadilly.pieType ( idPieType,pieTypeName,pieTypeDescription ) VALUES ( 8,'Multigrain','Our unique recipe using multi-grain flour.' ); + +INSERT INTO PizzaPicadilly.pieType ( idPieType,pieTypeName,pieTypeDescription ) VALUES ( 9,'Stuffed','Goodies stuffed in the crust' ); diff --git a/sql/productSupplierINSERT b/sql/productSupplierINSERT new file mode 100644 index 0000000..725f1bf --- /dev/null +++ b/sql/productSupplierINSERT @@ -0,0 +1,7 @@ +INSERT INTO PizzaPicadilly.productSupplier ( idSupplier,supplierName,idContact ) VALUES ( 1,'Acme Pizza Supplies','' ); + +INSERT INTO PizzaPicadilly.productSupplier ( idSupplier,supplierName,idContact ) VALUES ( 2,'Farmer Dante Fresh Produce','' ); + +INSERT INTO PizzaPicadilly.productSupplier ( idSupplier,supplierName,idContact ) VALUES ( 3,'Great Grains Restaurant Supply','' ); + +INSERT INTO PizzaPicadilly.productSupplier ( idSupplier,supplierName,idContact ) VALUES ( 4,'Sankofa Exotic Foods','' ); diff --git a/sql/stateSalesTaxINSERT b/sql/stateSalesTaxINSERT new file mode 100644 index 0000000..be8acb8 --- /dev/null +++ b/sql/stateSalesTaxINSERT @@ -0,0 +1,7 @@ +INSERT INTO PizzaPicadilly.stateSalesTax ( idstateTax,stateName,stateAbbeviation,stateTaxRate,localTaxRate,combinedTaxRate,maxLocalTaxRate ) VALUES ( 1,' Arizona','AZ',6,5,5,3 ); + +INSERT INTO PizzaPicadilly.stateSalesTax ( idstateTax,stateName,stateAbbeviation,stateTaxRate,localTaxRate,combinedTaxRate,maxLocalTaxRate ) VALUES ( 2,'Colorado','CO',9,6,5,3 ); + +INSERT INTO PizzaPicadilly.stateSalesTax ( idstateTax,stateName,stateAbbeviation,stateTaxRate,localTaxRate,combinedTaxRate,maxLocalTaxRate ) VALUES ( 3,' New Mexico','NM',5,3,5,5 ); + +INSERT INTO PizzaPicadilly.stateSalesTax ( idstateTax,stateName,stateAbbeviation,stateTaxRate,localTaxRate,combinedTaxRate,maxLocalTaxRate ) VALUES ( 4,'Utah','UT',5,1,6,5 );