Home » Developer & Programmer » Designer » design country,province,city, address tables in database
design country,province,city, address tables in database [message #668470] Mon, 26 February 2018 23:05 Go to previous message
fabi88
Messages: 112
Registered: November 2011
Senior Member
Hi,

What is the best data model design for saving Addresses in a database, one design is as follows:

1- Table Countries
2- Table Provinces (fk to countries)
3- Table cities (fk to Provinces)
4- Table Addresses (fk to cities), Main street column
5- Table Costumer
6- Table CostumerAddresses (fk to Costumer and fk to Addresses )

But the problem of this design is that addresses of some costumers have not city and just country is specified, or for one customer city is specified but province and country is not specified and ...

what is the best design for this issue?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: generate problem
Next Topic: position of windows and help menu items in mmb
Goto Forum:
  


Current Time: Mon Sep 21 08:57:16 CDT 2020