Hive: Persisting Video

Created on 26 May 2020  路  4Comments  路  Source: hivedb/hive

I'm testing Hive to store some videos in Flutter. It is ok to use Hive for that purpose?

question

Most helpful comment

I think storing video in any type of database is not good idea. Instead of storing video itself in db you can save video to device memory with some filename and store filename alongside other details (eg: length, name, thumbnail url or filename,...) in hive db.

https://softwareengineering.stackexchange.com/questions/150669/is-it-a-bad-practice-to-store-large-files-10-mb-in-a-database

All 4 comments

I think storing video in any type of database is not good idea. Instead of storing video itself in db you can save video to device memory with some filename and store filename alongside other details (eg: length, name, thumbnail url or filename,...) in hive db.

https://softwareengineering.stackexchange.com/questions/150669/is-it-a-bad-practice-to-store-large-files-10-mb-in-a-database

@TheMisir I agree. Unless the database handles objects (byte array of video) different, it is not a good idea to store them in the database.

I was thinking of implementing this in the new Hive version because I often see people using Hive for caching data and storing files.

@TheMisir @leisim Thanks guys, i ended up saving the file in device memory then saving its name inside an object in hive. I was considering using hive, because of its encryption box. I do not want the files being accessed elsewhere, but storing the hole file was not a good practice indeed.

You can encrypt files yourself and store filenames in db.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MyoLinOo picture MyoLinOo  路  3Comments

NourEldinShobier picture NourEldinShobier  路  3Comments

cachapa picture cachapa  路  4Comments

kthecoder picture kthecoder  路  3Comments

jamesdixon picture jamesdixon  路  3Comments