-- Sample database for PHP, Perl, and Python MySQL example scripts 
--
-- Import into MySQL using MySQL console similar to the following:
--
-- % mysql -p -u root <inventory.sql
--
-- Note: User "webuser" with password "password99" will be created
-- with all rights to this DB.
--

CREATE DATABASE /*!32312 IF NOT EXISTS*/ mysqlsamp;

USE mysqlsamp;

--
-- Table structure for table 'computers'
--

CREATE TABLE computers (
  comp_id int(5) unsigned zerofill NOT NULL default '00000',
  comp_make varchar(25) default NULL,
  comp_model varchar(10) default NULL,
  comp_cpu char(2) NOT NULL default '',
  comp_speed int(4) NOT NULL default '0',
  comp_mem int(4) NOT NULL default '0',
  comp_HD int(4) NOT NULL default '0',
  comp_CD enum('CD','DVD','CDRW','CDR','CDRW/DVD') default NULL,
  comp_location varchar(10) default NULL,
  comp_ts timestamp(10) NOT NULL,
  PRIMARY KEY  (comp_id)
) TYPE=MyISAM;

--
-- Dumping data for table 'computers'
--

INSERT INTO computers VALUES (02210,'Compumate','A','P3',1600,512,40,'DVD','C124','0000000000');
INSERT INTO computers VALUES (01347,'Compumate','A','P3',1600,512,40,'DVD','C033','0000000000');
INSERT INTO computers VALUES (06073,'Compumate','A','P3',1600,512,40,'DVD','C224','0000000000');
INSERT INTO computers VALUES (09307,'Compumate','A','P3',1600,512,40,'DVD','C224','0000000000');
INSERT INTO computers VALUES (01523,'Compumate','A','P3',1600,512,40,'DVD','A125','0000000000');
INSERT INTO computers VALUES (07065,'Compumate','B','P3',1000,256,30,'CD','A003','0000000000');
INSERT INTO computers VALUES (07185,'Compumate','B','P3',1400,256,30,'CD','A122','0000000000');
INSERT INTO computers VALUES (09894,'Compumate','C','P3',1000,128,30,'CD','B022','0000000000');
INSERT INTO computers VALUES (09569,'Compumate','C','P3',1000,128,30,'CD','B022','0000000000');
INSERT INTO computers VALUES (08036,'Compumate','A','P3',1600,512,40,'DVD','C250','0000000000');
INSERT INTO computers VALUES (08057,'Compumate','B','P3',1400,256,30,'DVD','A021','0000000000');
INSERT INTO computers VALUES (05654,'Custom','3','C',500,128,30,'CD','A122','0000000000');
INSERT INTO computers VALUES (09834,'Custom','1','P3',900,512,60,'CD','C200','0000000000');
INSERT INTO computers VALUES (07743,'Custom','1','P3',866,384,60,'CDRW','C200','0000000000');
INSERT INTO computers VALUES (02559,'Custom','3','P3',733,256,60,'CDRW','A010','0000000000');
INSERT INTO computers VALUES (08316,'Custom','3','P3',733,256,60,'CDRW','B125','0000000000');
INSERT INTO computers VALUES (09499,'Custom','1','P3',866,512,60,'CDR','B126','0000000000');
INSERT INTO computers VALUES (00946,'Super-puter','XL','P4',2400,1000,180,'CDRW/DVD','LAB05','0000000000');
INSERT INTO computers VALUES (04070,'Super-puter','XL','P4',2400,1000,180,'CDRW/DVD','LAB06','0000000000');
INSERT INTO computers VALUES (09144,'Super-puter','XL','P4',2400,1000,180,'CDRW/DVD','LAB07','0000000000');
INSERT INTO computers VALUES (05212,'Super-puter','SE','P4',2000,512,80,'CDRW/DVD','A300','0000000000');
INSERT INTO computers VALUES (03663,'Super-puter','SE','P4',2000,512,80,'CDRW','A310','0000000000');
INSERT INTO computers VALUES (05295,'Super-puter','XL','P4',2400,1000,180,'CDRW/DVD','ITLAB','0000000000');
INSERT INTO computers VALUES (04780,'Super-puter','XS','P4',2400,1000,180,'CDRW','LAB01','0000000000');
INSERT INTO computers VALUES (05021,'Custom','3','P3',1000,512,0,'CD','ITLAB','0000000000');

--
-- Table structure for table 'keyboards'
--

