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 275289
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T00:44:29+00:00 2026-05-12T00:44:29+00:00

People buy stuff in a web shop. I take their orders and save them

  • 0

People buy stuff in a web shop.

I take their orders and save them to a database. For each ordered item, I need the quantity and the information about the item. At the very least, I’m going to need to save the current price and name of each item but I would really prefer to save everything.

And here comes the question… What’s the best way to keep all the information about each ordered item as it was at the time of purchase?

  1. Copy into a separate table with the same columns as the product table
  2. Make copies of products in the same table, marked as non-editable, non-viewable copies
  3. Some sort of copy on write schema that saves some space until the “live” product information is actually changed?
  4. ????

For simplicity, let’s assume all product information is kept in a single table.

  • 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-12T00:44:29+00:00Added an answer on May 12, 2026 at 12:44 am

    If the products in your shop are going to change frequently, then it sounds like what you need is a product version history.

    Basically, you should try to identify all the properties/fields of your shop items that are going to frequently change, and put them into a separate product_properties (or something) table, with a timestamp for that particular version of those properties. Perhaps all your properties will change all the time, in which case you might get away with a single table. In any event, you can assume that the newest timestamp is the latest version of the product.

    When the shop owner updates a product, you create a new record in product_properties with all the changed properties, and update the main product table record to point to this new record (or simply just pull out the newest timestamp at display time).

    When someone makes a purchase, you record the product id and the history/version id of the product in the purchase table.

    With this type of history setup, you’ve normalized the product data, so it’s not stored over and over again with each purchase record, and you can still get the specific details of each purchase.

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

Sidebar

Related Questions

Hi I'm creating online shop. In this shope people online must be buy files
I'm setting up a marketplace app where people can buy and sell goods while
On my site, people can buy parts for vehicles. I want to create a
I have a question about a database schema for a certain website where people
i got a point system where people can buy diffrent things for points they
Here 'free' means no need to buy any license. As I know VCL comes
I am supposed to make an app, where people can buy and pay for
I'm working on a typical internal web/database app for a large corporation. By typical,
I am currently working on (a part of) a site where people buy an
on my site I allow people to buy subscriptions to my site in bulk(I

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.