I have been a frontend programmer for a while and moving to making some applications on my own and becoming a full stack engineer. I have worked with plenty of databases for applications and sites but as I am building my own I want to make sure I am thinking in best practice. Now many applications have some shared concenpts so was wondering if there is some cheat sheet for common attributes paired with data types and why. Here are some expamles of what I was curious about:
- table entry created and updated: date or timestamp? Why? With date isnt it easier to display and sort on the frontend?
- Entry title - VARCHAR or text?
- Entry body - I assume text.
- 5 Star rating - INT or Decimal? Why since I have read about both?
- Phone & Zip - INT or VARCHAR?
- Event Date - Again, Date or Timestamp
Thanks. I know this seems pretty basic, but just trying to an idea of best practice and many of these items are exchangable between applications.