I'm new to web development and databases (I am currently using Django and PostgreSQL) and I have a general question about databases, because other than the fact that they store data, I pretty much know nothing about them.
I was wondering if it's good practice to have as few fields as possible in my models?
For instance, I have a Model
that has a DateTimeField()
and was considering also creating a CharField()
that corresponds to the month that the instance is related to (I won't delve into details). The consideration of adding this month
field sparked me to ask this question.
I clearly don't need the month
field because I could parse it out of the DateTimeField()
, but it's more convenient to just have a string with the month name rather than parse it. Is it acceptable to add another field for convenience or should I have as few fields as possible?