I'm creating a laravel app and some tables will have status column that will receive just two values: ACTIVE
or INACTIVE
.
I think I have two options:
- boolean, normally set as
tinyint(1)
on MySql - varchar, and set
ACTIVE
orINACTIVE
strings values
The big question is which type should I choose:
The first one is smaller to storage on database, and if I set column name like is_active is easy to use in code, but will make database more difficult to ready by humans;
The second one will require more space to be saved in database and some class constants in model to make things more organized, but will make database more easy to read for humans (and new developers that could be added to project).
Which should I choose to have a good performance and readability?
Edit:
My question is about the difficulty / complexity to read / understand the database by developer if it needs to edit something directly in the database as opposed to the storage and performance question.