🔍 Day 3 of my 30-day Database and SQL challenge with Rahul Janghu ! Today's lesson expanding my understanding and skill set. Here's a recap:
1️⃣ Integers: Ranging from TINYINT to BIG INT, each occupying varying bytes to accommodate different value ranges.
2️⃣ DECIMAL: Defined by precision and scale, ensuring precise storage of values in the database.
3️⃣ FLOAT/DOUBLE: These types offer approximate values, handy for large numeric ranges but at the expense of precision.
4️⃣ BOOL: Represented as TINYINT, simplifying storage for boolean values.
5️⃣ ENUM: A powerful tool for defining a set of possible values for a column.
6️⃣ Mapping Table: Essential for establishing relationships between entities in a database.
7️⃣ Date & Time: Facilitating the storage of temporal data.
8️⃣ Timestamp: Capturing precise moments in time, crucial for tracking changes.
9️⃣ BLOB (Binary Large Object): Classified into TINY BLOB, BLOB, MEDIUM BLOB, and LONG BLOB, these types are optimal for storing substantial binary data. Note: Large file storage is best handled by AWS S3 rather than the database.
🔟 CHAR & VARCHAR: Both serve for storing character strings, yet they differ in how they handle storage. CHAR allocates space for the maximum length, while VARCHAR dynamically adjusts based on the actual data length, conserving space.
Each data type unveils a new layer of database management intricacies. Excited to continue this journey of discovery! 💡 #SQL #Database #DataTypes #Scaler #LearningJourney #30DayChallenge 📊