Quote:
Originally posted by slimdave
Just to add to chris' well-made points, if you squeeze in the rows by putting all your nulls at the end of the row, and do not save space for them using PCTFREE, then an update to a non null value is going to give you a row migration, isn't it? So you have to consider not only the chance of the columns being null, but also the chance of the null columns later changing to non-null. If such a situation is pervasive in a table then you will want to reserve the space for an update anyway, and won't save space by positioning nulls at the end.
Excellent point - I had missed this completely in my arguments. I hope you don't mind if I appropriate this point for my own future uses :D.
Quote:
Originally posted by prakashs43
...point to be noted is changing the validations at screen level ( cursor movement etc... ) may be still a costly issue ( particularly in web applications ) than saving small bytes at database level .
yeah i accept this saving mechanism for datawarehousing activities.
I'm afraid I must disagree with this point. As I alluded to in my original post, there are many reasons for assigning abstracted / surrogate / single-field-numeric-sequence-filled keys to every table. Saving space is just one of them. And, as I tried to show, it is not simply a few bytes that are saved - it is a whole lot of space that is saved. And the validation argument doesn't hold up, I'm afraid. Well, not with 3rd generation languages, at any rate - I have no idea if it might be an issue with 4GL languages like Oracle Forms (in Powerbuilder, it would not have been a problem <- Only 4GL I've coded in ;) ). Most validation is a matter of picking from a list of possible values. These lists can just as easily hold 2 values - the display value and the ID. Even if you used string codes, this would be the case, since showing the user your internal codes is a very bad idea in any case. So, this only leaves us with free-form fields, such as an on-screen SSN box. Note that SSN is still in the table and still has a unique index. So validating the SSN and retrieving the PK has only had the smallest of impacts - one more logical read. Actually, another trick for AKs is to make the index (AK,PK), which would allow you to do lookups and translations within the index alone - without having to hit the table. ( not a general-use practice, but a handy tool when needed ).