Database Reference
In-Depth Information
Figure 13—Turn on the external record flag.
Small Binary Data
Anything smaller than 100 kilobytes is considered to be small binary data.
Icons or small avatars are a couple examples of data of this size. When
working with something this small, it is most efficient to store it directly as
a property value in its corresponding table. The performance impact of binary
data this size is negligible. The transformable attribute type is ideal for this
use.
Medium Binary Data
Medium binary data is anything larger than 100 kilobytes and smaller than
1 megabyte in size. Average-sized images and small audio clips are a few
examples of data in this size range. Data of this size can also be stored
directly in the repository. However, the data should be stored in its own table
on the other end of a relationship with the primary tables. This allows the
binary data to remain a fault until it is actually needed. In the previous recipe
example, even though the Recipe entity would be loaded into memory for dis-
play, the image would be loaded only when it is needed by the UI.
SQLite has shown itself to be quite efficient at disk access. There are cases
where loading data from the SQLite store can actually be faster than direct
disk access. This is one of the reasons why medium binary data can be stored
directly in the repository.
Large Binary Data
Large binary data is anything greater than 1 megabyte in size. Large images,
audio files, and video files are just some examples of data of this size. Any
 
 
 
Search WWH ::




Custom Search