getting to know my databases, at some point in my application the user would be able to upload a photo (or photos). My friend told me that using filenames would be better as opposed to a blob of text. Should I use varchar or varbinary for this?
Also if the user would upload more pictures (lets say max would be 10) would it be better to create a table for the pictures and a connecting one such as userspictures or would it be better to store all the pictures in a string that would be separated by commas or something to that effect?
Help is really appreciated thanks.
As your friend said, it’s better to store only the filename in the database.
I would suggest
VARCHAR(255).I really recommend you to create another table for multiple files: