CREATE DATABASE  IF NOT EXISTS `dbtrackboard` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `dbtrackboard`;
--
-- Host: localhost    Database: dbtrackboard
-- ------------------------------------------------------


--
-- Table structure for table `tblgps`
--

CREATE TABLE `tblgps` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `time` time DEFAULT NULL,
  `latitude` float DEFAULT NULL,
  `longitude` float DEFAULT NULL,
  `speed` float DEFAULT NULL,
  `course` float DEFAULT NULL,
  `altitude` float DEFAULT NULL,
  `sessionID` int(11) NOT NULL,
  PRIMARY KEY (`ID`),
  KEY `fk_tblgps_tblsessions_idx` (`sessionID`),
  CONSTRAINT `fk_tblgps_tblsessions` FOREIGN KEY (`sessionID`) REFERENCES `tblsessions` (`sessionID`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `tblgps`
--


--
-- Table structure for table `tblsessions`
--

CREATE TABLE `tblsessions` (
  `sessionID` int(11) NOT NULL AUTO_INCREMENT,
  `date` date DEFAULT NULL,
  `startTime` time DEFAULT NULL,
  `stopTime` time DEFAULT NULL,
  `totalDistance` float DEFAULT NULL,
  PRIMARY KEY (`sessionID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `tblsessions`
--


--
-- Table structure for table `tblusers`
--

CREATE TABLE `tblusers` (
  `userID` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL,
  `email` varchar(50) NOT NULL,
  `password` varchar(50) NOT NULL,
  PRIMARY KEY (`userID`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `tblusers`
--

INSERT INTO `tblusers` VALUES (1,'gaetanvdb','gaetan.van.den.berge@student.howest.be','password');


