An application needs to store a 5MB JPEG image in a DB2 table. Which datatype should be used to specify a column that will be used for storing A image ?

  1. GRAPHIC

  2. BINARY

  3. IMAGE

  4. BLOB


Correct Option: D
Explanation:

To solve this question, the user needs to know the different datatypes that can be used to store binary data, such as images, in a DB2 table.

Now, let's go through each option and explain why it is right or wrong:

A. GRAPHIC: This datatype is used to store fixed-length character data in Unicode format. It is not appropriate for storing binary data such as images.

B. BINARY: This datatype is used to store binary data in a fixed-length format. It is a valid option for storing images, but it does not provide compression capabilities.

C. IMAGE: This datatype is used to store large objects in a compressed format. It is an option for storing images, but it is not recommended as it has been deprecated in recent versions of DB2.

D. BLOB: This datatype is used to store large binary objects in a compressed format. It is the recommended option for storing images in a DB2 table as it provides compression capabilities and can handle large objects.

Therefore, the correct answer is:

The Answer is: D. BLOB

Find more quizzes: