Ok daft question time lol - Default value or blank field?

G1ZmO

Registered User.
Local time
Today, 22:29
Joined
May 4, 2006
Messages
133
Ok this may be a very silly question but here goes :)

I have a lot of fields which are normally filled with the default value "N/A"
Would having these as blank fields decrease the database size?

<hides under the table from the laughter>:p
 
Simple Software Solutions

Go to the top of the class.... Get down you fool!

When you create a text field and nominate its field length, say 10, then this is allocated irrespective if there is anything in it or not. To prove this create a new database with a field in a table that has values in it.

Remove the contents and compact then compare the size.

CodeMaster::cool:
 
Yes. Would it make much of a difference? Depends on just how much data you have. The more important question I would have is what does your N/A mean? To me N/A means a data element is 'not applicable' to the record. This can be viewed as different to a null value which would imply that we simply don't know what the value is of the data element to the record.

Hope that makes sense. :)
 
Ok DOH!

So CodeMaster, if I have field lengths which are longer than they need to be then I'm wasting space and making the db larger than it needs to be?
 
Simple Software Solutions

Based on my experience of working with Access since version 4.3 I would say yes. I have access 2007 on my laptop but since reading about plenty of issues with it I have not used it up to now.

Each field type has a bit element to it and access adds up all the bits for each record to determine the overall pagesize.
 
Simple Software Solutions

Just added a field to a table and populated the contents with values. Then I ran a compact. Nulled the contents of the field and ran another compact. There was no change in the size of the database.

David
 
Thanks David,

I'll go through and check the field sizes for the whole db and see if it reduces the size

Ta,

Paul
 

Users who are viewing this thread

Back
Top Bottom