alexj
2003-01-18 12:37:02 UTC
Hi I'm a bit confused when I want to see why the code generation failed.
After reducing my db schema to be very simple I can't have a good
code generation.
For exemple I just made three table like that :
/*************************************************************/
CREATE TABLE personne ( I just add more attributs
the persons table in
airline)
/*************************************************************/
personne_id INT NOT NULL,
nom VARCHAR (60) NOT NULL,
prenom VARCHAR (60) NOT NULL,
date_de_naissance DATE,
adresse VARCHAR (100),
npa INT,
ville VARCHAR (60),
telephone VARCHAR (20),
email VARCHAR (20),
PRIMARY KEY (personne_id)
);
/*************************************************************/
CREATE TABLE groupe (just like the fligths table)
/*************************************************************/
groupe_id INT NOT NULL,
nom VARCHAR (50) NOT NULL,
PRIMARY KEY (groupe_id)
);
/*************************************************************/
CREATE TABLE fait_partie ( and here just like the
reservations table
/*************************************************************/
fait_partie_id INT NOT NULL,
date_inscription DATE NOT NULL,
groupe_id_fk INT NOT NULL,
personne_id_fk INT NOT NULL,
PRIMARY KEY (fait_partie_id, groupe_id_fk,personne_id_fk),
FOREIGN KEY (groupe_id_fk) REFERENCES groupe (groupe_id),
FOREIGN KEY (personne_id_fk)REFERENCES personne (personne_id)
);
insert into personne values (1, 'jaquet','alexandre','01-05-1980','rte des Noisetiers 17',1782,'Belfaux', '0264755353','alexj');
insert into personne values (2, 'jaquet','alexandre','01-05-1980','rte des Noisetiers 17',1782,'Belfaux', '0264755353','alexj');
insert into personne values (3, 'jaquet','alexandre','01-05-1980','rte des Noisetiers 17',1782,'Belfaux', '0264755353','alexj');
Just as simple as the airline sample is. Why the airline work and not my simple db script ?????? I have exactly the
same cardinality between my test and the airline sample. I can't understand....
After reducing my db schema to be very simple I can't have a good
code generation.
For exemple I just made three table like that :
/*************************************************************/
CREATE TABLE personne ( I just add more attributs
the persons table in
airline)
/*************************************************************/
personne_id INT NOT NULL,
nom VARCHAR (60) NOT NULL,
prenom VARCHAR (60) NOT NULL,
date_de_naissance DATE,
adresse VARCHAR (100),
npa INT,
ville VARCHAR (60),
telephone VARCHAR (20),
email VARCHAR (20),
PRIMARY KEY (personne_id)
);
/*************************************************************/
CREATE TABLE groupe (just like the fligths table)
/*************************************************************/
groupe_id INT NOT NULL,
nom VARCHAR (50) NOT NULL,
PRIMARY KEY (groupe_id)
);
/*************************************************************/
CREATE TABLE fait_partie ( and here just like the
reservations table
/*************************************************************/
fait_partie_id INT NOT NULL,
date_inscription DATE NOT NULL,
groupe_id_fk INT NOT NULL,
personne_id_fk INT NOT NULL,
PRIMARY KEY (fait_partie_id, groupe_id_fk,personne_id_fk),
FOREIGN KEY (groupe_id_fk) REFERENCES groupe (groupe_id),
FOREIGN KEY (personne_id_fk)REFERENCES personne (personne_id)
);
insert into personne values (1, 'jaquet','alexandre','01-05-1980','rte des Noisetiers 17',1782,'Belfaux', '0264755353','alexj');
insert into personne values (2, 'jaquet','alexandre','01-05-1980','rte des Noisetiers 17',1782,'Belfaux', '0264755353','alexj');
insert into personne values (3, 'jaquet','alexandre','01-05-1980','rte des Noisetiers 17',1782,'Belfaux', '0264755353','alexj');
Just as simple as the airline sample is. Why the airline work and not my simple db script ?????? I have exactly the
same cardinality between my test and the airline sample. I can't understand....