Recently, I rethought the database design that I did a couple of months ago. The main reason is that last night I read the databse vBulletin schema and saw that they use many, many, tables.
The current βideaβ that I use for my scheme, for example, my log table, is to store everything in one table, distinguishing between the type of log with an integer:
id, type, type_id, action, message
1 , 1, 305, 2, 'Explanation for user Ban'
2, 2, 1045, 1, 'Reason for deletion of Article'
Where type 1 = user, type 2 = article, type_id = the ID of the user, article or w/eand action 2 = ban, action 1 = deletion.
Should I change the design to two tables logBans, logSomethingand so on? or is it better to save the method I'm using now?
source
share