# Storing and Accessing Binary Data

> As explained in the C API base data types page, for dynamic fields, such as `string, vector, sequence, blob` or `optional struct` fields, a reference pointer is stored in the data layout for the objects of this class, and the actual object data is stored separately and retrieved via this reference address when the object is accessed. Especially for persistent databases, this can lead to performance considerations as additional disk IO is incurred.

> For example, it can be expected that execution using short `blob` fields will be slower than the performance of fixed length character fields due to the fact that the data is stored separately. For this reason, it is recommended to use `blob` fields only for large data fields (greater than 1 Kb). When a field is not intended to be used in indexes and its data size is less than 64 Kb it is recommended to use the `string` data type. Alternatively, particularly if a field containing binary data is intended to be indexed, the `binary` or `varbinary` data type should be used.

> To display binary data stored in `blob` or `string` fields in query results, normally base64 encoding is recommended.

> Examples of binary data usage can be found in the Binary Data section of the eXtremeSQL Structures, Arrays and Strings in C++ page.