devxlogo

Binary File Support in SQL

Binary File Support in SQL

Question:
I have been asked to develop a database of imagery from a company’s slide collection that needs to be incorporated into a Web site. Does SQL support binary files? I would prefer to use another format apart from CGI. The database will consist of approximately 2,000 images, complete with descriptions, etc.

I need a database format that will be able to search for images in a binary format, such as .GIF, .JPEG, and video clips. (I have some knowledge of SQL, am proficient in HTML, and am moderate at JavaScript.)

Answer:
SQL does support storing binary large objects. As your question indicates, there are a couple of things to decide up front, such as do you put the whole picture into the database or use a pointer to a location that holds the picture instead?

Frankly, I’ve come to hate stuff in the database that I don’t think belongs there, such as images, documents, and even text. In my opinion, pointers are much better, although I have done systems with text partitioned into one-to-one relations with the supporting data record.

See also  Why ChatGPT Is So Important Today
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist