【SQL开源代码栏目提醒】:网学会员SQL开源代码为您提供costumemanager.sql参考,解决您在costumemanager.sql学习中工作中的难题,参考学习。
/*
Navicat MySQL Data Transfer
Source Host : localhost:3306
Source Database : costumemanager
Target Host : localhost:3306
Target Database : costumemanager
Date: 2011-04-01 07:54:20
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for account
-- ----------------------------
DROP TABLE IF EXISTS `account`;
CREATE TABLE `account` (
`AccountName` varchar(30) NOT NULL,
`AccountPass
word` varchar(20) NOT NULL,
`AccountType` smallint(6) NOT NULL,
`AccountNumber` int(11) NOT NULL AUTO_INCREMENT,
`ManagerID` int(11) DEFAULT NULL,
`AccountState` smallint(6) NOT NULL,
PRIMARY KEY (`AccountNumber`),
KEY `FK_manage` (`ManagerID`),
CONSTRAINT `FK_manage` FOREIGN KEY (`ManagerID`) REFERENCES `manager` (`ManagerID`)
) ENGINE=InnoDB AUTO_INCREMENT=1014 DEFAULT CHARSET=gb2312;
-- ----------------------------
-- Records of account
-- ----------------------------
INSERT INTO `account` VALUES ('admin', '1', '1', '1000', '100', '1');
INSERT INTO `account` VALUES ('wang', '1', '2', '1012', '101', '1');
INSERT INTO `account` VALUES ('xiao', '1', '3', '1013', '102', '1');
-- ----------------------------
-- Table structure for commodity
-- ----------------------------
DROP TABLE IF EXISTS `commodity`;
CREATE TABLE `commodity` (
`CommodityID` int(11) NOT NULL AUTO_INCREMENT,
`ProviderNumber` int(11) DEFAULT NULL,
`CommodityName` varchar(40) NOT NULL,
`InDate` datetime NOT NULL,
`ProduceDate` datetime NOT NULL,
`InPrice` float NOT NULL,
`SalePrice` float NOT NULL,
`StorageTime` int(11) NOT NULL,
`downLimit` int(11) NOT NULL,
`unit` varchar(8) DEFAULT NULL,
PRIMARY KEY (`CommodityID`),
KEY `FK_supply` (`ProviderNumber`),
CONSTRAINT `FK_supply` FOREIGN KEY (`ProviderNumber`) REFERENCES `provider` (`ProviderNumber`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=gb2312;
-- ----------------------------
-- Records of commodity
-- ----------------------------
INSERT INTO `commodity` VALUES ('12', '10015', '闀胯T鎭?, '2010-07-10 00:00:00', '2010-07-02 00:00:00', '35', '60', '100', '20', '浠?);
INSERT INTO `commodity` VALUES ('13', '10016', '鐧炬惌t鎭?, '2010-07-31 00:00:00', '2010-07-22 00:00:00', '40', '80', '180', '30', '浠?);
INSERT INTO `commodity` VALUES ('14', '10017', '鍚婂甫杩炶。瑁?, '2010-05-05 00:00:00', '2010-02-10 00:00:00', '80', '200', '180', '50', '浠?);
INSERT INTO `commodity` VALUES ('15', '10018', '鍚婂甫瑁欒暰涓濈鑺遍洩绾鸿繛琛h', '2010-07-18 00:00:00', '2010-05-13 00:00:00', '40', '80', '180', '100', '濂?);
INSERT INTO `commodity` VALUES ('16', '10019', '閽堢粐琛?, '2010-07-18 00:00:00', '2010-02-07 00:00:00', '50', '120', '180', '50', '濂?);
INSERT INTO `commodity` VALUES ('17', '10020', '鐗涗粩瑁?, '2009-05-27 00:00:00', '2010-02-18 00:00:00', '25', '80', '100', '30', '濂?);
INSERT INTO `commodity` VALUES ('18', '10019', '缇界粧鏈?, '2011-03-30 00:00:00', '2011-01-02 00:00:00', '58', '90', '120', '40', '浠?);
INSERT INTO `commodity` VALUES ('19', '10018', '鐨崏', '2011-03-30 00:00:00', '2011-02-16 00:00:00', '120', '500', '120', '20', '濂?);
INSERT INTO `commodity` VALUES ('20', '10016', '鏄ユ鍛㈠濂?, '2011-03-30 00:00:00', '2011-01-20 00:00:00', '50', '100', '120', '50', '濂?);
-- ----------------------------
-- Table structure for manager
-- ----------------------------
DROP TABLE IF EXISTS `manager`;
CREATE TABLE `manager` (
`ManagerID` int(11) NOT NULL AUTO_INCREMENT,
`ManagerName` varchar(20) NOT NULL,
`ManagerMobilephone` varchar(15) NOT NULL,
`ManagerRegionNumber` varchar(4) NOT NULL,
`ManagerEMail` varchar(30) DEFAULT NULL,
`ManagerPhone` varchar(10) NOT NULL,
PRIMARY KEY (`ManagerID`)
) ENGINE=InnoDB AUTO_INCREMENT=103 DEFAULT CHARSET=gb2312;
-- ----------------------------
-- Records of manager
-- ----------------------------
INSERT INTO `manager` VALUES ('100', '楂樼骇绠$悊鍛?, '', '0411', '55168wswzw@163.com', '87573294');
INSERT INTO `manager` VALUES ('101', '鏅氭搷浣滃憳', '', '0372', 'wang@163.com', '48751246');
INSERT INTO `manager` VALUES ('102', '鏅氱鐞嗗憳', '', '0372', 'xiao@163.com', '87452131');
-- ----------------------------
-- Table structure for provider
-- ----------------------------
DROP TABLE IF EXISTS `provider`;
CREATE TABLE `provider`