I have the following tables:
Cateogories
- CategoryID (int) Primary Key
- CategoryName (varchar)
Items
- ItemID (int) Primary Key
- CategoryID (int)
- ItemName (varchar)
There is a foreign key constraint on Items.CategoryID. There is a chance that when a new item is created that there will be no category assigned.
Is it better to set Items.CategoryID to allow nulls and deal with the nulls in my code OR better to not allow nulls, set the default CategoryID to 1, and create a dummy record in the Categories table called "Uncategorized" and then deal with that dummy category in my code?