Solved

Should heavy binary files not be stored in database?

Posted on 2013-01-28
2
201 Views
Last Modified: 2013-01-30
I was asked an interesting question: Should a database contains all data? Or heavy binary files should be stored in file system?

Example of heavy binary files : videos or heavy pdf files (+200 MB)

With an old aspx web app (1.1) I tried to open a 200MB pdf file stored as a blob in an Oracle 11g database, and it just couldn't do it.

However, same asp.net web application had no problem to open same pdf file stored in file system of a server.  It could be that maybe there is some proper way to open heavy blobs fields with asp.net.

For integrity reasons, I say that all data should be stored in database, but my described case showed me that maybe it's not the way.

I read once that if your web application goes to cloud, then it would be very difficult to keep references of files stored in file system (file paths like: ../MyFolder001/MyFile.mpg), since you don't know where those files will be distributed.

What do yo think?
0
Comment
Question by:miyahira
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 77

Accepted Solution

by:
slightwv (䄆 Netminder) earned 500 total points
ID: 38828416
I'm with you on the integrity issue.  That is why my vote is to store things in a database.

It is also an integrity issue for backup and recovery.  If things are stored externally, you need some process to ensure you have everytihng you need in some consistant manner.

>>With an old aspx web app (1.1) I tried to open a 200MB pdf file stored as a blob in an Oracle 11g database, and it just couldn't do it.

What happened?  Did it generate an error, catch fire, ???

My guess is it ran into a memory issue.

Personally I've never tried to bring a file that large across a .Net app but I don't see why it would have an issue.  Biggest we've ever done here is in the 20 to 30 meg size.

Worst case, create a tmp file from inside the code to store it on the web server, then use it?

check out: Path.GetTempFileName
http://msdn.microsoft.com/en-us/library/system.io.path.gettempfilename(v=vs.71).aspx
0
 
LVL 16

Expert Comment

by:Kamal Khaleefa
ID: 38829884
Hi

"SQL Server 2008’s new FILESTREAM support combines the benefit of accessing LOBs directly from the NTFS file system with the referential integrity and ease of access offered by the SQL Server relational database engine."

also see these url about storing files in sql DB VS FileSystem
http://www.dofactory.com/topic/1379/best-practice-store-images-in-db-or-on-file-system.aspx

http://webmasters.stackexchange.com/questions/940/serving-images-out-of-sql-server-vs-file-system-vs-s3-etc
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question