📄 project2nd.sql
字号:
-- MySQL dump 10.10
--
-- Host: localhost Database: project2nd
-- ------------------------------------------------------
-- Server version 5.0.16-nt
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `assigntable`
--
DROP TABLE IF EXISTS `assigntable`;
CREATE TABLE `assigntable` (
`ID` int(5) NOT NULL auto_increment,
`Date` date NOT NULL,
`DisposeMan` varchar(15) NOT NULL,
`GoWhere` varchar(20) NOT NULL,
`Expendableid` int(11) default NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `ID` (`ID`),
KEY `Expendableid` (`Expendableid`),
CONSTRAINT `assigntable_ibfk_1` FOREIGN KEY (`Expendableid`) REFERENCES `expendabletable` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `assigntable`
--
/*!40000 ALTER TABLE `assigntable` DISABLE KEYS */;
LOCK TABLES `assigntable` WRITE;
INSERT INTO `assigntable` VALUES (11,'2006-04-01','李莎','机房A',2),(12,'2006-05-01','李莎','办公室',3);
UNLOCK TABLES;
/*!40000 ALTER TABLE `assigntable` ENABLE KEYS */;
--
-- Table structure for table `borrow_pc`
--
DROP TABLE IF EXISTS `borrow_pc`;
CREATE TABLE `borrow_pc` (
`BorrowID` int(5) NOT NULL,
`PcID` int(5) NOT NULL,
PRIMARY KEY (`BorrowID`,`PcID`),
KEY `BorrowID` (`BorrowID`),
KEY `PcID` (`PcID`),
CONSTRAINT `borrow_pc_ibfk_1` FOREIGN KEY (`BorrowID`) REFERENCES `borrowtable` (`ID`),
CONSTRAINT `borrow_pc_ibfk_2` FOREIGN KEY (`PcID`) REFERENCES `pctable` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `borrow_pc`
--
/*!40000 ALTER TABLE `borrow_pc` DISABLE KEYS */;
LOCK TABLES `borrow_pc` WRITE;
INSERT INTO `borrow_pc` VALUES (1,5),(1,6),(2,2),(3,5),(3,6),(4,3),(4,5);
UNLOCK TABLES;
/*!40000 ALTER TABLE `borrow_pc` ENABLE KEYS */;
--
-- Table structure for table `borrowtable`
--
DROP TABLE IF EXISTS `borrowtable`;
CREATE TABLE `borrowtable` (
`ID` int(5) NOT NULL auto_increment,
`Date` date NOT NULL,
`Maneger` varchar(15) NOT NULL,
`BorrowMan` varchar(15) NOT NULL,
`ReturnDate` date default NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `ID` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `borrowtable`
--
/*!40000 ALTER TABLE `borrowtable` DISABLE KEYS */;
LOCK TABLES `borrowtable` WRITE;
INSERT INTO `borrowtable` VALUES (1,'2000-01-01','q','q','2000-01-01'),(2,'2000-07-04','s','s','2000-07-04'),(3,'2001-01-01','r','r','2001-01-02'),(4,'2001-01-01','d','d','2001-01-01');
UNLOCK TABLES;
/*!40000 ALTER TABLE `borrowtable` ENABLE KEYS */;
--
-- Table structure for table `buylisttable`
--
DROP TABLE IF EXISTS `buylisttable`;
CREATE TABLE `buylisttable` (
`ID` int(5) NOT NULL auto_increment,
`Date` date NOT NULL,
`BuyMan` varchar(20) NOT NULL,
`Detail` varchar(200) NOT NULL,
`TotalPrice` int(10) NOT NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `ID` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `buylisttable`
--
/*!40000 ALTER TABLE `buylisttable` DISABLE KEYS */;
LOCK TABLES `buylisttable` WRITE;
INSERT INTO `buylisttable` VALUES (1,'2001-01-01','李方','第一次采购',19056),(2,'2006-02-02','李莎','第二次采购',10300),(3,'2006-03-03','李莎','第三次采购',6950);
UNLOCK TABLES;
/*!40000 ALTER TABLE `buylisttable` ENABLE KEYS */;
--
-- Table structure for table `classassigntable`
--
DROP TABLE IF EXISTS `classassigntable`;
CREATE TABLE `classassigntable` (
`ID` int(5) NOT NULL auto_increment,
`Room` varchar(1) NOT NULL,
`Teacher` varchar(15) NOT NULL,
`Student` int(5) NOT NULL,
`Date` date NOT NULL,
`JieCi` int(1) NOT NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `ID` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `classassigntable`
--
/*!40000 ALTER TABLE `classassigntable` DISABLE KEYS */;
LOCK TABLES `classassigntable` WRITE;
INSERT INTO `classassigntable` VALUES (5,'D','4',1313,'2005-09-09',5),(12,'V','V',88888,'2008-08-08',8),(50,'D','4',1313,'2005-09-09',2),(55,'P','I',2241,'2001-01-01',4),(56,'C','3',313,'2005-09-09',6),(59,'N','N',99244,'2008-01-01',4),(60,'M','M',98244,'2004-01-01',2),(61,'C','wo',2244,'2000-01-01',2),(63,'B','li',99313,'2005-09-09',3),(64,'A','wang',2246,'2005-09-09',2),(65,'E','1',2241,'2005-09-09',2),(66,'C','u',2245,'2005-08-07',6),(67,'F','F',2248,'2007-02-01',1);
UNLOCK TABLES;
/*!40000 ALTER TABLE `classassigntable` ENABLE KEYS */;
--
-- Table structure for table `deltable`
--
DROP TABLE IF EXISTS `deltable`;
CREATE TABLE `deltable` (
`ID` int(5) NOT NULL auto_increment,
`Date` date NOT NULL,
`DisposeMan` varchar(15) NOT NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `ID` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `deltable`
--
/*!40000 ALTER TABLE `deltable` DISABLE KEYS */;
LOCK TABLES `deltable` WRITE;
INSERT INTO `deltable` VALUES (4,'2001-01-01','y'),(8,'2004-04-04','d');
UNLOCK TABLES;
/*!40000 ALTER TABLE `deltable` ENABLE KEYS */;
--
-- Table structure for table `expendableitem`
--
DROP TABLE IF EXISTS `expendableitem`;
CREATE TABLE `expendableitem` (
`Id` int(11) NOT NULL auto_increment,
`expendableid` int(11) default NULL,
`Number` int(11) NOT NULL,
`Assignid` int(11) default NULL,
PRIMARY KEY (`Id`),
UNIQUE KEY `Id` (`Id`),
KEY `expendableid` (`expendableid`),
CONSTRAINT `expendableitem_ibfk_2` FOREIGN KEY (`expendableid`) REFERENCES `expendabletable` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `expendableitem`
--
/*!40000 ALTER TABLE `expendableitem` DISABLE KEYS */;
LOCK TABLES `expendableitem` WRITE;
INSERT INTO `expendableitem` VALUES (11,2,2,11),(12,3,5,12);
UNLOCK TABLES;
/*!40000 ALTER TABLE `expendableitem` ENABLE KEYS */;
--
-- Table structure for table `expendabletable`
--
DROP TABLE IF EXISTS `expendabletable`;
CREATE TABLE `expendabletable` (
`ID` int(5) NOT NULL auto_increment,
`BuyListID` int(5) default NULL,
`Name` varchar(20) NOT NULL,
`Number` int(10) NOT NULL,
`Locate` varchar(10) NOT NULL,
`Price` int(5) NOT NULL,
`Brand` varchar(20) NOT NULL,
`Leftnumber` int(10) NOT NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `ID` (`ID`),
KEY `BuyListID` (`BuyListID`),
CONSTRAINT `expendabletable_ibfk_1` FOREIGN KEY (`BuyListID`) REFERENCES `buylisttable` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `expendabletable`
--
/*!40000 ALTER TABLE `expendabletable` DISABLE KEYS */;
LOCK TABLES `expendabletable` WRITE;
INSERT INTO `expendabletable` VALUES (2,3,'磨盒',2,'库房',200,'爱普生',0),(3,2,'打印纸',10,'库房',20,'佳能',5),(4,3,'打印纸',10,'库房',20,'爱普生',10);
UNLOCK TABLES;
/*!40000 ALTER TABLE `expendabletable` ENABLE KEYS */;
--
-- Table structure for table `fixtable`
--
DROP TABLE IF EXISTS `fixtable`;
CREATE TABLE `fixtable` (
`ID` int(11) NOT NULL,
`Date` date NOT NULL,
`FixMan` varchar(15) NOT NULL,
`Result` varchar(50) NOT NULL,
`Method` varchar(50) NOT NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `ID` (`ID`),
CONSTRAINT `fixtable_ibfk_1` FOREIGN KEY (`ID`) REFERENCES `questiontable` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `fixtable`
--
/*!40000 ALTER TABLE `fixtable` DISABLE KEYS */;
LOCK TABLES `fixtable` WRITE;
INSERT INTO `fixtable` VALUES (1,'1980-01-01','no-record','no-record','no-record'),(2,'2000-07-05','yu','Good','a'),(3,'1980-01-01','no-record','no-record','no-record');
UNLOCK TABLES;
/*!40000 ALTER TABLE `fixtable` ENABLE KEYS */;
--
-- Table structure for table `groupwaretable`
--
DROP TABLE IF EXISTS `groupwaretable`;
CREATE TABLE `groupwaretable` (
`ID` int(11) NOT NULL auto_increment,
`BuyListID` int(5) default NULL,
`Name` varchar(50) NOT NULL,
`Brand` varchar(20) NOT NULL,
`Locate` varchar(10) NOT NULL,
`Detail` varchar(50) NOT NULL,
`Price` int(7) NOT NULL,
`State` varchar(4) NOT NULL default 'GOOD',
`BaoXiuDate` date NOT NULL,
`FixMan` varchar(15) NOT NULL,
`Tel` varchar(11) NOT NULL,
`AssignID` int(5) default NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `ID` (`ID`),
KEY `BuyListID` (`BuyListID`),
KEY `AssignID` (`AssignID`),
CONSTRAINT `groupwaretable_ibfk_1` FOREIGN KEY (`BuyListID`) REFERENCES `buylisttable` (`ID`),
CONSTRAINT `groupwaretable_ibfk_2` FOREIGN KEY (`AssignID`) REFERENCES `assigntable` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `groupwaretable`
--
/*!40000 ALTER TABLE `groupwaretable` DISABLE KEYS */;
LOCK TABLES `groupwaretable` WRITE;
INSERT INTO `groupwaretable` VALUES (1,1,'网卡','3COM','库房','100MB',10,'Used','2006-05-14','张洪','44444444',11),(2,1,'网卡','3COM','库房','10/100自适应',50,'Good','2007-01-01','王洪','66666666',NULL),(5,3,'HUB','3COM','库房','100M 6口',50,'Good','2006-06-30','王洪','66666666',NULL),(6,2,'HUB','3COM','库房','100M 4口',100,'Good','2006-06-30','王洪','66666666',NULL);
UNLOCK TABLES;
/*!40000 ALTER TABLE `groupwaretable` ENABLE KEYS */;
--
-- Table structure for table `pctable`
--
DROP TABLE IF EXISTS `pctable`;
CREATE TABLE `pctable` (
`ID` int(5) NOT NULL auto_increment,
`BuyListID` int(5) default NULL,
`Locate` varchar(40) NOT NULL,
`State` varchar(4) NOT NULL default 'GOOD',
`Brand` varchar(40) NOT NULL,
`Name` varchar(40) NOT NULL,
`Price` int(7) NOT NULL,
`Detail` varchar(100) NOT NULL,
`BaoXiuDate` date NOT NULL,
`FixMan` varchar(15) NOT NULL,
`Tel` varchar(11) NOT NULL,
`DelID` int(5) default NULL,
`statebefore` varchar(4) default NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `ID` (`ID`),
KEY `BuyListID` (`BuyListID`),
KEY `DelID` (`DelID`),
CONSTRAINT `pctable_ibfk_1` FOREIGN KEY (`BuyListID`) REFERENCES `buylisttable` (`ID`),
CONSTRAINT `pctable_ibfk_3` FOREIGN KEY (`DelID`) REFERENCES `deltable` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `pctable`
--
/*!40000 ALTER TABLE `pctable` DISABLE KEYS */;
LOCK TABLES `pctable` WRITE;
INSERT INTO `pctable` VALUES (1,1,'中心机房','Del','联想','台式机',4000,'P4','2006-01-01','张洪','44444444',4,'Bad'),(2,1,'中心机房','Out','联想','台式机',5000,'P4 液晶 512MB 80G','2007-01-01','王洪','66666666',NULL,'Good'),(3,1,'中心机房','Bad','联想','台式机',5000,'P4 液晶 512MB 80G','2007-01-01','王洪','66666666',NULL,'Del'),(5,1,'中心机房','Good','联想','台式机',5000,'P4 液晶 512MB 80G','2007-01-01','王洪','66666666',NULL,'Good'),(6,2,'中心机房','Del','Dell','台式机',10000,'P4D 1G 200G 液晶','2008-01-01','王洪','66666666',8,'Good'),(7,3,'中心机房','Good','Dell','台式机',6000,'P4液晶','2008-01-01','王洪','65556555',NULL,NULL);
UNLOCK TABLES;
/*!40000 ALTER TABLE `pctable` ENABLE KEYS */;
--
-- Table structure for table `questiontable`
--
DROP TABLE IF EXISTS `questiontable`;
CREATE TABLE `questiontable` (
`ID` int(5) NOT NULL auto_increment,
`SubmitMan` varchar(15) NOT NULL default '',
`Date` date NOT NULL default '0000-00-00',
`Detail` varchar(100) NOT NULL default '',
`PcID` int(5) default NULL,
PRIMARY KEY (`ID`),
KEY `PcID` (`PcID`),
CONSTRAINT `questiontable_ibfk_1` FOREIGN KEY (`PcID`) REFERENCES `pctable` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `questiontable`
--
/*!40000 ALTER TABLE `questiontable` DISABLE KEYS */;
LOCK TABLES `questiontable` WRITE;
INSERT INTO `questiontable` VALUES (1,'d','2000-07-04','f',1),(2,'li','2000-07-04','s',3),(3,'王洪','2006-02-02','未知',3);
UNLOCK TABLES;
/*!40000 ALTER TABLE `questiontable` ENABLE KEYS */;
--
-- Table structure for table `returntable`
--
DROP TABLE IF EXISTS `returntable`;
CREATE TABLE `returntable` (
`ID` int(5) NOT NULL,
`Question` varchar(50) default NULL,
`DisposeMan` varchar(15) NOT NULL,
PRIMARY KEY (`ID`),
UNIQUE KEY `ID` (`ID`),
CONSTRAINT `returntable_ibfk_1` FOREIGN KEY (`ID`) REFERENCES `borrowtable` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `returntable`
--
/*!40000 ALTER TABLE `returntable` DISABLE KEYS */;
LOCK TABLES `returntable` WRITE;
INSERT INTO `returntable` VALUES (1,'e','e'),(2,'no-record','no-record'),(3,'f','g'),(4,'s','s');
UNLOCK TABLES;
/*!40000 ALTER TABLE `returntable` ENABLE KEYS */;
--
-- Table structure for table `usertable`
--
DROP TABLE IF EXISTS `usertable`;
CREATE TABLE `usertable` (
`ID` int(5) NOT NULL auto_increment,
`UserName` varchar(15) NOT NULL,
`PassWord` varchar(40) NOT NULL,
`UserGroup` int(1) NOT NULL default '0',
PRIMARY KEY (`ID`),
UNIQUE KEY `ID` (`ID`),
UNIQUE KEY `UserName` (`UserName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `usertable`
--
/*!40000 ALTER TABLE `usertable` DISABLE KEYS */;
LOCK TABLES `usertable` WRITE;
INSERT INTO `usertable` VALUES (1,'admin','admin',1),(2,'teacher','teacher',0),(3,'禁用帐号','123',2);
UNLOCK TABLES;
/*!40000 ALTER TABLE `usertable` ENABLE KEYS */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -