Which data type is appropriate to store age of person?
Data Type to store AGE
Designing a database is a very critical part of any project as well as for programming purposes. It is more important to choose the right data type a single mistake will lead to below negative situations:
- Not able to serve the desired objective with data type
- In-efficient Performance (slow speed)
- Not able to handle correct or complex operations on the information
- Occupies huge storage volume
- Not scalable
To avoid the above situations, one should be very careful while using data types.
Age as Integer - if you only want to save aga as a whole number like 23, 45, 56, 87, 12, etc, then you can store it as integer datatype.
Tip: it would be great if you can store the date of birth instead of age, in this way you can retrieve other information along with age like - age in days, birth anniversary, age in month, age in weeks.
Take a call and decide which one works for you.
Hope this information helps and write to us at firstname.lastname@example.org