The Blob Data Type

There are varying data types that exist in the world of programming. Common data types include: strings, integers, floats, characters, booleans. All of these data types can be used along with tables and data to create rich and expressive databases for …

There are varying data types that exist in the world of programming. Common data types include: strings, integers, floats, characters, booleans. All of these data types can be used along with tables and data to create rich and expressive databases for web apps. But what can developers do if they would like to use images, video, or audio?

ENTER type:blob

Image description

A blob data type is used for storing information in databases just like a string or an integer. However, blobs can store binary data which allows for the storage of files. Images, videos and audio can then be stored in databases as blobs.

The term “blob” actually stands for “Binary Large Object” and is used for storing information, as binary, in databases.

Through the use of blobs, common social media features such as photo albums can be constructed where a photo album table would contain photos:blob and photo_caption:string.

Because blobs are used to store objects such as images, audio files, and video clips, they often require significantly more space than other data types. The amount of data a blob can store varies depending on the database type, but some databases allow blob sizes of several gigabytes.

Example

{
  "data" : {
    "image": "/9j/4AAQSkZJRgABAQEAYABgAAD//gA7Q1JFQVRPUjogZ2===",
  },
  "time": <Optional Timestamp>,
  "flowVersion": <Optional Workflow Version Name>
}

Image description

How to record and play audio in JavaScript:

https://medium.com/@bryanjenningz/how-to-record-and-play-audio-in-javascript-faa1b2b3e49b

How can I get the blob file (i.e recorder voice) to send the server:

https://github.com/mattdiamond/Recorderjs/issues/188

Image description

Sources:
https://techterms.com/definition/blob
https://en.wikipedia.org/wiki/Binary_large_object
https://docs.losant.com/devices/blobs/


Print Share Comment Cite Upload Translate
APA
Ian Iversen | Sciencx (2024-03-29T13:42:39+00:00) » The Blob Data Type. Retrieved from https://www.scien.cx/2022/09/12/the-blob-data-type/.
MLA
" » The Blob Data Type." Ian Iversen | Sciencx - Monday September 12, 2022, https://www.scien.cx/2022/09/12/the-blob-data-type/
HARVARD
Ian Iversen | Sciencx Monday September 12, 2022 » The Blob Data Type., viewed 2024-03-29T13:42:39+00:00,<https://www.scien.cx/2022/09/12/the-blob-data-type/>
VANCOUVER
Ian Iversen | Sciencx - » The Blob Data Type. [Internet]. [Accessed 2024-03-29T13:42:39+00:00]. Available from: https://www.scien.cx/2022/09/12/the-blob-data-type/
CHICAGO
" » The Blob Data Type." Ian Iversen | Sciencx - Accessed 2024-03-29T13:42:39+00:00. https://www.scien.cx/2022/09/12/the-blob-data-type/
IEEE
" » The Blob Data Type." Ian Iversen | Sciencx [Online]. Available: https://www.scien.cx/2022/09/12/the-blob-data-type/. [Accessed: 2024-03-29T13:42:39+00:00]
rf:citation
» The Blob Data Type | Ian Iversen | Sciencx | https://www.scien.cx/2022/09/12/the-blob-data-type/ | 2024-03-29T13:42:39+00:00
https://github.com/addpipe/simple-recorderjs-demo