Storage of large files in Databases
There are two common solutions to manage large-sized files with relational databases:
Solution 1: When BLOB fields are used, the disadvantage is poor performance. The backup of BLOB fields is also a problem.
Solution 2: files are still managed by the operating system, and the database only stores file paths as indexes. You need to maintain synchronization independently.
Microsoft has issued a research report and conducted a comparative test on SQL Server 2005 and NTFS file systems. The impact of File Size on performance is less than 256 kb and blob is good, it is better to use a file system for storage larger than 1 MB.
Regarding solution 2, database vendors also provide support on the Database End, which can be seen as the third solution:
ORACLE: Use the bfile data type. For bfile usage, see application developer's Guide-large objects (lobs) in the Oracle official document.
SQL Server 2008: Use the varbinary (max) type with the filestream option.
Oracle does not know which version to start to support bfile. I have certainly supported oracle9.2 In the experiment. sqlserver2005 does not support the filestream option of varbinary (max.
Reference
Oracle lob Introduction
Use large objects in. net
Getting traction with SQL Server 2008 filestream
To blob or not to BLOB: Large Object Storage in a database or a filesystem?