basic geographic structure - Mailing list pgsql-general

From Dario Borda
Subject basic geographic structure
Date
Msg-id 20060915182831.60841.qmail@web58402.mail.re3.yahoo.com
Whole thread Raw
Responses Re: basic geographic structure  ("Brandon Aiken" <BAiken@winemantech.com>)
List pgsql-general
Hello

I need help with the data model of a basic geographic structure
Country > State/Region > Sub-Region

Most of the countries have a 3 level, so i want to do this
_________
Country
contry_id
...
_________
Region
region_id
country_id
....
__________
Sub-region
sub_region_id
region_id
_________
Client
client_id
sub_region_id

My Question:

Some countries do no have 3rd level (Sub-region) what is the best way to manage this when normaly my Client table needs to be linked to the 3er level data (sub_region_id)

Thank you, any tips will be appreciated

Dario





Stay in the know. Pulse on the new Yahoo.com. Check it out.

pgsql-general by date:

Previous
From: "Leif B. Kristensen"
Date:
Subject: Re: PostgreSQL slammed by PHP creator
Next
From: "Brandon Aiken"
Date:
Subject: Re: basic geographic structure