Reputation:
I do know that there is a answer here
But I want to know these:
I know how to save them programmatically, but I don't know what data type to save them? Could I still use image
datatype when I have converted my images as image to 256KB? Or should I save them into filestream data type?
What kind of fragmentation is the document about? In my scenario, I have 2k+ employees and counting, so that means my application would get bigger over time, If I saved the images as image, and did not followed the rules as stated by the research paper, would my images lose their intact picture? (e.g a picture with blue background somehow changes its color maybe?)
Should I save it in the exact table of my employee details table? Or should I save it in a different table?
Sorry but I did not really understand the NTFS thing, is it the RAM of my computer? Or the RAM of my server? And I am using a file server as my database, should I still convert my images or should I go with using image
data type without the conversion?
Upvotes: 0
Views: 8054
Reputation: 54417
If you want to save files of any type in SQL Server then you should use the varbinary
data type. You would use varbinary(max)
unless you know that the files will be small. You can then convert your images to a Byte
array and save that to the database.
You can enable the FILESTREAM option on your SQL Server instance these days and it will then store the data outside the main MDF file although that will be transparent to your code, so you keep using the same queries as you would otherwise.
Upvotes: 2