0

I have a database of a store which I have to add new products constantly. But before publish a new product or after r modifying one the admin have to check if it has the correct data.

I thought in two options to do it:

1.-Adding a new field called verified (type boolean) in the product's table. Then when I'll modify or add a new product it'll be set false at default. And turn it to true when the admin check it.

2.-Using another database, and export and import all the content every 5 days.

What do you think is the best way to do it? Do you have another option to get what I'm trying to do?

Any advice, tip or help will be appreciated, and if you need more info let me know and I'll edit the post.

mllamazares
  • 7,876
  • 17
  • 61
  • 89

1 Answers1

2

Option 1 sounds reasonable. Insert product with verified being defaulted to 0, when associate check, Boolean goes to 1 to check for verification. Might even add a verified by column as well with time and date.

OffTheFitz
  • 81
  • 5
  • Thanks! :) Hey, I can bluid a new table called "verfified_products" with the id of the products revised and the timestamp. What about this? – mllamazares Jul 23 '13 at 18:30
  • 1
    @Marco, See I'm thinking you could, but to serve what purpose? You could have that table become an audit log of some sort. Multiple rows indicating the same product for different updates. Otherwise it wouldn't be advantageous to have the table if you weren't running audits. You could set a trigger on the table before an update to write to a totally separate table that includes the details of the present data. – OffTheFitz Jul 23 '13 at 19:30