Here is the table structure to match the example code above:
Equipment Table:
-- Table structure for table `equipment`
--
CREATE TABLE IF NOT EXISTS `equipment` (
`equipment_number` int(25) NOT NULL,
`equipment_brand` varchar(255) NOT NULL,
`equipment_description` text NOT NULL,
`equipment_calibration_interval` int(6) NOT NULL,
PRIMARY KEY (`equipment_number`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `equipment`
--
INSERT INTO `equipment` (`equipment_number`, `equipment_brand`, `equipment_description`, `equipment_calibration_interval`) VALUES
(1, 'Toro', 'blah blah blah', 30),
(4, 'Craftsman', 'blah blah blah', 90),
(56, 'Ariens', 'blah blah blah', 30),
(12, 'Honda', 'blah blah blah', 180);
Employee Table:
-- Table structure for table `employee`
--
CREATE TABLE IF NOT EXISTS `employee` (
`employee_number` int(25) NOT NULL,
`employee_name` varchar(255) NOT NULL,
`employee_start_date` date NOT NULL,
PRIMARY KEY (`employee_number`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Dumping data for table `employee`
--
INSERT INTO `employee` (`employee_number`, `employee_name`, `employee_start_date`) VALUES
(1, 'Jon Doe', '2016-03-20'),
(7, 'Jane Doe', '2018-01-21'),
(23, 'Jim Doe', '2014-11-19'),
(9, 'Mary Doe', '2017-04-07');
Calibration Schedule Table:
-- Table structure for table `calibration`
--
CREATE TABLE IF NOT EXISTS `calibration` (
`calibration_id` int(25) NOT NULL AUTO_INCREMENT,
`equipment_number` int(25) NOT NULL,
`equipment_brand` varchar(255) NOT NULL,
`equipment_description` text NOT NULL,
`equipment_calibration_interval` int(25) NOT NULL,
`employee_number` int(25) NOT NULL,
`employee_name` varchar(255) NOT NULL,
`calibration_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`next_calibration_date` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`calibration_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ;