Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.
  • software will used in many countries ..each country products differ from others and these products will be available in 2 languages: english, the native language .
  • i start designing a DB for each country have its own pdts in english and its own language .
  • is there better way to keep all data of products, countries, languages in one place but separated from eachothers?? .
  • how can i link all these DBs together and modify them easily?
share|improve this question
    
Hatem, the info. you provided is missing a lot of requirements that may need to be accounted for during the design of the software and database. For example, holding everything else constant, at any given time will the software only utilize one instance of a language? Things like this need to be accounted for because localization affects things like sorting and conditional expressions. –  Michael Oct 9 '12 at 16:01
    
when software is used in italy for example ..it will contain pdt of italy by 2 languages ..english and italian .. user can switch between those 2 languages –  Hatem Ghazy Oct 9 '12 at 16:11
    
non of products are related to eachothers –  Hatem Ghazy Oct 9 '12 at 17:09
    
possible duplicate of Trouble in Multi-Language DB –  ypercube Oct 9 '12 at 17:16
    
@ypercube there is no duplication of q .. my design now involved separated DBs ..but i asked for better ways to connect them together –  Hatem Ghazy Oct 9 '12 at 17:58
add comment

1 Answer 1

First, it appears that English may not be your first language so I am going to reword your question and then focus on it from there.

What structure should I use for designing my database? Should I use more than one database, and if not, how do I accomplish this with the software?

  • Software will be used in multiple countries. Each country will have products within the database that differ from the other countries, and the products will be available in two languages. The main language is English.

  • I have already started designing a database for each country that will have its own products in English and also the products in the native language.

  • How can I link these two different databases together and modify the content within them easily?

  • Is there a better way to keep track of all of the products, countries, languages, etc. within one database but maintain the organized format I am seeking?"

The answer is that you should likely use one database for all of this. If you simply change the table name for the country or language in your software, all of the other fields will be the same.

english_products table:
id, name, price, description, qty

native_products table:
id, name, price, description, qty

In your software, I suggest simply providing an option to switch countries and use different table names based on the country. So, you would use SELECT english_products for one country and SELECT native_products for another.

Changes to either table could be accomplished by making a change in your software configuration to use a different table name instead. So, your code would be SELECT [table_name] where the [table_name] is specified in the software.

I would suggest only using a single database regardless of your other design decisions.

share|improve this answer
    
there will be many other parts in software rather than medicines part ... should i make table for each part in different languages too in the same DB??? –  Hatem Ghazy Oct 12 '12 at 8:42
    
I would recommend doing so if you used this method. I just saw your other post after answering this one, but another suggestion was to use a field specifically to indicate the language itself. I was not aware you were using this for medicine, and the final decision is up to you, but if you were making a simple products database, you could have a field for english_product_images, native_product_images, etc. and then a transactions table that holds all of the sales for both products. You might also want a field for a product_number in each of those tables that can be referenced elsewhere. –  Jonathan Hickman Oct 12 '12 at 14:23
    
You must evaluate your plans and choose what you believe to be the best option is for you, but regardless of your choice, you should use a single database and a single application framework, or you will have headaches from it down the road. You can put a language field in the table that contains 'es', 'en', 'fr', etc. as suggested in another answer to your similar question, or you can separate them into multiple tables based on language. I actually like the answer to use a field for each language and was going to suggest that first, but it depends on your plans. –  Jonathan Hickman Oct 12 '12 at 14:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.