What is it exactly a BLOB in a DBMS context

2019-01-08 06:46发布

  • What is it a BLOB?
  • How can I use it?
  • What are the differences between DBMS's BLOBs. I would like to save data using BLOBs into any DBMS and then read that BLOB with a library.

8条回答
一夜七次
2楼-- · 2019-01-08 07:07

BLOB :

BLOB (Binary Large Object) is a large object data type in the database system. BLOB could store a large chunk of data, document types and even media files like audio or video files. BLOB fields allocate space only whenever the content in the field is utilized. BLOB allocates spaces in Giga Bytes.

USAGE OF BLOB :

You can write a binary large object (BLOB) to a database as either binary or character data, depending on the type of field at your data source. To write a BLOB value to your database, issue the appropriate INSERT or UPDATE statement and pass the BLOB value as an input parameter. If your BLOB is stored as text, such as a SQL Server text field, you can pass the BLOB as a string parameter. If the BLOB is stored in binary format, such as a SQL Server image field, you can pass an array of type byte as a binary parameter.

A useful link : Storing documents as BLOB in Database - Any disadvantages ?

查看更多
神经病院院长
3楼-- · 2019-01-08 07:08

any large single block of data stored in a database, such as a picture or sound file, which does not include record fields, and cannot be directly searched by the database's search engine.

查看更多
We Are One
4楼-- · 2019-01-08 07:16

I won't expand the acronym yet again... but I will add some nuance to the other definition: you can store any data in a blob regardless of other byte interpretations they may have. Text can be stored in a blob, but you would be better off with a CLOB if you have that option.

There should be no differences between BLOBS across databases in the sense that after you have saved and retrieved the data it is unchanged.... how each database achieves that is a blackbox and thankfully almost without exception irrelevant. The manner of interacting with BLOBS, however can be very different since there are no specifications in SQL standards (or standards in the specifications?) for it. Usually you will have to invoke procedures/functions to save retrieve them, and limiting any query based on the contents of a BLOB is nearly impossible if not prohibited.

Among the other stuff enumerated as binary data, you can also store binary representations of text -> character codes with a given encoding... without actually knowing or specifying the encoding used.

BLOBS are the lowest common denominators of storage formats.

查看更多
我想做一个坏孩纸
5楼-- · 2019-01-08 07:19

This may seem like a silly question, but what do you actually want to use a RDBMS for ?

If you just want to store files, then the operating system's filesystem is generally adequate. An RDBMS is generally used for structured data and (except for embedded ones like SQLite) handling concurrent manipulation of that data (locking etc). Other useful features are security (handling access to the data) and backup/recovery. In the latter, the primary advantage over a regular filesystem backup is being able to recover to a point in time between backups by applying some form of log files.

BLOBs are, as far as the database concerned, unstructured and opaque. Oracle does have some specific ORDSYS types for multi-media objects (eg images) that also have a bunch of metadata attached, and have associated methods (eg rescaling or recolouring an image).

查看更多
Emotional °昔
6楼-- · 2019-01-08 07:19

A BLOB is a Binary Large OBject. It is used to store large quantities of binary data in a database.

You can use it to store any kind of binary data that you want, includes images, video, or any other kind of binary data that you wish to store.

Different DBMSes treat BLOBs in different ways; you should read the documentation of the databases you are interested in to see how (and if) they handle BLOBs.

查看更多
一夜七次
7楼-- · 2019-01-08 07:20

In computers, a BLOB (binary large object), pronounced BLAHB and sometimes spelled in all lower case, is a large file, typically an image or sound file, that must be handled (for example, uploaded, downloaded, or stored in a database) in a special way because of its size. According to Eric Raymond, the main idea about a BLOB is that the handler of the file (for example, the database manager) has no way of understanding the file in order to figure out how to deal with it - it might as well be a large piece of coal, but there it is and now what? Other sources emphasize that the term was coined to refer to big data objects and to connote the problems they sometimes present in handling them. One application that deals with BLOBs is the database storage of large multimedia objects, such as films and television programs.

查看更多
登录 后发表回答