Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4612160
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:21:58+00:00 2026-05-22T01:21:58+00:00

This is a general DB design question. Assume the following table: ====================================================================== | product_translation_id

  • 0

This is a general DB design question. Assume the following table:

======================================================================
| product_translation_id | language_id | product_id | name   | price |
======================================================================
| 1                      | 1           | 1          | foobar | 29.99 |
----------------------------------------------------------------------
| 2                      | 2           | 1          | !@#$%^ | &*()_ |
----------------------------------------------------------------------

(Assume that language_id = 2 is some language that is not based on Latin characters, etc.)

Is it right for me to store the translated price in the DB? While it allows me to display translations properly, I am concerned it will give me problems when I want to do mathematical operations on them (e.g. add a 10% sales tax to &*()_).

What’s a good approach to handling numerical translations?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T01:21:59+00:00Added an answer on May 22, 2026 at 1:21 am

    If you can programatically convert “29.99” to “&*()_” then I’d put the price in the product table and leave the translation of it the display layer. If you store it twice then you will have two obvious problems:

    1. You will end up with consistency problems because you’re storing the same thing in two different places in two different formats.
    2. You will be storing numeric data in text format.

    The first issue will cause you a lot of head aches when you need to update your prices and your accountants will hate you for making a mess of the books.

    The second issue will make your database hate you whenever you need to do any computations or comparisons inside the database. Calling CONVERT(string AS DECIMAL) over and over again will have a cost.

    You could keep the price in numeric form in the product table (for computation, sorting, etc.) and then have the localized translation in the your translation table as a string. This approach just magnifies the two issues above though. However, if you need to have humans translating your numbers then this approach might be necessary. If you’re stuck with this then you can mitigate your consistency problems by running a sanity checker of some sort after each update, you might even be able to wrap the sanity checker in a trigger of some sort.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a general design question about how to make a web application that
This is a general design question that I'm currently hung up on. It is
This is more of a general design question I guess... I have an Ajax
This is a general question about mongodb database design, but the reason for my
This is a general question of sorts, but do you think that it's important
I asked this question in a more general design context before. Now, I'd like
This is more of a general design question, but it will be implemented in
This is kind of a general DB design question. If one has an associative
This is just a general question on actual thread design. I'm using Java on
just a general design question that I'd like to hear some of your opinions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.