CREATE TABLE keyboards (
  kbd_id int(5) unsigned zerofill NOT NULL default '00000',
  kbd_type char(3) NOT NULL default 'PS2',
  kbd_model varchar(5) NOT NULL default '104',
  kbd_comp int(5) unsigned zerofill NOT NULL default '00000',
  kbd_ts timestamp(10) NOT NULL,
  PRIMARY KEY  (kbd_id)
) TYPE=MyISAM;

--
-- Dumping data for table 'keyboards'
--

INSERT INTO keyboards VALUES (00684,'USB','102',02210,'0000000000');
INSERT INTO keyboards VALUES (00245,'PS2','102',01347,'0000000000');
INSERT INTO keyboards VALUES (00149,'PS2','104',06073,'0000000000');
INSERT INTO keyboards VALUES (00278,'PS2','102',09307,'0000000000');
INSERT INTO keyboards VALUES (00011,'PS2','102',01523,'0000000000');
INSERT INTO keyboards VALUES (00527,'PS2','102',07065,'0000000000');
INSERT INTO keyboards VALUES (00660,'PS2','102',07185,'0000000000');
INSERT INTO keyboards VALUES (00143,'PS2','102',09894,'0000000000');
INSERT INTO keyboards VALUES (00656,'USB','104MM',09569,'0000000000');
INSERT INTO keyboards VALUES (00854,'PS2','102',08036,'0000000000');
INSERT INTO keyboards VALUES (00007,'PS2','102',08057,'0000000000');
INSERT INTO keyboards VALUES (00643,'PS2','102',05654,'0000000000');
INSERT INTO keyboards VALUES (00129,'USB','102',09834,'0000000000');
INSERT INTO keyboards VALUES (00250,'PS2','102',07743,'0000000000');
INSERT INTO keyboards VALUES (00232,'PS2','102',02559,'0000000000');
INSERT INTO keyboards VALUES (00920,'PS2','104MM',08316,'0000000000');
INSERT INTO keyboards VALUES (00469,'PS2','102',09499,'0000000000');
INSERT INTO keyboards VALUES (00103,'PS2','102',00946,'0000000000');
INSERT INTO keyboards VALUES (00859,'USB','102',04070,'0000000000');
INSERT INTO keyboards VALUES (00976,'PS2','102',09144,'0000000000');
INSERT INTO keyboards VALUES (00500,'PS2','102',05212,'0000000000');
INSERT INTO keyboards VALUES (00598,'PS2','104',03663,'0000000000');
INSERT INTO keyboards VALUES (00967,'USB','104',05295,'0000000000');
INSERT INTO keyboards VALUES (00466,'USB','104',04780,'0000000000');
INSERT INTO keyboards VALUES (00089,'USB','104MM',00000,'0000000000');
INSERT INTO keyboards VALUES (00377,'PS2','102',00000,'0000000000');
INSERT INTO keyboards VALUES (00444,'USB','102',00000,'0000000000');

--
-- Table structure for table 'mice'
--

CREATE TABLE mice (
  mouse_id int(5) unsigned zerofill NOT NULL default '00000',
  mouse_type char(3) NOT NULL default 'PS2',
  mouse_model varchar(5) NOT NULL default '2BS',
  mouse_comp int(5) unsigned zerofill NOT NULL default '00000',
  mouse_ts timestamp(10) NOT NULL,
  PRIMARY KEY  (mouse_id)
) TYPE=MyISAM;

--
-- Dumping data for table 'mice'
--

