473,324 Members | 2,248 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

basic geographic structure

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
Sep 20 '06 #1
1 2790
I don't know if this is the most efficient solution, but the regions
that don't have sub-regions, could just have 1 sub-region that all
clients reside in. In a way, the 1 sub-region would cover the entire
region.

So a regular case would be like this:
Region:
Sub1:
Client 1, Client 2, Client 3
Sub2:
Client 1, Client 2, Client 3
Sub3:
Client 1, Client 2, Client 3

A case where no sub-regions are necessary:
Region:
Sub1:
Client 1, Client 2, Client......

This was my first thought. I hope it helps.
Ruben wrote:
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
Sep 21 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Frantisek Fuka | last post by:
This thing keeps bugging me. It's probably some basic misunderstanding on my part but I am stumped. Let's say I have two Python files: file.py and file2.py. Their contents is as follows: ...
3
by: Ben | last post by:
Hi everyone, Now I am using Visual Basic.net to write a program but having some headaches. The situation is as follows: I am using ODBC connection to connect one database( non-SQL server) ,...
2
by: Sam-I-Am | last post by:
Hi There I am looking for a website/service that will allow me to test a web application from different geographic locations. Anybody used anything like this before? Thanks, Sam
3
by: Paul Aspinall | last post by:
Hi Does anyone know a Web service for IP address to Geographic location resolution? Thanks P.S. I am in the UK, but I assume any good web service would be worldwide??
2
by: Paul Aspinall | last post by:
Hi Does anyone know a Web service for IP address to Geographic location resolution? Thanks P.S. I am in the UK, but I assume any good web service would be worldwide??
3
by: Jean-Marie Epitalon | last post by:
Hi, given a Windows PC and an ISP subscription, is there a way of developping a dynamic web site implementing a user's forum - easily - quickly and free of charge ? I understand this...
11
by: axlq | last post by:
Does anyone have a favored way of finding the geographic location of a user's IP address, so that a php script can include content relevant to that location? Reverse-lookup of the hostname isn't...
0
by: =?Utf-8?B?bWltbW8=?= | last post by:
Hello, I have a question about linq and new data type of Geographic sqlserver 2008. When the designers try to bring a table that contains this type of data, it gives me an error that contains...
6
by: Narasimha Rao | last post by:
Hi, I have IP Addresses in my DB table. I want to find the geographic location of each IP address. Can anyone help me if there is any API or solution for this. Thanks in advance.
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.