In this chapter, we will learn what data types and their usage. We will go through the specific data types and understand what data can be stored in each of them. The data types include string, numeric, date and time, and other data types. String data types include char and varchar, binary and varbinary, blob, enum, set, and text. Numeric data types include bit, int, float, double, and decimal. Date and time data types include date, time, datetime, timestamp, and year.
We will learn from the perspective of MySQL data types, and will keep noting the differences between Oracle, PostgreSQL, and SQL Server wherever needed. We will also go through some examples of types and values of data to see how to assign them correctly to data types, including an explanation of why you need to be careful when selecting a data type and how it can impact database performance...