bonjour a tous.
je veut crée une base de donnée cohérente mais sous mysql je n'arrive pas.
je crée ma table qui contient des foreign key mais aprés il me les affiche comme des index et il ne les prend plus en conciderartion quand j'ajoute une valeur inexistante ou bien je lui modifie c'est vraiment bizarre.voici un exemplede mes table:
create table chambre(id_ch int(10) not null auto_increment,numero_ch smallint(6) unsigned not null,etage smallint(6) unsigned not null,description_ch text,tarif_extrat decimal(6,6) unsigned,statut_ch enum('v','f'),id_type int(10),hotel varchar(100),primary key (id_ch) ,constraint id_type foreign key(id_type)references type_chambre(id_type) on update cascade,constraint hotel foreign key(hotel)references hotel(hotel) on update cascade);
je vous remercie d'avance et salut.
je veut crée une base de donnée cohérente mais sous mysql je n'arrive pas.
je crée ma table qui contient des foreign key mais aprés il me les affiche comme des index et il ne les prend plus en conciderartion quand j'ajoute une valeur inexistante ou bien je lui modifie c'est vraiment bizarre.voici un exemplede mes table:
create table chambre(id_ch int(10) not null auto_increment,numero_ch smallint(6) unsigned not null,etage smallint(6) unsigned not null,description_ch text,tarif_extrat decimal(6,6) unsigned,statut_ch enum('v','f'),id_type int(10),hotel varchar(100),primary key (id_ch) ,constraint id_type foreign key(id_type)references type_chambre(id_type) on update cascade,constraint hotel foreign key(hotel)references hotel(hotel) on update cascade);
je vous remercie d'avance et salut.