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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:12:47+00:00 2026-06-09T01:12:47+00:00

Som Im trying to design an e-commerce system where vendor is able to add

  • 0

Som Im trying to design an e-commerce system where vendor is able to add a product to be displayed on the site. The vendor can edit/update the product details, but they should not go “live” until and unless an admin reviews it.

I have several models that represent different products. Here is the design for one such product, but this same system will be applied to every product type.

Here is the diagram:enter image description here

Can I get some feedback on the pros and cons of this approach.
Is there a better approach to solving this problem.
Is this scalable?

Thanks

  • 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-06-09T01:12:48+00:00Added an answer on June 9, 2026 at 1:12 am

    What is in the is_current_products and awaiting_approvals tables should be stored as a column and not a separate table.

    Since current products will be queried a lot (each time a customer visits the site), it would be a big overhead to first fetch the is_current_products table then display the results from products. It will be an even bigger headache when you want to sort the products table.

    How I would design this is have two tables: products and product_versions, where products represent all the approved information, and product_versions represent all the information regardless whether they are approved or historical.

    Rough schema:

    products
    -id
    -current_version_id
    -#all the product information from newest approved version#
    
    product_versions
    -id
    -product_id
    -approved_by (can be null)
    -approved_on (can be null)
    -#all the product information from this version#
    

    To display current product information, accessing the products table is sufficient.

    To fetch the versions pending approval, just fetch all the ProductVersion where the approved_by or approved_on attribute is null.

    To approve a version,
    approved_by and approved_on will be changed on product_version, and information of product is changed to the current version, including current_version_id.

    With this design, you can also revert to a older version while keeping all other versions in tact.

    Hope this helps.

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

Sidebar

Related Questions

I wuld like to do som automatic tagging of incoming text in our system
im trying to learn about regex, and how to use it braking up som
Have som trouble getting the code below to work. I am trying to fire
I'm trying to alter the product pages on my Magento install. In the current
i also have som problem with ckeditor. How can i call ckeditor as a
I'm trying to mock a Userservice that inherits a baseclass with som generic methods.
I have som text-content that I want to be able to change without recompiling
Im trying to figure out the most effective way to parse som quite complicated
Allright som first of im very new to android programming and was trying to
I'm using Ruby on Rails 3.1 with mongoid and trying to set up som

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.