Forum Moderators: open
The project will be a db driven site running PHP/MySql selling other people products - a kind of classified site.
I thought about having two db's - the first one being a kind of filter that would 'protect' the real/live one from people misbehaving.
It would only hold very little info - login details and product description etc... People would be able to ADD stuff to it
The second one would be where I 'approve' each product to be published - which would hold the same type of info but some other as well, like people's contact details etc... People would only be able to SELECT from it and I alone could ADD, UPDATE, DELETE.
Is this a proper way of doing it? or is it just a waste of time and I could achive the same thing using one db and many tables?
Thanks for your feedback
thanks for your input.
I was thinking of having a web based control panel calling the temporary table and for me to just double check the info - and 'approve' it.
I am not great with PHP but this add/approve screen is not rocket science. For the delete I was thinking of running a cron job every morning and deleting all the records who have a date of 'the limit' + 1 day.
Thanks again
Any query that would return records to a user should include WHERE status = 'Approved'
Careful on that, because if you forget to include status in the WHERE clause you could expose records that you don't want to expose.
thanks for your input.
coming back on the DB number would having two DB have an effect on server load or not?
i.e. would running one big DB (lets say 20 tables / 2 of them having +10,000 records) be slower than running 2 DBs (same number of tables but spread over the 2 DBs each table with +10,000 being in a separate DB)
most queries will only be to one of the tables wit +10,000 records
Cheers
this is tiny in db terms, if you are trying to make things quicker by having 2 databases then you won't.
speed things up by optimising your queries, indexing the tables properly and so on.
basically you can test all these things anyway, populate the tables with random data and test to see what is quicker.