Why doesn't my INSERT statements work after I forward engineer my logical database into a physical database?

I already forward engineer my logical model into a physical database, but I am having trouble with INSERTING records into my first table named Customers. I know everything went okay when I forward engineer the logical model into a physical database. Can anyone help me? I have attached pic of my
code and pic of my problem. Also, I attached the SQL script that I received from forward engineer the model.


-- 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 BrendasDMS
-- -----------------------------------------------------
SHOW WARNINGS;
-- -----------------------------------------------------
-- Schema brendasdms
-- -----------------------------------------------------
DROP SCHEMA IF EXISTS `brendasdms` ;

-- -----------------------------------------------------
-- Schema brendasdms
-- -----------------------------------------------------
CREATE SCHEMA IF NOT EXISTS `brendasdms` DEFAULT CHARACTER SET utf8 ;
SHOW WARNINGS;
USE `brendasdms` ;

-- -----------------------------------------------------
-- Table `customers`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `customers` ;

SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `customers` (
  `Customer_ID` INT(11) NOT NULL AUTO_INCREMENT,
  ` FirstName` VARCHAR(45) NOT NULL,
  `LastName` VARCHAR(45) NOT NULL,
  `Email` VARCHAR(45) NOT NULL,
  `Phone` VARCHAR(45) NOT NULL,
  PRIMARY KEY (`Customer_ID`),
  UNIQUE INDEX `CustomerID_UNIQUE` (`Customer_ID` ASC))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;

SHOW WARNINGS;

-- -----------------------------------------------------
-- Table `employees`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `employees` ;

SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `employees` (
  `Employee_ID` INT(11) NOT NULL AUTO_INCREMENT,
  `FirstName` VARCHAR(45) NOT NULL,
  `LastName` VARCHAR(45) NOT NULL,
  `Address` VARCHAR(45) NOT NULL,
  `City` VARCHAR(45) NOT NULL,
  `State` VARCHAR(45) NOT NULL,
  `Zip` VARCHAR(45) NOT NULL,
  `County` VARCHAR(45) NOT NULL,
  `PhoneNumber` VARCHAR(45) NOT NULL,
  `BirthDate` DATE NOT NULL,
  `SSN` VARCHAR(45) NOT NULL,
  PRIMARY KEY (`Employee_ID`),
  UNIQUE INDEX `FirstName_UNIQUE` (`FirstName` ASC))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;

SHOW WARNINGS;

-- -----------------------------------------------------
-- Table `shops`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `shops` ;

SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `shops` (
  `Shop_ID` INT(11) NOT NULL AUTO_INCREMENT,
  `Address` VARCHAR(45) NOT NULL,
  `County` VARCHAR(45) NOT NULL,
  `Zip` VARCHAR(45) NOT NULL,
  `Phone Number` VARCHAR(45) NOT NULL,
  PRIMARY KEY (`Shop_ID`),
  UNIQUE INDEX `ID_UNIQUE` (`Shop_ID` ASC))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;

SHOW WARNINGS;

-- -----------------------------------------------------
-- Table `employeeshop`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `employeeshop` ;

SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `employeeshop` (
  `Shop_ID` INT(11) NOT NULL,
  `Employee_ID` INT(11) NOT NULL,
  PRIMARY KEY (`Shop_ID`, `Employee_ID`),
  INDEX `fk_Shop_has_Employee_Employee1_idx` (`Employee_ID` ASC),
  INDEX `fk_Shop_has_Employee_Shop1_idx` (`Shop_ID` ASC),
  CONSTRAINT `fk_Shop_has_Employee_Employee1`
    FOREIGN KEY (`Employee_ID`)
    REFERENCES `employees` (`Employee_ID`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_Shop_has_Employee_Shop1`
    FOREIGN KEY (`Shop_ID`)
    REFERENCES `shops` (`Shop_ID`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;

SHOW WARNINGS;

-- -----------------------------------------------------
-- Table `ingredients`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `ingredients` ;

SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `ingredients` (
  `Ingredient_ID` INT(11) NOT NULL,
  `IngredientName` VARCHAR(45) NOT NULL,
  `UnitOfMeasure` VARCHAR(45) NOT NULL,
  `Quantity` INT(11) NOT NULL,
  `Price` DECIMAL(10,0) NOT NULL,
  PRIMARY KEY (`Ingredient_ID`))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;

SHOW WARNINGS;

-- -----------------------------------------------------
-- Table `vendors`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `vendors` ;

SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `vendors` (
  `Vendor_ID` INT(11) NOT NULL AUTO_INCREMENT,
  `FirstName` VARCHAR(45) NOT NULL,
  `LastName` VARCHAR(45) NOT NULL,
  `VendorType` VARCHAR(45) NOT NULL,
  `Address` VARCHAR(45) NOT NULL,
  `Zip` VARCHAR(45) NOT NULL,
  `PhoneNumber` VARCHAR(45) NOT NULL,
  PRIMARY KEY (`Vendor_ID`),
  UNIQUE INDEX `ID_UNIQUE` (`Vendor_ID` ASC))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;

SHOW WARNINGS;

-- -----------------------------------------------------
-- Table `orders`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `orders` ;

SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `orders` (
  `Order_ID` INT(11) NOT NULL AUTO_INCREMENT,
  `Date` DATE NOT NULL,
  `Vendor_ID` INT(11) NOT NULL,
  `Quantity` INT(11) NOT NULL,
  `UnitOfMeasure` VARCHAR(45) NOT NULL,
  `Price` DECIMAL(10,0) NOT NULL,
  PRIMARY KEY (`Order_ID`, `Vendor_ID`),
  UNIQUE INDEX `ID_UNIQUE` (`Order_ID` ASC),
  INDEX `fk_Orders_Vendor1_idx` (`Vendor_ID` ASC),
  CONSTRAINT `fk_Orders_Vendor1`
    FOREIGN KEY (`Vendor_ID`)
    REFERENCES `vendors` (`Vendor_ID`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;

SHOW WARNINGS;

-- -----------------------------------------------------
-- Table `orderlineitems`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `orderlineitems` ;

SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `orderlineitems` (
  `Quantity` INT(11) NOT NULL,
  `Order_ID` INT(11) NOT NULL,
  `Ingredient_ID` INT(11) NOT NULL,
  PRIMARY KEY (`Order_ID`, `Ingredient_ID`),
  INDEX `fk_OrderLineItems_Orders1_idx` (`Order_ID` ASC),
  INDEX `fk_OrderLineItems_Ingredients1_idx` (`Ingredient_ID` ASC),
  CONSTRAINT `fk_OrderLineItems_Ingredients1`
    FOREIGN KEY (`Ingredient_ID`)
    REFERENCES `ingredients` (`Ingredient_ID`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_OrderLineItems_Orders1`
    FOREIGN KEY (`Order_ID`)
    REFERENCES `orders` (`Order_ID`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;

SHOW WARNINGS;

-- -----------------------------------------------------
-- Table `products`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `products` ;

SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `products` (
  `Product_ID` INT(11) NOT NULL AUTO_INCREMENT,
  `ProductName` VARCHAR(45) NOT NULL,
  `UnitOfMeasure` VARCHAR(45) NOT NULL,
  `Price` DECIMAL(10,0) NOT NULL,
  `Quantity` INT(11) NOT NULL,
  PRIMARY KEY (`Product_ID`),
  UNIQUE INDEX `RecipeID_UNIQUE` (`Product_ID` ASC))
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;

SHOW WARNINGS;

-- -----------------------------------------------------
-- Table `recipes`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `recipes` ;

SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `recipes` (
  `Recipe_ID` INT(11) NOT NULL,
  `Directions` VARCHAR(45) NOT NULL,
  `Product_ID` INT(11) NOT NULL,
  PRIMARY KEY (`Recipe_ID`, `Product_ID`),
  UNIQUE INDEX `Recipe_ID_UNIQUE` (`Recipe_ID` ASC),
  INDEX `fk_Recipes_Products1_idx` (`Product_ID` ASC),
  CONSTRAINT `fk_Recipes_Products1`
    FOREIGN KEY (`Product_ID`)
    REFERENCES `products` (`Product_ID`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;

SHOW WARNINGS;

-- -----------------------------------------------------
-- Table `recipeingredients`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `recipeingredients` ;

SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `recipeingredients` (
  `Quantity` INT(11) NOT NULL,
  `Ingredient_ID` INT(11) NOT NULL,
  `UnitOfMeasure` VARCHAR(45) NOT NULL,
  `Price` DECIMAL(10,0) NOT NULL,
  `Recipe_ID` INT(11) NOT NULL,
  PRIMARY KEY (`Ingredient_ID`, `Recipe_ID`),
  INDEX `fk_RecipeIngredients_Ingredients2_idx` (`Ingredient_ID` ASC),
  INDEX `fk_RecipeIngredients_Recipes1_idx` (`Recipe_ID` ASC),
  CONSTRAINT `fk_RecipeIngredients_Ingredients2`
    FOREIGN KEY (`Ingredient_ID`)
    REFERENCES `ingredients` (`Ingredient_ID`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_RecipeIngredients_Recipes1`
    FOREIGN KEY (`Recipe_ID`)
    REFERENCES `recipes` (`Recipe_ID`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;

SHOW WARNINGS;

-- -----------------------------------------------------
-- Table `sales`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `sales` ;

SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `sales` (
  `Sale_ID` INT(11) NOT NULL AUTO_INCREMENT,
  `SaleDate` DATE NOT NULL,
  `Employee_ID` INT(11) NOT NULL,
  `Customer_ID` INT(11) NOT NULL,
  `Shop_ID` INT(11) NOT NULL,
  `Quantity` INT(11) NOT NULL,
  `Price` DECIMAL(10,0) NOT NULL,
  `UnitOfMeasure` VARCHAR(45) NOT NULL,
  PRIMARY KEY (`Sale_ID`, `Customer_ID`, `Employee_ID`, `Shop_ID`),
  INDEX `fk_Sale_Employee1_idx` (`Employee_ID` ASC),
  INDEX `fk_Sale_Customer1_idx` (`Customer_ID` ASC),
  INDEX `fk_Sale_Shops1_idx` (`Shop_ID` ASC),
  CONSTRAINT `fk_Sale_Customer1`
    FOREIGN KEY (`Customer_ID`)
    REFERENCES `customers` (`Customer_ID`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_Sale_Employee1`
    FOREIGN KEY (`Employee_ID`)
    REFERENCES `employees` (`Employee_ID`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_Sale_Shops1`
    FOREIGN KEY (`Shop_ID`)
    REFERENCES `shops` (`Shop_ID`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;

SHOW WARNINGS;

-- -----------------------------------------------------
-- Table `salelineitems`
-- -----------------------------------------------------
DROP TABLE IF EXISTS `salelineitems` ;

SHOW WARNINGS;
CREATE TABLE IF NOT EXISTS `salelineitems` (
  `Sale_ID` INT(11) NOT NULL,
  `Quantity` INT(11) NOT NULL,
  `Product_ID` INT(11) NOT NULL,
  PRIMARY KEY (`Sale_ID`, `Product_ID`),
  INDEX `fk_Sale_has_Product_Sale1_idx` (`Sale_ID` ASC),
  INDEX `fk_SaleLineItem_Product1_idx` (`Product_ID` ASC),
  CONSTRAINT `fk_SaleLineItem_Product1`
    FOREIGN KEY (`Product_ID`)
    REFERENCES `products` (`Product_ID`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION,
  CONSTRAINT `fk_Sale_has_Product_Sale1`
    FOREIGN KEY (`Sale_ID`)
    REFERENCES `sales` (`Sale_ID`)
    ON DELETE NO ACTION
    ON UPDATE NO ACTION)
ENGINE = InnoDB
DEFAULT CHARACTER SET = utf8;

SHOW WARNINGS;

SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;

If you look at your database schema, when you set the field “FirstName” you have a space between the backtick (`) and the fieldname FirstName.

@WebMachine,
Thank you!

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.