I am doing a "user registration project" and I am newbie in database design.
I studied a lot of tutorials, but I didn't get a solution for this question.
Why there is not one particular datatype for all, that should support all these int, float, string, date , instead of using "int" for telephone , "char" for name and "varchar" for email.
Also is there any problem if I use "varchar" even though I am sure that "field" will store only numbers?
If we use correct data types, then performance/advantage is better? If I use varchar
for columns that store only numbers, then performance will decrease, is this right?
Instead of struggling in future (like in MySQL convert column datatype from VARCHAR to INT on Stack Overflow) by using the wrong data types, it's better to use proper one before only?