1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
| # Les genres des livres (Sciences, Sports,..)
CREATE TABLE IF NOT EXISTS `genre` (
`id` int(1) NOT NULL auto_increment,
`genre` varchar(40) collate utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=6 ;
# La liste des livre suivant le genre ou la categorie choisie
CREATE TABLE IF NOT EXISTS `livres` (
`id_livre` int(5) NOT NULL auto_increment,
`livre` varchar(50) collate utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id_livre`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ;
# Les titres des livres, ca veut dire que le livre est divise en sections
CREATE TABLE IF NOT EXISTS `titres` (
`id_titre` int(10) NOT NULL auto_increment,
`id_livre2` bigint(10) NOT NULL,
`classement` bigint(20) NOT NULL,
`livre` longtext collate utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id_titre`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=15 ;
# La description de chaque section (titres)
CREATE TABLE IF NOT EXISTS `desc` (
`id_des` int(5) NOT NULL auto_increment,
`id_titre2` bigint(5) NOT NULL,
`desc` longtext collate utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id_desc`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=3 ;
# Les chapitres de chaque section (titres)
CREATE TABLE IF NOT EXISTS `chapitres` (
`id_ch` int(20) NOT NULL auto_increment,
`id_titre3` int(10) NOT NULL,
`chapitre` longtext collate utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id_ch`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=22 ; |
Partager