I'm developing a Postgres-backed system, in which many binary files will be stored.
I have at least 2 choices:
What criteria do I need to consider to make the best possible decision?
Do not store files in a database. Everyone, without exception, that can run any RDBMS on the market already has a database specifically for storing files, and the RDBMS itself is using it! That database is the filesystem.
PostgreSQL provides two distinct ways to store binary data. Binary data can be stored in a table using the data type bytea or by using the Large Object feature which stores the binary data in a separate table in a special format and refers to that table by storing a value of type oid in your table.
Computer systems are designed to process data. In order to do so, computers use electronic circuits that function as switches that can be turned on or off. We use a binary form to represent these two states: A 0 represents when a switch is off.
I would consider the following:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With