Nullable fields in a table
I have a Web-based application that creates mini sites for people. A user
will sign up for the site with some basic personal information and then, once approved, they will
add more information (one to zero or one). For example, bio short description, bio long
description, head shot (.jpg) and work description.
Should I use nullable fields in the table containing the user's name, or normalize into other
tables (bio, images, work)? If I choose the later, then do I create the records with null fields
before they enter data, or do it on the first "update"?
This is basically up to you and your style. Unless there are a large enough number of rows in
my table to make performance a consideration, I generally prefer a simpler structure to a more
complex one. So put the nullable columns in the table containing the user's name. The fewer tables
you have to access, the simpler your program.
Do you have comments on this Ask the Expert Q&A? Let us
know.
This was first published in September 2005
Join the conversationComment
Share
Comments
Results
Contribute to the conversation