Project Management: The Application - The SQL (
Page 2 of 4 )
Below is the SQL for each of the tables with sample data included. Just copy and paste it into your MySQL admin client application:
--
-- Table structure for table `files`
--
CREATE TABLE `files` (
`fid` int(4) NOT NULL auto_increment,
`filename` varchar(100) NOT NULL default '',
`p_id` int(4) NOT NULL default '0',
PRIMARY KEY (`fid`)
) TYPE=MyISAM AUTO_INCREMENT=7 ;
--
-- Dumping data for table `files`
--
INSERT INTO `files` VALUES (1, 'projectX.png', 1);
INSERT INTO `files` VALUES (2, 'projectY.png', 2);
INSERT INTO `files` VALUES (3, 'anotherfile.png', 1);
INSERT INTO `files` VALUES (4, 'file.png', 2);
INSERT INTO `files` VALUES (5, 'maintop-satin.jpg', 3);
INSERT INTO `files` VALUES (6, 'Blue hills.jpg', 3);
-- --------------------------------------------------------
--
-- Table structure for table `projects`
--
CREATE TABLE `projects` (
`pid` int(4) NOT NULL auto_increment,
`title` varchar(100) NOT NULL default '',
`project_description` text NOT NULL,
`status` enum('overdue','completed','pending') NOT NULL default 'overdue',
`due_dt` date NOT NULL default '0000-00-00',
`create_dt` date NOT NULL default '0000-00-00',
`u_id` int(4) NOT NULL default '0',
PRIMARY KEY (`pid`)
) TYPE=MyISAM AUTO_INCREMENT=4 ;
--
-- Dumping data for table `projects`
--
INSERT INTO `projects` VALUES (1, 'Project X', 'Secret project6', 'overdue', '2007-03-22', '2007-02-16', 1);
INSERT INTO `projects` VALUES (2, 'Project Y', 'Secret project Y', 'completed', '2007-02-18', '2007-02-18', 2);
INSERT INTO `projects` VALUES (3, 'New1', 'gufgjkk', 'pending', '2007-05-25', '2007-02-19', 1);
-- --------------------------------------------------------
--
-- Table structure for table `staff`
--
CREATE TABLE `staff` (
`sid` int(4) NOT NULL auto_increment,
`p_id` int(4) NOT NULL default '0',
`name` varchar(100) NOT NULL default '',
PRIMARY KEY (`sid`)
) TYPE=MyISAM AUTO_INCREMENT=6 ;
--
-- Dumping data for table `staff`
--
INSERT INTO `staff` VALUES (1, 1, 'Jack Dee');
INSERT INTO `staff` VALUES (2, 2, 'maria.garises');
INSERT INTO `staff` VALUES (3, 1, 'nico.brand');
INSERT INTO `staff` VALUES (4, 2, 'john.doe');
INSERT INTO `staff` VALUES (5, 3, 'john dean');
-- --------------------------------------------------------
--
-- Table structure for table `tasks`
--
CREATE TABLE `tasks` (
`tid` int(4) NOT NULL auto_increment,
`p_id` int(4) NOT NULL default '0',
`task_description` text NOT NULL,
`complete_by` date NOT NULL default '0000-00-00',
PRIMARY KEY (`tid`)
) TYPE=MyISAM AUTO_INCREMENT=3 ;
--
-- Dumping data for table `tasks`
--
INSERT INTO `tasks` VALUES (1, 1, 'some secret stuff, hush hush', '0000-00-00');
INSERT INTO `tasks` VALUES (2, 2, 'hush, hush ', '0000-00-00');