-- -- Table structure for table `exa_departments` -- CREATE TABLE IF NOT EXISTS `exa_departments` ( `dep_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Dept. Id', `dep_name` varchar(50) NOT NULL COMMENT 'Dept. Name', `description` varchar(100) DEFAULT NULL COMMENT 'Dept. Desc.', PRIMARY KEY (`dep_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Departments' AUTO_INCREMENT=200 ; -- -------------------------------------------------------- -- -- Table structure for table `exa_employees` -- CREATE TABLE IF NOT EXISTS `exa_employees` ( `emp_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Emp Id', `first_name` varchar(50) NOT NULL COMMENT 'First Name', `last_name` varchar(50) NOT NULL COMMENT 'Last Name', `dep_id` int(11) DEFAULT NULL COMMENT 'Department', `join_dt` date DEFAULT NULL COMMENT 'Join Date', PRIMARY KEY (`emp_id`), KEY `dep_id` (`dep_id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Employees' AUTO_INCREMENT=601 ; -- -- Constraints for table `exa_employees` -- ALTER TABLE `exa_employees` ADD CONSTRAINT `exa_employees_ibfk_1` FOREIGN KEY (`dep_id`) REFERENCES `exa_departments` (`dep_id`);