Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Oct 19th, 2012  |  syntax: None  |  size: 10.54 KB  |  views: 47  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. /*
  2. SQLyog Community v10.3
  3. MySQL - 5.5.27 : Database - aquaticstar
  4. *********************************************************************
  5. */
  6.  
  7.  
  8. /*!40101 SET NAMES utf8 */;
  9.  
  10. /*!40101 SET SQL_MODE=''*/;
  11.  
  12. /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  13. /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  14. /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  15. /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  16. CREATE DATABASE /*!32312 IF NOT EXISTS*/`aquaticstar` /*!40100 DEFAULT CHARACTER SET latin1 */;
  17.  
  18. USE `aquaticstar`;
  19.  
  20. /*Table structure for table `attendance` */
  21.  
  22. DROP TABLE IF EXISTS `attendance`;
  23.  
  24. CREATE TABLE `attendance` (
  25.   `link_id` int(10) NOT NULL,
  26.   `attendance` varchar(10) DEFAULT '1',
  27.   KEY `link_id` (`link_id`),
  28.   CONSTRAINT `attendance_ibfk_1` FOREIGN KEY (`link_id`) REFERENCES `link` (`link_id`)
  29. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  30.  
  31. /*Data for the table `attendance` */
  32.  
  33. insert  into `attendance`(`link_id`,`attendance`) values (1,'1'),(2,'1'),(3,'1'),(4,'1'),(5,'0');
  34.  
  35. /*Table structure for table `exstudents` */
  36.  
  37. DROP TABLE IF EXISTS `exstudents`;
  38.  
  39. CREATE TABLE `exstudents` (
  40.   `x_id` int(10) NOT NULL AUTO_INCREMENT,
  41.   `name` varchar(45) NOT NULL,
  42.   `gender` char(1) NOT NULL,
  43.   `mno` varchar(10) DEFAULT NULL,
  44.   `contact_name` varchar(45) NOT NULL,
  45.   `contact_phone` varchar(10) NOT NULL,
  46.   `contact_email` varchar(45) NOT NULL,
  47.   `birthday` date NOT NULL,
  48.   `startDate` date NOT NULL,
  49.   `endDate` date DEFAULT NULL,
  50.   PRIMARY KEY (`x_id`)
  51. ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
  52.  
  53. /*Data for the table `exstudents` */
  54.  
  55. insert  into `exstudents`(`x_id`,`name`,`gender`,`mno`,`contact_name`,`contact_phone`,`contact_email`,`birthday`,`startDate`,`endDate`) values (4,'Salo','f','nm','Mamma','0199919999','salo@gg.com','1992-02-02','2012-09-09','2012-10-16'),(5,'Joey Oway','m','nm','Oppa Ohh','0192228777','myoho7@hotmail.com','1991-02-07','2012-01-07','2012-10-17'),(6,'MOOLA','m','123908','Moolala','0199111881','moola@gmail.com','2000-02-02','2012-02-02','2012-10-17');
  56.  
  57. /*Table structure for table `feedback` */
  58.  
  59. DROP TABLE IF EXISTS `feedback`;
  60.  
  61. CREATE TABLE `feedback` (
  62.   `f_id` int(10) NOT NULL AUTO_INCREMENT,
  63.   `ft` varchar(11) DEFAULT NULL,
  64.   `name` varchar(45) DEFAULT NULL,
  65.   `email` varchar(45) DEFAULT NULL,
  66.   `privacy` varchar(10) DEFAULT NULL,
  67.   `message` varchar(600) DEFAULT NULL,
  68.   PRIMARY KEY (`f_id`)
  69. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  70.  
  71. /*Data for the table `feedback` */
  72.  
  73. /*Table structure for table `levels` */
  74.  
  75. DROP TABLE IF EXISTS `levels`;
  76.  
  77. CREATE TABLE `levels` (
  78.   `level_id` int(11) NOT NULL AUTO_INCREMENT,
  79.   `level` varchar(50) NOT NULL,
  80.   PRIMARY KEY (`level_id`)
  81. ) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=latin1;
  82.  
  83. /*Data for the table `levels` */
  84.  
  85. insert  into `levels`(`level_id`,`level`) values (1,'Advance Water Foundation'),(2,'Advance Water Foundation Transition to Front Crawl'),(3,'Back Stroke Correction & Breast Stroke\r\n'),(4,'BackStroke\r\n'),(5,'Backstroke(Advance)\r\n'),(6,'Backstroke(Elementary)'),(7,'Backstroke(Intermediate)'),(8,'Backstroke(Stroke Correction)\r\n'),(9,'Basic Water Foundation'),(10,'Breast Stroke Stroke Correction & Butterfly'),(11,'Breast Stroke(Advance)\r\n'),(12,'Breast Stroke(Elementary)'),(13,'Breast Stroke(Intermediate)'),(14,'Breast Stroke(Stroke Correction)'),(15,'Butterfly'),(16,'Butterfly(Advance)'),(17,'Butterfly(Elementary)'),(18,'Butterfly(Intermediate)'),(19,'Butterfly(Stroke Correction)\r\n'),(20,'Front Crawl Stroke Correction & Back Stroke\r\n'),(21,'Front Crawl(Advance)\r\n'),(22,'Front Crawl(Elementary)\r\n'),(23,'Front Crawl(Intermediate)\r\n'),(24,'Front Crawl(Stroke Correction)\r\n'),(25,'Mix- BackStroke & Breast Stroke\r\n'),(26,'Mix- Backstroke & Butterfly\r\n'),(27,'Mix- Breast Stroke & Butterfly\r\n'),(28,'Mix- Front Crawl & Back Stroke\r\n'),(29,'Mix- Front Crawl & Butterfly\r\n'),(30,'Mix- Front Crawl Breast Stroke\r\n'),(31,'Pre-competition\r\n'),(32,'Competition\r\n');
  86.  
  87. /*Table structure for table `link` */
  88.  
  89. DROP TABLE IF EXISTS `link`;
  90.  
  91. CREATE TABLE `link` (
  92.   `link_id` int(10) NOT NULL AUTO_INCREMENT,
  93.   `id` int(10) NOT NULL,
  94.   `slot_id` int(10) NOT NULL,
  95.   PRIMARY KEY (`link_id`),
  96.   KEY `id` (`id`),
  97.   KEY `slot_id` (`slot_id`),
  98.   CONSTRAINT `link_ibfk_1` FOREIGN KEY (`id`) REFERENCES `students` (`id`),
  99.   CONSTRAINT `link_ibfk_2` FOREIGN KEY (`slot_id`) REFERENCES `schedule` (`slot_id`)
  100. ) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1;
  101.  
  102. /*Data for the table `link` */
  103.  
  104. insert  into `link`(`link_id`,`id`,`slot_id`) values (1,1,1),(2,2,2),(3,3,3),(4,4,4),(5,5,5),(6,6,1),(7,7,1),(8,9,1),(9,9,2),(10,10,8),(11,11,9),(12,12,12),(13,13,13);
  105.  
  106. /*Table structure for table `schedule` */
  107.  
  108. DROP TABLE IF EXISTS `schedule`;
  109.  
  110. CREATE TABLE `schedule` (
  111.   `slot_id` int(10) NOT NULL AUTO_INCREMENT,
  112.   `day` varchar(10) NOT NULL,
  113.   `time` int(2) NOT NULL,
  114.   `ampm` varchar(2) DEFAULT NULL,
  115.   `branch` varchar(45) NOT NULL,
  116.   `level` varchar(50) NOT NULL,
  117.   `ae` varchar(45) NOT NULL,
  118.   `comments` varchar(100) DEFAULT NULL,
  119.   PRIMARY KEY (`slot_id`)
  120. ) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=latin1;
  121.  
  122. /*Data for the table `schedule` */
  123.  
  124. insert  into `schedule`(`slot_id`,`day`,`time`,`ampm`,`branch`,`level`,`ae`,`comments`) values (1,'Saturday',4,'pm','Sunway','Advance Water Foundation','Aini',NULL),(2,'Saturday',5,'pm','Sunway','Advance Water Foundation Transition to Front Crawl','Aini',NULL),(3,'Saturday',6,'pm','Sunway','Advance Water Foundation','Aini','2 very naughty chinese boys.  Like to fight a lot!  keep an eye out for them!'),(4,'Saturday',4,'pm','Sunway','Advance Water Foundation','Marcus',NULL),(5,'Saturday',5,'pm','Sunway','Advance Water Foundation','Marcus',NULL),(6,'Saturday',6,'pm','Sunway','Advance Water Foundation','Marcus',NULL),(8,'Saturday',11,'am','Monterez','Advance Water Foundation Transition to Front Crawl','Nelson',NULL),(9,'Sunday',4,'pm','Monterez','Advance Water Foundation','Nelson',NULL),(10,'Sunday',5,'pm','Monterez','Advance Water Foundation Transition to Front Crawl','Nelson',NULL),(11,'Sunday',6,'pm','Monterez','Advance Water Foundation','Nelson',NULL),(12,'Saturday',4,'pm','KGSAAS','Advance Water Foundation','Yin',NULL),(13,'Saturday',5,'pm','KGSAAS','Advance Water Foundation','Yin',NULL),(33,'Monday',1,'pm','Sunway','Advance Water Foundation Transition to Front Crawl','Aini','WOOOOOOOOOOOO'),(34,'Monday',1,'pm','Sunway','Advance Water Foundation','Nina','TESTANG');
  125.  
  126. /*Table structure for table `staff` */
  127.  
  128. DROP TABLE IF EXISTS `staff`;
  129.  
  130. CREATE TABLE `staff` (
  131.   `username` varchar(30) NOT NULL,
  132.   `password` varchar(50) NOT NULL,
  133.   `name` varchar(45) NOT NULL,
  134.   `email` varchar(45) NOT NULL,
  135.   `phone` varchar(10) NOT NULL,
  136.   `type` varchar(10) NOT NULL DEFAULT 'coach',
  137.   PRIMARY KEY (`username`)
  138. ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  139.  
  140. /*Data for the table `staff` */
  141.  
  142. insert  into `staff`(`username`,`password`,`name`,`email`,`phone`,`type`) values ('ainiBikini','e99a18c428cb38d5f260853678922e03','Aini','aini@gmail.com','0178829003','admin'),('ninaFina','e99a18c428cb38d5f260853678922e03','Nina','ninafina@hotmail.com','0198828277','coach'),('sharkMarc','e99a18c428cb38d5f260853678922e03','Marcus','marcussharkus@aquatic.com','0188822273','coach'),('yinBoss','e99a18c428cb38d5f260853678922e03','Yin','aquaticYin@yahoo.com','0190028887','admin');
  143.  
  144. /*Table structure for table `students` */
  145.  
  146. DROP TABLE IF EXISTS `students`;
  147.  
  148. CREATE TABLE `students` (
  149.   `id` int(10) NOT NULL AUTO_INCREMENT,
  150.   `name` varchar(45) NOT NULL,
  151.   `gender` char(1) NOT NULL,
  152.   `mNo` varchar(10) NOT NULL DEFAULT 'nm',
  153.   `contact_name` varchar(45) NOT NULL,
  154.   `contact_phone` varchar(10) NOT NULL,
  155.   `contact_email` varchar(45) NOT NULL,
  156.   `startDate` date NOT NULL,
  157.   `birthday` date NOT NULL,
  158.   PRIMARY KEY (`id`)
  159. ) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1;
  160.  
  161. /*Data for the table `students` */
  162.  
  163. insert  into `students`(`id`,`name`,`gender`,`mNo`,`contact_name`,`contact_phone`,`contact_email`,`startDate`,`birthday`) values (1,'Sam','m','nm','May Khew','0198277384','maykhew72@yahoo.com','2012-03-05','1991-08-28'),(2,'Joe Biden','m','nm','Ba Obama','0198839209','obamaG@gmail.com','2012-05-15','2001-02-02'),(3,'Lisa Mitchell','f','L02K8','Jane Mitchell','0182938746','janelovesindia@gmail.com','2012-08-20','2002-03-03'),(4,'Bharath Sampath','m','nm','Swathi Sampath','0178829333','sampathguy@gmail.com','2012-08-29','1999-11-11'),(5,'Ewe Seong','m','HJ887D','Ke Jia Yeoh','0139928827','ewey@hotmail.com','2012-09-10','1998-11-12'),(6,'Maula Sharfan','m','nm','Pappa Sharfan','0128399000','papashar@gmail.com','2012-05-28','1999-12-11'),(7,'Fizree Rashid','m','KL8882','Mhmd Rashid','0109922200','rashid@rashid.com','2012-04-30','2000-01-01'),(8,'Ivan Ho','m','JS01K3','Daniel Ho','0129930298','danielH@hindustry.com','2011-09-20','2000-01-02'),(9,'Bobby DPorter','f','nm','Andy DPorter','0190029990','bobbyd@super.com','2012-05-01','1989-09-01'),(10,'Andy Dong','m','nm','Pappa Andy','0019288909','andy@mamama.com','2011-06-29','1998-02-19'),(11,'Robbin Williams','m','KK819L','Mr Williams','0182772878','willi@makeit.com','2012-10-01','1989-02-16'),(12,'Bruce Lee','m','nm','Lee','0192252266','bruce@kungfu.com','2012-08-21','1989-12-12'),(13,'Ace Ventura','m','nm','Mr Ventura','0108288399','ace@acehardware.com','2012-10-02','1999-07-07');
  164.  
  165. /*Table structure for table `waitinglist` */
  166.  
  167. DROP TABLE IF EXISTS `waitinglist`;
  168.  
  169. CREATE TABLE `waitinglist` (
  170.   `w_id` int(10) NOT NULL AUTO_INCREMENT,
  171.   `name` varchar(45) NOT NULL,
  172.   `gender` varchar(1) NOT NULL,
  173.   `level` varchar(10) DEFAULT NULL,
  174.   `contact_name` varchar(45) NOT NULL,
  175.   `contact_phone` varchar(10) NOT NULL,
  176.   `contact_email` varchar(45) NOT NULL,
  177.   `status` varchar(20) DEFAULT NULL,
  178.   PRIMARY KEY (`w_id`)
  179. ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
  180.  
  181. /*Data for the table `waitinglist` */
  182.  
  183. insert  into `waitinglist`(`w_id`,`name`,`gender`,`level`,`contact_name`,`contact_phone`,`contact_email`,`status`) values (1,'Bobby D','f','basic','Joe D','0190029000','superB@supercamp.com',NULL),(2,'Andy Chong','m','free','Marcus Chong','0109928390','chongy@hotmail.com',NULL),(3,'May Cheong','f','back','Michelle Cheong','0128839990','cheongcheong@gmail.com',NULL),(5,'Rahul Sivam','m','basic','Indra Sivam','0178822993','indra@indera.com',NULL),(6,'Lim CH','m','comp','Ch Boss','0109299888','boss@ch.com','unc');
  184.  
  185. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  186. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  187. /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  188. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
clone this paste RAW Paste Data