KEMBAR78
PPT CREATEIVEhahhahahahhahahahahahaha.pptx
Before we start our discussion, let us have first an activity.
Activity 1: Sing me, Guess Me.
• The students will sing a song entitled “Types of Data” with
a tune of watermelon song. During the "Types of Data"
song, students will pass around a mystery box. When the
teacher says "stop," the student holding the box chooses
a word and answers a related question. This repeats until
all words are picked.
• What is you’re feeling about the activity?
• What do you think is the connection of
the game to our lesson this afternoon?
• Did you know that these types of data
are can also be found in MYSQL?
Activity 2: What Am I Called
The teacher present set of
tables that have specific
columns. Their task is to
identify what specific data
type to be used.
OBJECTIVES
• Identify the different types of data.
• Value the importance of the different types
of data.
• Discuss the different types of data.
Data Types (MYSQL)
Data Types (MYSQL)
Numeric Data Types:
INT: Used for storing whole numbers (positive or negative) within a specific range.
This type of data represents a whole number. Not decimal, not fraction, but whole
number that does not lose precision. Example: I.D. and phone number. Also split into
4 types depending on the size that you want. Example: 5, -10, 1000. Size: 4 bytes
Range: -2,147,483,648 to 2,147,483,647
Sample value: 1234
• TINYINT
• SMALLINT
• MEDIUMINT
• INT
• BIGINT
Data Types (MYSQL)
Numeric Data Types:
• DOUBLE: Used for double-precision floating-point
numbers. Example: 3.14, 100.567. Size: 8 bytes
• Range: -1.7976931348623157E+308 to -
2.2250738585072014E-308, 0, and
2.2250738585072014E-308 to
1.7976931348623157E+308
• Sample value: 1234.5678
Data Types (MYSQL)
Numeric Data Types:
• DECIMAL: Used for exact numeric values with a
specified precision and scale. EXAMPLE: 10.99,
1234.5678.
• Size: Variable, based on precision and scale
• Range: Depends on precision and scale
• Sample value: 1234.5678
Data Types (MYSQL)
• String Data Types:
CHAR: Fixed-length string with a maximum length
specified. Use this data types if all data are in the
same length. Example: "ABC", "XYZ".
Size: Variable, up to 255 bytes
Range: Fixed-length string
Sample value: "Hello"
Data Types (MYSQL)
• String Data Types:
• VARCHAR: Variable-length string with a maximum
length specified. Use this data type if all the data do not
have the same length. Example: "John Doe", "123 Main
St".
• Size: Variable, up to 65535 bytes
• Range: Variable-length string
• Sample value: "Hello World"
Data Types (MYSQL)
• String Data Types:
• TEXT: Used for large text data. Large text data, suitable for storing lengthy
descriptions or comments. Split into 4 types depending on the size that you
want. It is also not limited in row unlike the VARCHAR. They are also called
CLOBS or Character Large Object. Example: "Lorem ipsum dolor sit amet..."
• Size: Variable, up to 65535 bytes
• Range: Long string
• Sample value: "Lorem ipsum dolor sit amet..."
• TINYTEXT
• TEXT
• MEDIUMTEXT
Data Types (MYSQL)
• String Data Types:
• ENUM: A string object that can have only one value,
chosen from a list of possible values. Example: "Male",
"Female", "Other".
• Size: 1 or 2 bytes, depending on the number of
enumeration values
• Range: Enumerated list of values
• Sample value: 'option1'
Data Types (MYSQL)
• Date and Time Data Types:
• DATE: Used for storing dates in the format YYYY-
MM-DD. Example: "2023-05-15", "1998-12-25".
• Size: 3 bytes
• Range: '1000-01-01' to '9999-12-31'
• Sample value: '2024-03-05'
Data Types (MYSQL)
• TIME: Used for storing times in the format
HH:MM: SS. Example: "08:00:00",
"15:30:00".
• Size: 3 bytes
• Range: '-838:59:59' to '838:59:59'
• Sample value: '12:30:00'
Data Types (MYSQL)
• Date and Time Data Types:
• DATETIME: Used for storing both date and time in the
format YYYY-MM-DD HH:MM: SS. Example: "2023-05-
15 08:00:00", "1998-12-25 15:30:00".
• Size: 8 bytes
• Range: '1000-01-01 00:00:00' to '9999-12-31 23:59:59'
• Sample value: '2024-03-05 12:30:00'
Data Types (MYSQL)
• Date and Time Data Types:
• TIMESTAMP: A timestamp data type, often used for
recording when a row was inserted or last updated.
Example: "2023-05-15 08:00:00".
• Size: 4 bytes
• Range: '1970-01-01 00:00:01' UTC to '2038-01-19
03:14:07' UTC
• Sample value: '2024-03-05 12:30:00'
Data Types (MYSQL)
• Binary Data Types
• BINARY: Fixed-length binary string. Binary
data refers to data that is not necessarily
text-based and can include things like
images, audio files, or any other type of non-
text data. Example: 0,1
Data Types (MYSQL)
• Binary Data Types
• VARBINARY: Variable-length binary string.
VARBINARY would be ideal for storing these
images because it can accommodate different
sizes without wasting storage space.
• BLOB: Used for storing large binary objects like
images or files. Example: [IMAGES].
Data Types (MYSQL)
• Other Data Types:
• BOOLEAN: Synonym for TINYINT (1), used to represent true/false values.
Example: true, false.
• SET: A string object that can have zero or more values, chosen from a list
of possible values. Example: "Option1, Option2", "Option3, Option4".
Example: Let's say you have a table for user preferences, and you define a
SET column called "notification preferences" with options "Email",
"SMS", and "Push". For a particular user, you might store their
notification preferences as "Email, SMS" indicating that they want to
receive notifications via both email and SMS.
• Size: 1, 2, 3, 4, or 8 bytes, depending on the number of set members
• Range: Set of values
• Sample value: 'option1, option2'
Data Types (MYSQL)
• JSON: Used for storing JSON data. JSON is a
data type used in databases like MySQL to
store data in JSON (JavaScript Object Notation)
format. It allows you to store structured data
in a flexible and easy-to-read format, similar to
how data is represented in JavaScript objects.
Activity 3: Drop it Off
After discussing the Data Types, the teacher will give the
students terms in which the students will drop what specific
data types to be use base in the Data Types of the MYSQL
In relation with the previous activity, the teacher will give
another table in which the students will input the data following
the format example on the discussion
Directions: Identify what is asked in every question. Write the letter of the correct
answer.
1. Which data type is suitable for storing a date and time value?
a) VARCHAR
b) INT
c) DATE
d) FLOAT
2. What is the maximum number of characters that can be stored in a VARCHAR
column?
a) 255
b) 64
c) 1024
d) Unlimited
3. Which data type is used for storing large text values?
a) TEXT
b) CHAR
c) BOOLEAN
d) BLOB
4. What is the difference between CHAR and VARCHAR data types?
a) CHAR is fixed-length, while VARCHAR is variable-length
b) VARCHAR is fixed-length, while CHAR is variable-length
c) They are the same
d) CHAR stores numeric values, while VARCHAR stores text values
5. Which data type is appropriate for storing a large binary object?
a) TEXT
b) BINARY
c) BLOB
d) VARCHAR
6. Which data type is used for storing a large number of digits with a decimal point?
a) INT
b) DECIMAL
c) FLOAT
d) DOUBLE
7. Which data type is used for storing a true/false value?
a) CHAR
b) BOOLEAN
c) BIT
d) ENUM
8. Which data type is used for storing a fixed-length string?
a) VARCHAR
b) TEXT
c) CHAR
d) ENUM
9. Which data type is used for storing a large integer value?
a) TINYINT
b) BIGINT
c) INT
d) INTEGER
10. What is the maximum number of characters that can be stored in a
TEXT column?
a) 255
b) 64
c) 1024
d) Unlimited
PPT CREATEIVEhahhahahahhahahahahahaha.pptx

