Implementasi struktur tabel ‘order’ Implementasi struktur tabel ‘ordertransaction’ Implementasi struktur tabel ‘product’ Implementasi struktur tabel ‘quotes’

ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

d. Implementasi struktur tabel ‘order’

CREATE TABLE IF NOT EXISTS `order` `orderID` int10 NOT NULL AUTO_INCREMENT, `customerID` int10 NOT NULL, `orderNumber` varchar30 NOT NULL, `orderDate` date NOT NULL, `terms` varchar15 NOT NULL, `salesPerson` varchar50 NOT NULL, `shipTo` varchar200 NOT NULL, `shipBy` varchar20 NOT NULL, `trackingRef` varchar30 NOT NULL, `orderNote` text NOT NULL, `subTotal` double20,0 NOT NULL, `discount` double20,0 NOT NULL, `charge` double20,0 NOT NULL, `netTotal` double20,0 NOT NULL, `insertDate` datetime NOT NULL, `insertUser` varchar30 NOT NULL, `status` enumopen,invoiced NOT NULL, PRIMARY KEY `orderID`, KEY `customerID` `customerID` ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

e. Implementasi struktur tabel ‘ordertransaction’

CREATE TABLE IF NOT EXISTS `ordertransaction` `orderTransID` varchar10 NOT NULL, `orderID` varchar10 NOT NULL, `productID` varchar10 NOT NULL, `quantity` int11 NOT NULL, `transDate` date NOT NULL, `firstTax` double20,0 NOT NULL, `secondTax` double20,0 NOT NULL, `discount` double20,0 NOT NULL, `location` varchar50 NOT NULL, `lineTotal` double20,0 NOT NULL, `note` varchar100 NOT NULL, PRIMARY KEY `orderTransID`, KEY `orderID` `orderID`, KEY `productID` `productID` ENGINE=InnoDB DEFAULT CHARSET=latin1;

f. Implementasi struktur tabel ‘product’

CREATE TABLE IF NOT EXISTS `product` `productID` varchar10 NOT NULL, `productName` varchar30 NOT NULL, `description` text NOT NULL, `unitValue` double20,0 NOT NULL, `firstTax` double20,0 NOT NULL, `secondTax` double20,0 NOT NULL, `status` enumy,n NOT NULL, PRIMARY KEY `productID` ENGINE=InnoDB DEFAULT CHARSET=latin1;

g. Implementasi struktur tabel ‘quotes’

CREATE TABLE IF NOT EXISTS `quotes` `quotesID` int10 NOT NULL AUTO_INCREMENT, `customerID` int10 NOT NULL, `quotesDate` date NOT NULL, `salesPerson` varchar50 NOT NULL, `shipTo` varchar200 NOT NULL, `note` text NOT NULL, `subTotal` double20,0 NOT NULL, `discount` double20,0 NOT NULL, `charge` double20,0 NOT NULL, `netTotal` double20,0 NOT NULL, `insertDate` datetime NOT NULL, `insertUser` varchar30 NOT NULL, `status` enumopen,ordered NOT NULL, PRIMARY KEY `quotesID`, KEY `customerID` `customerID` ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

h. Implementasi struktur tabel ‘quotestransaction’