blue_cat blue_cat - 6 months ago 9
MySQL Question

MySQL: can I create two tables with the same data field

I want to create two comments table one

saveJournal
and one
publishJournal
when the user log in they will be able to enter some data when they click save the data will be saved in the database and he/she will be the only one who can see the data if they click publish journal the journal will be published on the web and everyone will be able to see it.The data will not be removed form saveJournal in case the user want edit and update their data in both saveJournal & publishJournal. My question is does this way of creating two tables considered good way to design database or is there a way that I can do the same things without creating two tables with the same filed

Answer

Instead of having two tables, you can use extra column published with values 0/1 or status with more values.

In the described case two tables are not a good idea.