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


--
-- Table structure for table `Book`
--

CREATE TABLE `Book` (
  `ISBN13` char(13) NOT NULL,
  `Title` varchar(45) NOT NULL,
  `Author` varchar(45) NOT NULL,
  `Publisher` varchar(45) DEFAULT NULL,
  `ReleaseDate` date DEFAULT NULL,
  `Synopsis` varchar(2000) DEFAULT NULL,
  `Type` tinyint(1) DEFAULT NULL,
  `BorrowedAmount` int(3) DEFAULT NULL,
  `PlaceID` int(2) NOT NULL,
  `ImageID` char(3) DEFAULT NULL,
  UNIQUE KEY `Book_ISBN13_uindex` (`ISBN13`),
  KEY `Book_Place_PlaceID_fk` (`PlaceID`),
  CONSTRAINT `Book_Place_PlaceID_fk` FOREIGN KEY (`PlaceID`) REFERENCES `Place` (`PlaceID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `Book`
--

INSERT INTO `Book` VALUES ('9780747532743','Harry Potter and the Philosopher\'s Stone','J.K. Rowling','Bloomsbury Publishing','1997-06-30','Harry Potter thinks he is an ordinary boy - until he is rescued by an owl, taken to Hogwarts School of Witchcraft and Wizardry, learns to play Quidditch and does battle in a deadly duel. The Reason ... HARRY POTTER IS A WIZARD!',0,4,0,'000'),('9780747538486','Harry Potter and the Chamber of Secrets','J.K. Rowling','Bloomsbury Publishing','1999-05-28','Harry Potter is a wizard. He is in his second year at Hogwarts School of Witchcraft and Wizardry. Little does he know that this year will be just as eventful as the last...',0,1,1,'001'),('9780747546290','Harry Potter and the Prisoner of Azkaban','J.K. Rowling','Bloomsbury Publishing','1999-08-01','Harry Potter, along with his best friends, Ron and Hermione, is about to start his third year at Hogwarts School of Witchcraft and Wizardry. Harry can\'t wait to get back to school after the summer holidays. (Who wouldn\'t if they lived with the horrible Dursleys?) But when Harry gets to Hogwarts, the atmosphere is tense. There\'s an escaped mass murderer on the loose, and the sinister prison guards of Azkaban have been called in to guard the school... Harry Potter aan zijn derde jaar op Zweinstein kan beginnen, moet hij de zomervakantie bij zijn gemene oom en tante doorbrengen. Door een magisch ongeluk komt hij ‘s avonds laat op straat te staan. Dan blijkt dat Sirius Zwarts, een beruchte volgeling van Jeweetwel, uit de gevangenis van Azkaban is ontsnapt. Hij is op de vlucht en heeft het wellicht op Harry gemunt. Er volgt een enerverend schooljaar met nieuwe vakken als Dreuzelkunde en Zorg voor Fabeldieren, spannende Zwerkbalwedstrijden en griezelige voorspellingen. De school wordt bewaakt door Dementors, de gevreesde bewakers van Azkaban, en Harry zal zijn lessen Verweer tegen de Zwarte Kunsten hard nodig hebben.',0,6,2,'002'),('9780747550990','Harry Potter and the Goblet of Fire','J.K. Rowling','Bloomsbury Publishing','2000-08-06','It is the summer holidays and soon Harry Potter will be starting his fourth year at Hogwarts School of Witchcraft and Wizardry. Harry is counting the days: there are new spells to be learnt, more Quidditch to be played, and Hogwarts castle to continue exploring. But Harry needs to be careful - there are unexpected dangers lurking ...',0,4,3,'003'),('9780747561071','Harry Potter and the Order of the Phoenix','J.K. Rowling','Bloomsbury Publishing','2004-07-10','Harry Potter is due to start his fifth year at Hogwarts School of Witchcraft and Wizardry. His best friends Ron and Hermione have been very secretive all summer and he is desperate to get back to school and find out what has been going on. However, what Harry discovers is far more devastating than he could ever have expected...',0,1,4,'004'),('9780747584681','Harry Potter and the Half-Blood Prince','J.K. Rowling','Bloomsbury Publishing','2006-06-23','It is Harry Potter\'s sixth year at Hogwarts School of Witchcraft and Wizardry. As Voldemort\'s sinister forces amass and a spirit of gloom and fear sweeps the land, it becomes more and more clear to Harry that he will soon have to confront his destiny. But is he up to the challenges ahead of him?',0,5,5,'005'),('9780747595830','Harry Potter and the Deathly Hallows','J.K. Rowling','Bloomsbury Publishing','2007-07-21','Harry Potter is preparing to leave the Dursleys and Privet Drive for the last time. But the future that awaits him is full of danger, not only for him, but for anyone close to him - and Harry has already lost so much. Only by destroying Voldemort\'s remaining Horcruxes can Harry free himself and overcome the Dark Lord\'s forces of evil. \r\n\r\nIn this dramatic conclusion to the Harry Potter series, Harry must leave his most loyal friends behind, and in a final perilous journey find the strength and the will to face his terrifying destiny: a deadly confrontation that is his alone to fight.',0,5,6,'006'),('9780751565355','Harry Potter and the Cursed Child','J.K. Rowling','Little, Brown UK','2016-07-31','The Eighth Story. Nineteen Years Later.',1,0,7,'007');

--
-- Table structure for table `Bookshelf`
--

CREATE TABLE `Bookshelf` (
  `ShelfID` int(2) NOT NULL AUTO_INCREMENT,
  `PlacesAmount` int(2) NOT NULL,
  PRIMARY KEY (`ShelfID`),
  UNIQUE KEY `Bookshelf_ShelfID_uindex` (`ShelfID`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `Bookshelf`
--

INSERT INTO `Bookshelf` VALUES (1,8);

--
-- Table structure for table `Contact`
--

CREATE TABLE `Contact` (
  `Name` varchar(20) DEFAULT NULL,
  `Email` varchar(45) DEFAULT NULL,
  `Message` varchar(1000) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `Contact`
--

INSERT INTO `Contact` VALUES ('test','test@test.test','test'),('test','test@test.test','test'),('test','test@test.test','test'),('test','test@test.test','test'),('test','test@test.test','test'),('test','test@test.test','test'),('test','test@test.test','test'),('test','test@test.test','test'),('test','test@test.test','test'),('test','test@test.test','test'),('test','test@test.test','test');

--
-- Table structure for table `Place`
--

CREATE TABLE `Place` (
  `PlaceID` int(2) NOT NULL AUTO_INCREMENT,
  `Book` char(13) DEFAULT NULL,
  PRIMARY KEY (`PlaceID`),
  UNIQUE KEY `Place_PlaceID_uindex` (`PlaceID`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `Place`
--

INSERT INTO `Place` VALUES (0,'9780747532743'),(1,'9780747550990'),(2,'null'),(3,'9780747538486'),(4,'9780747561071'),(5,'9780747584681'),(6,'9780747595830'),(7,'9780751565355');

--
-- Dumping events for database 'P1_Database'
--

--
-- Dumping routines for database 'P1_Database'
--


