LOB data may be small, but it is usually large compared to other
attributes being stored (tens of kilobytes to hundreds of gigabytes or larger). The defining
characteristic of LOB data, however, is that the application has no knowledge of the
semantics of the internal structure of the data.
The canonical example is image data; a web application usually has no need to know
the data in a JPEG file representing a user??™s avatar as long as it can send it to the
client, replace it, and delete it when needed.
LOB storage is usually divided into CLOB (character large object) for text data and
BLOB (binary large object) for everything else. Some DBMSs separate the two as separate
data types. CLOB types can often be indexed, collated, and searched; BLOBs
cannot.
102 | Chapter 4: Database
Database Storage
The DBA types among us might prefer database storage of large objects. From a theoretical
standpoint, storing binary data in the database is the most clean and straightforward
solution. It offers some immediate advantages:
??? All of your application data is in the same place: the database. There is only one
interface to the data, and one program is responsible for managing the data in all
its forms.
??? You have greater flexibility with access control, which really helps when working
with large-scale projects. DBMS permitting, different permissions may be
assigned to different tables within the same database.
Pages:
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160