PPT CREATEIVEhahhahahahhahahahahahaha.pptx

  • 2.
    Before we startour discussion, let us have first an activity. Activity 1: Sing me, Guess Me. • The students will sing a song entitled “Types of Data” with a tune of watermelon song. During the "Types of Data" song, students will pass around a mystery box. When the teacher says "stop," the student holding the box chooses a word and answers a related question. This repeats until all words are picked.
  • 3.
    • What isyou’re feeling about the activity? • What do you think is the connection of the game to our lesson this afternoon? • Did you know that these types of data are can also be found in MYSQL?
  • 4.
    Activity 2: WhatAm I Called The teacher present set of tables that have specific columns. Their task is to identify what specific data type to be used.
  • 6.
    OBJECTIVES • Identify thedifferent types of data. • Value the importance of the different types of data. • Discuss the different types of data.
  • 7.
  • 8.
    Data Types (MYSQL) NumericData Types: INT: Used for storing whole numbers (positive or negative) within a specific range. This type of data represents a whole number. Not decimal, not fraction, but whole number that does not lose precision. Example: I.D. and phone number. Also split into 4 types depending on the size that you want. Example: 5, -10, 1000. Size: 4 bytes Range: -2,147,483,648 to 2,147,483,647 Sample value: 1234 • TINYINT • SMALLINT • MEDIUMINT • INT • BIGINT
  • 9.
    Data Types (MYSQL) NumericData Types: • DOUBLE: Used for double-precision floating-point numbers. Example: 3.14, 100.567. Size: 8 bytes • Range: -1.7976931348623157E+308 to - 2.2250738585072014E-308, 0, and 2.2250738585072014E-308 to 1.7976931348623157E+308 • Sample value: 1234.5678
  • 10.
    Data Types (MYSQL) NumericData Types: • DECIMAL: Used for exact numeric values with a specified precision and scale. EXAMPLE: 10.99, 1234.5678. • Size: Variable, based on precision and scale • Range: Depends on precision and scale • Sample value: 1234.5678
  • 11.
    Data Types (MYSQL) •String Data Types: CHAR: Fixed-length string with a maximum length specified. Use this data types if all data are in the same length. Example: "ABC", "XYZ". Size: Variable, up to 255 bytes Range: Fixed-length string Sample value: "Hello"
  • 12.
    Data Types (MYSQL) •String Data Types: • VARCHAR: Variable-length string with a maximum length specified. Use this data type if all the data do not have the same length. Example: "John Doe", "123 Main St". • Size: Variable, up to 65535 bytes • Range: Variable-length string • Sample value: "Hello World"
  • 13.
    Data Types (MYSQL) •String Data Types: • TEXT: Used for large text data. Large text data, suitable for storing lengthy descriptions or comments. Split into 4 types depending on the size that you want. It is also not limited in row unlike the VARCHAR. They are also called CLOBS or Character Large Object. Example: "Lorem ipsum dolor sit amet..." • Size: Variable, up to 65535 bytes • Range: Long string • Sample value: "Lorem ipsum dolor sit amet..." • TINYTEXT • TEXT • MEDIUMTEXT
  • 14.
    Data Types (MYSQL) •String Data Types: • ENUM: A string object that can have only one value, chosen from a list of possible values. Example: "Male", "Female", "Other". • Size: 1 or 2 bytes, depending on the number of enumeration values • Range: Enumerated list of values • Sample value: 'option1'
  • 15.
    Data Types (MYSQL) •Date and Time Data Types: • DATE: Used for storing dates in the format YYYY- MM-DD. Example: "2023-05-15", "1998-12-25". • Size: 3 bytes • Range: '1000-01-01' to '9999-12-31' • Sample value: '2024-03-05'
  • 16.
    Data Types (MYSQL) •TIME: Used for storing times in the format HH:MM: SS. Example: "08:00:00", "15:30:00". • Size: 3 bytes • Range: '-838:59:59' to '838:59:59' • Sample value: '12:30:00'
  • 17.
    Data Types (MYSQL) •Date and Time Data Types: • DATETIME: Used for storing both date and time in the format YYYY-MM-DD HH:MM: SS. Example: "2023-05- 15 08:00:00", "1998-12-25 15:30:00". • Size: 8 bytes • Range: '1000-01-01 00:00:00' to '9999-12-31 23:59:59' • Sample value: '2024-03-05 12:30:00'
  • 18.
    Data Types (MYSQL) •Date and Time Data Types: • TIMESTAMP: A timestamp data type, often used for recording when a row was inserted or last updated. Example: "2023-05-15 08:00:00". • Size: 4 bytes • Range: '1970-01-01 00:00:01' UTC to '2038-01-19 03:14:07' UTC • Sample value: '2024-03-05 12:30:00'
  • 19.
    Data Types (MYSQL) •Binary Data Types • BINARY: Fixed-length binary string. Binary data refers to data that is not necessarily text-based and can include things like images, audio files, or any other type of non- text data. Example: 0,1
  • 20.
    Data Types (MYSQL) •Binary Data Types • VARBINARY: Variable-length binary string. VARBINARY would be ideal for storing these images because it can accommodate different sizes without wasting storage space. • BLOB: Used for storing large binary objects like images or files. Example: [IMAGES].
  • 21.
    Data Types (MYSQL) •Other Data Types: • BOOLEAN: Synonym for TINYINT (1), used to represent true/false values. Example: true, false. • SET: A string object that can have zero or more values, chosen from a list of possible values. Example: "Option1, Option2", "Option3, Option4". Example: Let's say you have a table for user preferences, and you define a SET column called "notification preferences" with options "Email", "SMS", and "Push". For a particular user, you might store their notification preferences as "Email, SMS" indicating that they want to receive notifications via both email and SMS. • Size: 1, 2, 3, 4, or 8 bytes, depending on the number of set members • Range: Set of values • Sample value: 'option1, option2'
  • 22.
    Data Types (MYSQL) •JSON: Used for storing JSON data. JSON is a data type used in databases like MySQL to store data in JSON (JavaScript Object Notation) format. It allows you to store structured data in a flexible and easy-to-read format, similar to how data is represented in JavaScript objects.
  • 23.
    Activity 3: Dropit Off After discussing the Data Types, the teacher will give the students terms in which the students will drop what specific data types to be use base in the Data Types of the MYSQL
  • 25.
    In relation withthe previous activity, the teacher will give another table in which the students will input the data following the format example on the discussion
  • 27.
    Directions: Identify whatis asked in every question. Write the letter of the correct answer. 1. Which data type is suitable for storing a date and time value? a) VARCHAR b) INT c) DATE d) FLOAT 2. What is the maximum number of characters that can be stored in a VARCHAR column? a) 255 b) 64 c) 1024 d) Unlimited
  • 28.
    3. Which datatype is used for storing large text values? a) TEXT b) CHAR c) BOOLEAN d) BLOB 4. What is the difference between CHAR and VARCHAR data types? a) CHAR is fixed-length, while VARCHAR is variable-length b) VARCHAR is fixed-length, while CHAR is variable-length c) They are the same d) CHAR stores numeric values, while VARCHAR stores text values 5. Which data type is appropriate for storing a large binary object? a) TEXT b) BINARY c) BLOB d) VARCHAR
  • 29.
    6. Which datatype is used for storing a large number of digits with a decimal point? a) INT b) DECIMAL c) FLOAT d) DOUBLE 7. Which data type is used for storing a true/false value? a) CHAR b) BOOLEAN c) BIT d) ENUM 8. Which data type is used for storing a fixed-length string? a) VARCHAR b) TEXT c) CHAR d) ENUM
  • 30.
    9. Which datatype is used for storing a large integer value? a) TINYINT b) BIGINT c) INT d) INTEGER 10. What is the maximum number of characters that can be stored in a TEXT column? a) 255 b) 64 c) 1024 d) Unlimited