fix SQL DDL
Closed this issue · 0 comments
Giraudux commented
(not tested)
create or replace table Clients ( idcl number not null,
nom varchar2(20) not null,
pren varchar2(15) not null,
adr varchar2(30) not null,
tal varchar2(12) not null,
primary key (idcl) );
create or replace table Livres ( refl varchar2(10) not null,
titre varchar2(20) not null,
auteur varchar2(20) not null,
genre varchar2(15) not null,
primary key (refl) );
create or replace table Achats ( idcl number not null,
refl varchar2(10) not null,
dateachat date not null,
primary key (idcl, refl, dateachat),
foreign key (idcl) references Clients,
foreign key (refl) references Livres );
create or replace table Avis ( idcl number not null,
refl varchar2(10) not null,
note number(4,2) not null,
commentaire varchar2(50),
primary key (idcl, refl),
foreign key (idcl) references Clients,
foreign key (refl) references Livres );