symbulos partners <[EMAIL PROTECTED]> wrote on 03/21/2005 08:08:53 AM:
> Dear friends > > we have a problem here. > > We have 3 tables > > - table language (id int not null auto_increment primarykey, languageName > tinytext) > - table country (id int not null auto_increment primarykey, defaultName > tinytext, defaultLanguage tinytext) > - table countryToLanguage ((languageID int, countryID int) primary key, > countryNameInLanguage tinytext) > > in the table countryToLanguage, the column languageID is a foreign key > referencing language (id) > in the table countryToLanguage, the column countryID is a foreign key > referencing country(id) > in the table country, the column defaultLanguage is a foreign key referencing > language(id) > > In order for the database to be perfectly normalised, we think it the column > defaultName in the table country should be a foreign key referencing back > countryToLanguage ((languageID int, countryID int)). > > What do you think? If you do that then there are lot of problems in updating > the tables. > > > > > -- > symbulos partners > -.- > symbulos - ethical services for your organisation > http://www.symbulos.com > I don't think so. You already have the country's name in it's own language on the countryToLanguage table, don't you? What name in which language is the "defaultName" column supposed to represent? If you can define what the *contents* of that field is supposed to be, then you should be able to decide on which table it should reside. Normalization has a lot to do about reducing duplication. It appears that you have two fields that represent "the name of a country". How many names does each country get to have in your database? What is the best way of storing "the name(s) of a country" that meets YOUR business needs? Answer those questions and you will solve your problem. Shawn Green Database Administrator Unimin Corporation - Spruce Pine