CREATE TABLE repondeurs ( id BIGINT NOT NULL AUTO_INCREMENT, nom VARCHAR NULL, prenom VARCHAR NULL, num_vote BIGINT NULL, PRIMARY KEY(id) ); CREATE TABLE reponses ( num_vote BIGINT NOT NULL AUTO_INCREMENT, vote_num_vote BIGINT NOT NULL, vote_users_id BIGINT NOT NULL, reponse INTEGER UNSIGNED NULL, ordre INTEGER UNSIGNED NULL, PRIMARY KEY(num_vote, vote_num_vote, vote_users_id), INDEX reponses_FKIndex1(vote_num_vote, vote_users_id) ); CREATE TABLE reponses_donnees ( id BIGINT NOT NULL AUTO_INCREMENT, repondeurs_id BIGINT NOT NULL, id_repondeur BIGINT NULL, id_reponse BIGINT NULL, id_vote BIGINT NULL, id_question BIGINT NULL, PRIMARY KEY(id, repondeurs_id), INDEX reponses_donnees_FKIndex1(repondeurs_id) ); CREATE TABLE users ( id BIGINT NOT NULL AUTO_INCREMENT, login VARCHAR NULL, prenom VARCHAR NULL, nom VARCHAR NULL, email VARCHAR NULL, url_site VARCHAR NULL, PRIMARY KEY(id) ); CREATE TABLE vote ( num_vote BIGINT NOT NULL AUTO_INCREMENT, users_id BIGINT NOT NULL, question VARCHAR NULL, reponses_multiples BOOL NULL, noms_voteurs BOOL NULL, date_validite DATE NULL, vote_prive BOOL NULL, mdp VARCHAR NULL, url_vote VARCHAR NULL, PRIMARY KEY(num_vote, users_id), INDEX vote_FKIndex1(users_id) ); CREATE TABLE vote_has_repondeurs ( vote_users_id BIGINT NOT NULL, vote_num_vote BIGINT NOT NULL, repondeurs_id BIGINT NOT NULL, PRIMARY KEY(vote_users_id, vote_num_vote, repondeurs_id), INDEX vote_has_repondeurs_FKIndex1(vote_num_vote, vote_users_id), INDEX vote_has_repondeurs_FKIndex2(repondeurs_id) );