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

  • Home
  • SEARCH
  • 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 645163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:28:19+00:00 2026-05-13T21:28:19+00:00

When designing a stock management database system for sales and purchases what would be

  • 0

When designing a stock management database system for sales and purchases what would be the best way to store the various taxes and other such amounts?

A few of the fields that could be saved are:

  • Unit price excluding tax
  • Unit price including tax
  • Tax per item
  • Total excluding tax (rounded to 2 decimals)
  • Total including tax (rounded to 2 decimals)
  • Total tax (rounded to 2 decimals)
  • Tax Percentage
  • Fk link to the Tax % (and not store the tax amount)

Currently the most reasonable solution so far is storing down (roughly) item, quantity, total excluding tax (rounded), and the total tax (rounded).

Is there a better way of storing these details for a generic system?

Given the system needs to be robust, what should be done if there were multiple tax values which might need to be separated (e.g. state and city)? In this case a separate table would be in order, but would it be considered excessive to just have a rowID and some taxID mapping to a totalTax column?

To clarify: Asking how to store the data about individual transactions and that side; not so much the details about the tax specific rates.

  • 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-13T21:28:19+00:00Added an answer on May 13, 2026 at 9:28 pm

    The problem with approach is if the tax changes, VAT (sales tax) in the UK has changed twice in the last 12 months.

    When I worked in ECommerce websites we had a table Tax_Rate which held the different tax rates a shop would deal with eg.

    1. TaxFree – 0%
    2. Vat – 17.5%
    3. DiscountedVat – 15%
    4. etc…

    and then your stock table fields may have

    • ItemId
    • UnitPrice
    • fk_TaxRate

    your invoice_detail row table will be

    • fk_OrderId
    • fk_ItemId
    • PerItemPriceCharged (denormalized)
    • TaxRateCharged (denormalized)
    • QuantityOrdered

    your invoice table will be

    • OrderId
    • fk_CustomerId

    Where fk_denotes a foreign key. Note that OrderId will not be unique in your invoice row table.

    EDITS: Head’s all over the place today.

    You need to denormalize the invoice row total and the tax rate total because you don’t want future changes in an item price or tax rate to affect the historical invoices.

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

Sidebar

Related Questions

No related questions found

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.