Given that I have a table that holds vehicle information and one of those pieces of information is VehicleType (usually 6-20 characters), what are the technical reasons why it is better to design the tables like this:
Vehicles
VehicleID
VehicleTypeID (INT) (relates to an INT in the VehicleTypes table)
versus this:
Vehicles
VehicleID
VehicleType (NVARCHAR(50))
I can think of a few...
1) If the description of the Vehicle Type changes, it only has to be changed in one record.
2) It takes less space to store an INT than a NVARCHAR (depending, of course, on the string length and especially if I change to TINYINT.)
A few questions...
1) Any indexing considerations? I'm assuming if I'm going to be indexing on the VehicleType, it will be faster and take less space if I'm using INTs rather than NVARCHARs.
2) Any query optimization issues? I know the former method requires a JOIN, but I don't expect that to be taxing to SQL 2008.
I'm going to be defending my position and want to have as much information as possible.
Thanks for taking the time to respond.
Thanks,
Darvis