Which of the following data types is best suited to store a person's full name in a database?
Think about what kind of information a name contains.
Names are made up of letters and sometimes spaces, so a text or string data type is appropriate.
What is the most suitable data type to store a person's age in a database?
Age is a whole number without decimals.
Age is a whole number, so integer is the best choice.
You want to create a database table to store employee records including their ID, name, date of birth, and employment status (active or inactive). Which data types should you assign to each field?
Consider what kind of data each field holds.
Employee ID is a number, name is text, date of birth is a date, and employment status is true or false (Boolean).
Which data type is most appropriate for storing product prices in a database to avoid rounding errors?
Think about precision and accuracy for money values.
Decimal data type stores exact numbers with fixed decimal points, avoiding rounding errors common with floats.
You have a database field that needs to store either a number or the word 'unknown' when the number is not available. Which data type should you choose?
Consider the need to store both numbers and words in the same field.
Since the field must hold both numbers and text, a text/string data type is necessary to accommodate all values.