Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
hasanali00
Posting Yak Master
207 Posts |
Posted - 2005-09-01 : 06:55:06
|
| If u try to buy some electronic goods from Amazon.com, and the delivery is to UK, then Amazon will display a message to the customer informing them that the order will not be taken....I need to build the same kind of application. For instance:product_1 cannot be sold to Italyproduct_2 cannot be sold to Italy & SpainMy question is: How should I design the database?My initial ideas is to have a "Restricted_Countries" table with Product_id and _Country_id. After a customer has chosen the delivery address, I will check if the customer's delivery country is present in the Restricted_Country_Table, for each product in the shopping basket. And subsequently, display a messge to the customer.Any more ideas??regards |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2005-09-01 : 07:26:23
|
| Sounds good, the company I work for uses a similar design to prevent billing residents for certain utility services (water, sewer, gas, etc.) where applicable. |
 |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2005-09-01 : 12:24:50
|
| you may wish to cover 2 types of restrictions...blanket "no delivery" between 2 countries and "no delivery for certain products" between 2 countries....both can be achieved with the same table, with 1 record to cover each scenario.product countrya countryb*** USA AFGANISTAN (all products banned for this country)xyz USA UK (Product xyz is say a washing machine, which is not suitable for devliery)This will help minimise having to individually block 100's/1000's of products for each restricted country.Alternative is to reverse the scenario...and create table of 'delivery allowed' combinations. |
 |
|
|
|
|
|