jeudi 19 février 2015

Using VARCHAR in MySQL for everything! (on small or micro sites)


Vote count:

0




I tried searching for this as I felt it would be a commonly asked beginner's question, but I could only find things that nearly answered it.


We have a small PHP app that is at most used by 5 people (total, ever) and maybe 2 simultaneously, so scalability isn't a concern.


However, I still like to do things in a best practice manner, otherwise bad habits form into permanent bad habits and spill into code you write that faces more than just 5 people.


Given this context, my question is: is there any strong reason to use anything other than VARCHAR(250+) in MySQL for a small PHP app that is constantly evolving/changing? If I picked INT but that later needed to include characters, it would be annoying to have to go back and change it when I could have just future-proofed it and made it a VARCHAR to begin with. In other words, choosing anything other than VARCHAR with a large character count seems pointlessly limiting for a small app. Is this correct?


Thanks for reading and possibly answering!



asked 51 secs ago







Using VARCHAR in MySQL for everything! (on small or micro sites)

Aucun commentaire:

Enregistrer un commentaire