Respuesta :

Answer:

  • There can be string data type and numeric data type to declare the attribute and specify the type of value that can be contained by a column.
  • For example VARCHAR, CHAR etc are examples of commonly used string data types that can hold alphanumeric characters and also special characters.
  • INT, FLOAT, DECIMAL, etc are examples of numeric data types that can hold numerical values. For example you would not want to use numeric data type for name attribute of person entity.
  • However it might be better to declare an attribute that contains only digits as a string data type as character data type can also hold digits.
  • For example a social security number attribute can be declared as character data type instead of numeric data type. Although a social security number only consists of digits but it can be declared as a character data type because there is no need of performing any mathematical operations on a social security number. It is just a combination of digits and it might not need to be subtracted, added, multiplied etc.
  • Another example can be of a phone number. It also is a combination of digits but again there is no need to perform mathematical functions over a phone number attribute. But as we know there are different area codes for different countries, so there might be a need of adding or removing an area code with a phone number. So it is appropriate to declare such an attribute as a character data type.