Citation :
CREATE TABLE artistes (
id MEDIUMINT(9) NOT NULL,
nom VARCHAR(100) NOT NULL,
siteweb VARCHAR(100) NOT NULL,
PRIMARY KEY(id)
);
CREATE TABLE cadeaux (
id INTEGER(11) NOT NULL,
id_element INTEGER(11) NOT NULL,
id_order INTEGER(11) NOT NULL,
nature VARCHAR(30) NOT NULL,
info VARCHAR(30) NOT NULL,
id_giver INTEGER(11) NOT NULL,
id_dest INTEGER(11) NOT NULL,
date_first_dl INTEGER(9) NOT NULL,
email_dest VARCHAR(50) NOT NULL,
code VARCHAR(20) NOT NULL,
OK_for_DL TINYINT(4) NOT NULL,
format VARCHAR(4) NOT NULL,
PRIMARY KEY(id)
);
CREATE TABLE cart (
id INTEGER(11) NOT NULL,
id_client INTEGER(11) NOT NULL,
id_track INTEGER(11) NOT NULL,
info VARCHAR(40) NOT NULL,
nature VARCHAR(40) NOT NULL,
infoscomp TEXT NOT NULL,
PRIMARY KEY(id),
INDEX unique_cart(id_client, id_track, nature)
);
|