   id_adherent INTEGER NOT NULL,
   id_jeu INTEGER,
   id_extension INTEGER,
+  PRIMARY KEY(id_emprunt),
   FOREIGN KEY (id_reservation) REFERENCES reservation (id_reservation) ON DELETE CASCADE ON UPDATE CASCADE,
   FOREIGN KEY (id_adherent) REFERENCES adherent (id_adherent) ON DELETE CASCADE ON UPDATE CASCADE,
   FOREIGN KEY (id_jeu) REFERENCES jeu (id_jeu) ON DELETE CASCADE ON UPDATE CASCADE,

USE polytheque;

CREATE TABLE IF NOT EXISTS adherent (
  id_adherent INTEGER NOT NULL PRIMARY KEY,
  nom varchar(30) NOT NULL,
  prenom varchar(30) NOT NULL,
  date_naissance DATE NOT NULL,

  nb_retards INTEGER NOT NULL,
  nb_non_recup INTEGER NOT NULL,
  UNIQUE (pseudo),
  UNIQUE (mdp),
  PRIMARY KEY(id_adherent)
) ENGINE=InnoDB CHARSET=utf8;

CREATE TABLE IF NOT EXISTS categorie (
  id_categorie INTEGER NOT NULL AUTO_INCREMENT,
  nom_categorie varchar(30) NOT NULL,
  PRIMARY KEY(id_categorie)
) ENGINE=InnoDB CHARSET=utf8;

CREATE TABLE IF NOT EXISTS editeur (
  id_editeur INTEGER NOT NULL AUTO_INCREMENT,
  nom_editeur varchar(30) NOT NULL,
  PRIMARY KEY(id_editeur)
) ENGINE=InnoDB CHARSET=utf8;

CREATE TABLE IF NOT EXISTS jeu (
  id_jeu INTEGER NOT NULL AUTO_INCREMENT,
  nom varchar(30) NOT NULL,
  description varchar(300),
  annee_parution char(4),
