DaveJ
DaveJ

Reputation: 65

Most efficient way to store large base64 strings?

I'm creating an REST API that stores most of the user information within a PostgreSQL database, but I'm looking for an efficient and scalable way to store user image data.

My initial thought was to utilize a NoSQL database (MongoDB in this instance) to store base64 image strings and have the data parsed within my web application.

I'm wondering if there is any database out there that is designed for this specific purpose, or would there be a more efficient solution?

Upvotes: 0

Views: 413

Answers (2)

William Xifaras
William Xifaras

Reputation: 5312

If you are not too picky about databases, a suggestion is to use SQL Server which supports FileStream storage.

The advantage of this is that you still get all the transactional support that comes with SQL Server. It also backs up the data along with everything else.

https://msdn.microsoft.com/en-us/library/gg471497.aspx

Upvotes: 0

reaanb
reaanb

Reputation: 10066

I suggest you decode the images and store them in the filesystem with autogenerated file names. Then record the file names and any facts about the images in your PostgreSQL database.

Upvotes: 1

Related Questions