INSERT INTO mice VALUES (00400,'USB','2B',02210,'0000000000');
INSERT INTO mice VALUES (00543,'PS2','2BS',01347,'0000000000');
INSERT INTO mice VALUES (00345,'PS2','3B',06073,'0000000000');
INSERT INTO mice VALUES (00961,'USB','2BS',09307,'0000000000');
INSERT INTO mice VALUES (00693,'PS2','2BS',01523,'0000000000');
INSERT INTO mice VALUES (00579,'PS2','2BS',07065,'0000000000');
INSERT INTO mice VALUES (00702,'PS2','2BS',07185,'0000000000');
INSERT INTO mice VALUES (00710,'USB','2B',09894,'0000000000');
INSERT INTO mice VALUES (00558,'PS2','2BS',09569,'0000000000');
INSERT INTO mice VALUES (00769,'PS2','2BS',08036,'0000000000');
INSERT INTO mice VALUES (00303,'PS2','3B',08057,'0000000000');
INSERT INTO mice VALUES (00142,'USB','2BS',05654,'0000000000');
INSERT INTO mice VALUES (00536,'PS2','2BS',09834,'0000000000');
INSERT INTO mice VALUES (00411,'PS2','2BS',07743,'0000000000');
INSERT INTO mice VALUES (00984,'PS2','2BS',02559,'0000000000');
INSERT INTO mice VALUES (00356,'USB','3B',08316,'0000000000');
INSERT INTO mice VALUES (00807,'PS2','2BS',09499,'0000000000');
INSERT INTO mice VALUES (00562,'PS2','2BS',00946,'0000000000');
INSERT INTO mice VALUES (00432,'PS2','2BS',04070,'0000000000');
INSERT INTO mice VALUES (00553,'USB','L2BS',09144,'0000000000');
INSERT INTO mice VALUES (00648,'USB','2BS',05212,'0000000000');
INSERT INTO mice VALUES (00067,'USB','2BS',03663,'0000000000');
INSERT INTO mice VALUES (00944,'USB','3B',05295,'0000000000');
INSERT INTO mice VALUES (00670,'PS2','3B',04780,'0000000000');
INSERT INTO mice VALUES (00444,'PS2','2BS',00000,'0000000000');
INSERT INTO mice VALUES (00324,'USB','3B',00000,'0000000000');

--
-- Table structure for table 'mice_type'
--

CREATE TABLE mice_type (
  mouse_type_id int(5) unsigned zerofill NOT NULL auto_increment,
  mouse_interface enum('USB','PS2') default 'PS2',
  mouse_buttons tinyint(2) NOT NULL default '2',
  mouse_scroll enum('Y','N') default 'Y',
  mouse_manufacture varchar(20) NOT NULL default '',
  PRIMARY KEY  (mouse_type_id)
) TYPE=MyISAM;

--
-- Dumping data for table 'mice_type'
--


--
-- Table structure for table 'monitors'
--

CREATE TABLE monitors (
  mon_id int(5) unsigned zerofill NOT NULL default '00000',
  mon_size tinyint(2) NOT NULL default '0',
  mon_features varchar(40) default NULL,
  mon_comp int(5) unsigned zerofill NOT NULL default '00000',
  mon_ts timestamp(10) NOT NULL,
  PRIMARY KEY  (mon_id)
) TYPE=MyISAM;

--
-- Dumping data for table 'monitors'
--

INSERT INTO monitors VALUES (00461,17,'',02210,'0000000000');
INSERT INTO monitors VALUES (00436,17,'',01347,'0000000000');
INSERT INTO monitors VALUES (00499,15,'',06073,'0000000000');
INSERT INTO monitors VALUES (00656,17,'LCD',09307,'0000000000');
INSERT INTO monitors VALUES (00236,20,'DUAL',01523,'0000000000');
INSERT INTO monitors VALUES (00428,17,'',07065,'0000000000');
INSERT INTO monitors VALUES (00007,20,'',07185,'0000000000');
INSERT INTO monitors VALUES (00603,15,'',09894,'0000000000');
INSERT INTO monitors VALUES (00184,20,'',09569,'0000000000');
INSERT INTO monitors VALUES (00239,21,'',08036,'0000000000');
INSERT INTO monitors VALUES (00255,17,'',08057,'0000000000');
INSERT INTO monitors VALUES (00851,15,'LCD',05654,'0000000000');
INSERT INTO monitors VALUES (00417,20,'DUAL',09834,'0000000000');
INSERT INTO monitors VALUES (00887,17,'',07743,'0000000000');
INSERT INTO monitors VALUES (00578,17,'',02559,'0000000000');
INSERT INTO monitors VALUES (00355,15,'',08316,'0000000000');
INSERT INTO monitors VALUES (00214,17,'',09499,'0000000000');
INSERT INTO monitors VALUES (00795,20,'',00946,'0000000000');
INSERT INTO monitors VALUES (00448,21,'',04070,'0000000000');
INSERT INTO monitors VALUES (00058,20,'DUAL',09144,'0000000000');
INSERT INTO monitors VALUES (00167,22,'',05212,'0000000000');
INSERT INTO monitors VALUES (00741,21,'',03663,'0000000000');
INSERT INTO monitors VALUES (00605,22,'',05295,'0000000000');
INSERT INTO monitors VALUES (00300,19,'LCD',04780,'0000000000');
INSERT INTO monitors VALUES (00450,19,'LCD',00000,'0000000000');

grant all on mysqlsamp.* to webuser@localhost identified by "password99";
flush privileges;
