Reputation: 1364
We're going to use a table to include sort of different entities which have most fields in common (i.e. "order", "invoice", "estimate", "dispatch"...). We decided to have them all in the same table for some reasons, but this is not the question.
This table will have a special field which will hold the identifier of the entity. We've been using varchars in the past, like the ones described above.
Would it be recommendable to use a tinyint instead, so that 0 means "order", 1 means "estimate" and so on?
Upvotes: 0
Views: 270
Reputation: 6133
Depending on what your goal is.
For performance:
For readability (by db users with less experience)
Keep using varchar
Upvotes: 1