--
-- Host: localhost    Database: dbjumptie
-- ------------------------------------------------------


--
-- Table structure for table `tblsession`
--

CREATE TABLE `tblsession` (
  `idSession` int(11) NOT NULL AUTO_INCREMENT,
  `idUser` int(11) NOT NULL,
  `idSpeed` int(11) NOT NULL,
  `idSurface` int(11) NOT NULL,
  `start` datetime NOT NULL,
  `stop` datetime NOT NULL,
  `jumpCounter` int(11) NOT NULL,
  PRIMARY KEY (`idSession`,`idUser`,`idSpeed`,`idSurface`),
  UNIQUE KEY `idSession_UNIQUE` (`idSession`),
  KEY `fk_tblsession_tbluser_idx` (`idUser`),
  KEY `fk_tblsession_tblspeed1_idx` (`idSpeed`),
  KEY `fk_tblsession_tblsurface1_idx` (`idSurface`),
  CONSTRAINT `fk_tblsession_tblspeed1` FOREIGN KEY (`idSpeed`) REFERENCES `tblspeed` (`idSpeed`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_tblsession_tblsurface1` FOREIGN KEY (`idSurface`) REFERENCES `tblsurface` (`idSurface`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_tblsession_tbluser` FOREIGN KEY (`idUser`) REFERENCES `tbluser` (`idUser`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `tblsession`
--


--
-- Table structure for table `tblspeed`
--

CREATE TABLE `tblspeed` (
  `idSpeed` int(11) NOT NULL AUTO_INCREMENT,
  `jumpSpeed` varchar(45) NOT NULL,
  `description` varchar(100) NOT NULL,
  PRIMARY KEY (`idSpeed`),
  UNIQUE KEY `idSpeed_UNIQUE` (`idSpeed`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `tblspeed`
--

INSERT INTO `tblspeed` VALUES (1,'Slow','Less than 100 jumps per minute'),(2,'Moderate','Between 100-120 jumps per minute'),(3,'Fast','More than 120 jumps per minute');

--
-- Table structure for table `tblsurface`
--

CREATE TABLE `tblsurface` (
  `idSurface` int(11) NOT NULL AUTO_INCREMENT,
  `surfaceType` varchar(45) NOT NULL,
  `description` varchar(100) NOT NULL,
  PRIMARY KEY (`idSurface`),
  UNIQUE KEY `idSurface_UNIQUE` (`idSurface`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `tblsurface`
--

INSERT INTO `tblsurface` VALUES (1,'Hard','Hard underground e.g. stone floor, brick floor'),(2,'Inflatable','Inflatable undeground, bouncing underground'),(3,'Trampoline','Resilient surface');

--
-- Dumping events for database 'dbjumptie'
--

--
-- Dumping routines for database 'dbjumptie'
--


