SuppaiKamo
SuppaiKamo

Reputation: 285

What is the best way to add a Memo field that will sometimes be Null in a MS Access database?

In a MS Access 2010 database (.accdb) I have a table with a memo field for a long string of text of highly variable arguments. However often there will be no arguments and the value will be null. So I'm wondering if it would be more wise to create a separate table with the memo field and a key (id) to the main table alone, because I don't know how efficient Access deals with stuff like this? If it allocates a lot of data for null fields, it might be better to create a separate table.

Upvotes: 0

Views: 202

Answers (1)

Declan_K
Declan_K

Reputation: 6826

Lots of NULL values in a string field will have a very minimal impact on the DB SIZE.

As a test I Added a String(255) column to a table with ~ 1 Million rows and left all of them NULL. The database grew in size by 44KB before a compact and repair. After a compact and repair, the net impact was 40KB.

So, unless you need Many to One relationship between Memo's and the base object, I would leave the field in the main table.

Upvotes: 2

Related Questions