Normalization Question

Results 1 to 4 of 4

Thread: Normalization Question

  1. #1
    Jason Guest

    Default Normalization Question

    I have a country table that contains all the countries in the world. I also have an office table that contains the city names of the offices for a country. I created another table called country_office that contains all the offices for a given country. <BR><BR>My questions is... Do I need this third table (country_office)?<BR>Obviously it would be easier to include the countryid in the offices table so I know what country each office belongs to. What are the pros and cons of doing this? Is this considered normalized if I omit the country_office table?<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969

    Default Hmmm...

    Can the office exist in more than one country? <BR>Can there be more than one office in a city?<BR><BR>I would think two tables (country, offices) would suffice.<BR>Doesn&#039;t sound like there is a need to segregate cities...<BR>Put a countryid as a foreign key in the offices table.

  3. #3
    Jason Guest

    Default RE: Hmmm...

    One office to a country. For example, the New York office in the United States. The office names are basically the cities that they reside.

  4. #4
    jamar Guest

    Default RE: Hmmm...

    It doesn&#039;t matter if you have more than one office in a city. That question is not really relevant to the problem/solution here. Without getting into the nature of your buiness and just looking at the facts, the question you need to ask is:<BR>Are there/will there ever be Multiple countries to a single office? If so then the join table is good practice. Otherwise:<BR>If there is only one country per/office...there can be multiple offices per country with this model, then only the fk relationship is required with CountryID in the Office table.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts