i have a problem with designing db tables. for explaining my problem here is a simple forum db. the forum table contains following columns:
| forum_id | title | desc | last_update |
------------------------------------------------------------
| 1 | 'title' | 'desc' | 2011/5/3 |
now when i design this table should i allow null values for the title, desc and last_update columns or not??
if i think logically, a forum should always have value for title and desc columns while the last_update column could be null or not null but if the user tries to update the title column, he/she has to provide the desc value also. so this is not good since with this approach we have to find the desc value of the forum that we're editing and pass it again to the sql statement which will result to an unecessary overwrite of value that already exist!
problem 1: at the other hand, if i declare seperate sps for each of update statements(one for each column update) and my table is big enough then that would cause the db to become full of sps that basically do the same thing on the same table.
problem 2: if i allow null values then an update like this will compromise my data integrity:
update ForumDB(title, desc, last_update)
values ('edited title', null, 2011/6/4)
where forum_id = 1
so what can be done to prevent both of this side effects??