Hi,
i want to use or external database for my rails app. The connention to
the external database(no-rais-app) works fine, but how must i define the
relationship between this tabels (if possibly no change in the table
scructure)
The external database-scheme:
CREATE TABLE bestemmingen
(
bestemming_id
char(3) NOT NULL default ‘’,
naam
varchar(50) default NULL,
naam_en
varchar(50) default NULL,
landcode
char(2) default NULL,
airport_name
varchar(100) default NULL,
alt_naam
varchar(50) default NULL,
dist_ams
decimal(6,1) default NULL,
stad_zoeknaam
varchar(50) NOT NULL default ‘’,
PRIMARY KEY (bestemming_id
),
KEY land_id
(landcode
),
KEY stad_zoeknaam
(stad_zoeknaam
)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=‘Bestemming iatacode en
iso bestand’;
CREATE TABLE landen
(
landcode
char(2) NOT NULL default ‘’,
naam
varchar(50) NOT NULL,
naam_en
varchar(50) NOT NULL,
alt_naam
varchar(200) NOT NULL,
landafk
char(3) default NULL,
land_zoeknaam
varchar(100) NOT NULL default ‘’,
PRIMARY KEY (landcode
),
KEY land_zoeknaam
(land_zoeknaam
)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT=‘Landen opzoek tabel’;
Grtz…remco