Should the file name and path be stored in the database or should the image be converted into binary and stored in the database? Which method is generally used?
Should the file name and path be stored in the database or should the image be converted into binary and stored in the database? Which method is generally used?
Save the file name and path in the database.
It is best to put the images in CDN.
Usually placed on the server, data inventory path.
What application scenarios are you looking at?
Reading files is faster than reading database records, but the limitation is that it can only read local paths (of course remote files can be solved through sharing methods such as NFS). In addition, when the file size is very inconsistent (such as as small as two or three KB and as large as two or three GB), the file content must not be placed in the database.
Just save the path in the database