Reputation: 6244
I want to save files into a database in my C# Windows application. What database technology should/could I use?
I want to be able to save files and open saved files with my application.
Upvotes: 1
Views: 1535
Reputation: 754348
If you're dealing with Microsoft SQL Server, there's a really interesting performance comparison done by Microsoft Research:
Their conclusion basically is:
FILESTREAM
feature in SQL Server 2008)And if you should ever need to store a file larger than 2 GB, storing it in the filesystem is your only choice, really. So that might also be a deciding factor.
Upvotes: 7
Reputation: 45761
Storing actual files into the database is probably not the best approach as there's somewhere designed to store files and do it well already, it's called the file system :)
That said, if you can use Sql Server, you could take a look at FILESTREAM storage as it's a sort-of midpoint between the two.
Upvotes: 3
Reputation: 5499
Look at this page. There is a example of open a file and save..
so you can implement your own code for saving it to a database?
if you wanna save text i would recommand to use a SQL server or Oracle database, ive learned to program c# and SQL server but learned the theory of Oracle
Upvotes: 0
Reputation: 917
Most modern databases will allow you to save binary data in them. ie in SQL server you have blob type where you can store any binary data you like.
Upvotes: 0