All,
I need to store a large amount of files(few millions) in a database and I'm not sure which technology or database use. My first idea is use mongodb or no sql dB.
Thanks
Unstructured files can be stored in the VARBINARY or IMAGE column of a SQL Server table. This approach is effective to maintain transactional consistency and reduces the file management complexity, but when the client application reads data from the SQL table, it uses SQL memory which leads to poor performance.
The large images should be stored in something like AWS S3, HDFS, a Content Delivery Network (CDN), a web server, file server or whatever else would be great a serving up large static objects, in accordance with your use case and budget.
Large objects, or "files", are easily stored in MongoDB. It is no problem to store 100MB videos in the database. This has a number of advantages over files stored in a file system. Unlike a file system, the database will have no problem dealing with millions of objects.
Reasons in favor of storing files in the database:Having the files and database in sync and able to participate in transactions can be very useful. Files go with the database and cannot be orphaned from it. Backups automatically include the file binaries.
If you want to make some queries or search by keywords into file contents, I'll recommend you ElasticSearch, also you can use Apache Solr.
If you need something more specific I would need more information
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