Creating a database of device management information systems with MySQL (diagram)

Source: Internet
Author: User

General equipment Management Information System database
Equipment table: ID, name, category, model, date of shipment, date of purchase, manufacturing unit, quantity, unit of measurement, use Department, installation
Location, product picture, technical data, notes;
Defect table: ID, Device ID, defect description, handling situation, handling personnel;
Accident table: ID, Device ID, accident description, handling situation, handling personnel;
Maintenance category table: ID, category name, repair content, period (days)
Device category table: ID, category name;
Department table: ID, department name;
Device status table: ID, status name
Device status: Specifies the status of the device, its status data are: On-line, storage, idle, scrap, to be repaired, spare
Maintenance staff table: ID, name, Department, title, title;
Spare Parts table: ID, name, quantity, unit of measurement, use, on-hand inventory, minimum stock;
Tool table: ID, name, quantity, unit of measurement, use;
Maintenance records: ID, maintenance category ID, equipment ID, maintenance personnel, maintenance, repair time, consumption of materials;

Equipment Inspection table: ID, device ID, check date, inspection personnel, check the situation, check the way;

Create database devmng;show databases;



CREATE TABLE equipment (   equipmentid          int not null auto_increment,   devtypeid            int,   devname              varchar (),   modnum               varchar (touyundate),   gourudate   date, Zhidaodw             varchar (+),   quantity             int,   unit                 varchar (8),   usedepartment        varchar (50),   storeplace           varchar, picture              varchar (   technicaldata   ), varchar, Remark               varchar (n),   primary key (Equipmentid));



CREATE TABLE Devbug (   bugid          int not null auto_increment,   devid          int,   bugcontent     varchar (256),   chuliqk varchar (+)        ,   chuliren       varchar,   primary KEY (BugID)); Create TABLE Devfault (   faultid          int not null auto_increment,   devid            int,   faultcontent     varchar (UP),   CHULIQK          varchar (+),   chuliren         varchar (+),   primary key (Faultid));



CREATE TABLE RepairType (   rtid             int not null auto_increment,   rtname           varchar,   rtcontent        varchar (n),   cycle            int,   primary key (Rtid)), CREATE table Devtype (   dtid             int NOT null auto_ Increment,   dtname           varchar ($),   primary key (Dtid)); CREATE TABLE part (   ptID             int NOT NULL auto _increment,   partname         varchar ($),   primary key (PtID));



CREATE TABLE Devstatus (   dsid             int not null auto_increment,   dsname         varchar (),   primary key (DSID)) INSERT into devstatus values (1, "go online"), insert into devstatus values (2, "sequester"), insert into devstatus values (3, "idle"); insert Into Devstatus values (4, "Scrap"), insert into devstatus values (5, "Pending"), insert into devstatus values (6, "standby");



CREATE TABLE REPAIRPL (   rpid             int not null auto_increment,   ptid             int,   rpname           varchar),   Zhiwu            varchar,   zhich            varchar,   primary KEY (Rpid)); Create Table BPBJ (   bbID             int Not NULL auto_increment,   bbname           varchar ($),   num              int,   unit             varchar (8),   Purpose          varchar (n),   xianyounum       int,   minnum           int,   primary key (BbID));



Note: use is a keyword; it cannot be used as a field name;


CREATE TABLE Tools (   tID              int not null auto_increment,   tname            varchar,   num              int,   unit             varchar (8),   purpose          varchar (n),   primary key (TID)), CREATE TABLE Rprecords (   rrid             int Not NULL auto_increment,   rtid             int,   equipmentid      int,   rpren            varchar,   rpcontent        varchar,   rpdate           date,   wuliao           varchar,   primary KEY (Rrid));



CREATE TABLE Checkrecords (   crid             int not null auto_increment,   equipmentid      int,   checkdate        Date,   checkren         varchar,   checkcontent varchar (+     ),   checktype        varchar   , Primary KEY (Crid)); ALTER TABLE equipment ADD Statusid int;



Add a Device status column for the device table;


Database resource Download

Http://pan.baidu.com/s/1skFeGVj


Creating a database of device management information systems with MySQL (diagram)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.