-- phpMyAdmin SQL Dump -- version 3.3.7deb7 -- http://www.phpmyadmin.net -- -- Host: localhost -- Generation Time: Apr 07, 2016 at 06:20 PM -- Server version: 5.1.73 -- PHP Version: 5.3.3-7+squeeze19 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; -- -------------------------------------------------------- -- -- Table structure for table `2015_categorie` -- CREATE TABLE IF NOT EXISTS `2015_categorie` ( `codice` int(2) NOT NULL AUTO_INCREMENT, `descrizione` varchar(40) DEFAULT NULL, PRIMARY KEY (`codice`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -- Table structure for table `2015_commenti` -- CREATE TABLE IF NOT EXISTS `2015_commenti` ( `codice` int(8) NOT NULL AUTO_INCREMENT, `data` date DEFAULT NULL, `testo` text, `voto` int(1) DEFAULT NULL, `codevento` int(8) DEFAULT NULL, `codiscritto` int(8) DEFAULT NULL, PRIMARY KEY (`codice`), KEY `codevento` (`codevento`), KEY `codiscritto` (`codiscritto`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -- Table structure for table `2015_eventi` -- CREATE TABLE IF NOT EXISTS `2015_eventi` ( `codice` int(8) NOT NULL AUTO_INCREMENT, `titoloevento` varchar(100) DEFAULT NULL, `data` date DEFAULT NULL, `luogo` varchar(40) DEFAULT NULL, `artisti` varchar(100) DEFAULT NULL, `note` text, `codcategoria` int(2) DEFAULT NULL, `provincia` varchar(30) DEFAULT NULL, `codiscritto` int(8) DEFAULT NULL, PRIMARY KEY (`codice`), KEY `codcategoria` (`codcategoria`), KEY `codiscritto` (`codiscritto`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `2015_interessato` -- CREATE TABLE IF NOT EXISTS `2015_interessato` ( `codice` int(8) NOT NULL AUTO_INCREMENT, `codcategoria` int(2) DEFAULT NULL, `codiscritto` int(8) DEFAULT NULL, PRIMARY KEY (`codice`), KEY `codcategoria` (`codcategoria`), KEY `codiscritto` (`codiscritto`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `2015_membri` -- CREATE TABLE IF NOT EXISTS `2015_membri` ( `codice` int(8) NOT NULL AUTO_INCREMENT, `dataregistrazione` date DEFAULT NULL, `nome` varchar(30) DEFAULT NULL, `cognome` varchar(30) DEFAULT NULL, `nickname` varchar(15) DEFAULT NULL, `passwd` varchar(32) DEFAULT NULL, `mail` varchar(30) DEFAULT NULL, `provincia` varchar(30) DEFAULT NULL, `keventi` int(4) DEFAULT NULL, `kcommenti` int(4) DEFAULT NULL, PRIMARY KEY (`codice`), KEY `keventi` (`keventi`), KEY `kcommenti` (`kcommenti`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; -- -- Dumping data for table `2015_membri` -- -- -- Constraints for table `2015_commenti` -- ALTER TABLE `2015_commenti` ADD CONSTRAINT `2015_commenti_ibfk_2` FOREIGN KEY (`codiscritto`) REFERENCES `2015_membri` (`codice`), ADD CONSTRAINT `2015_commenti_ibfk_1` FOREIGN KEY (`codevento`) REFERENCES `2015_eventi` (`codice`); -- -- Constraints for table `2015_eventi` -- ALTER TABLE `2015_eventi` ADD CONSTRAINT `2015_eventi_ibfk_2` FOREIGN KEY (`codiscritto`) REFERENCES `2015_membri` (`codice`), ADD CONSTRAINT `2015_eventi_ibfk_1` FOREIGN KEY (`codcategoria`) REFERENCES `2015_categorie` (`codice`); -- -- Constraints for table `2015_interessato` -- ALTER TABLE `2015_interessato` ADD CONSTRAINT `2015_interessato_ibfk_1` FOREIGN KEY (`codcategoria`) REFERENCES `2015_categorie` (`codice`), ADD CONSTRAINT `2015_interessato_ibfk_2` FOREIGN KEY (`codiscritto`) REFERENCES `2015_membri` (`codice`); -- -- Constraints for table `2015_membri` -- ALTER TABLE `2015_membri` ADD CONSTRAINT `2015_membri_ibfk_1` FOREIGN KEY (`keventi`) REFERENCES `2015_eventi` (`codice`), ADD CONSTRAINT `2015_membri_ibfk_2` FOREIGN KEY (`kcommenti`) REFERENCES `2015_commenti` (`codice`);