Subscribe to our blog

Your email:

Follow Me

Database Intelligence: Interpreting Database Technology

Current Articles | RSS Feed RSS Feed

Storing documents in a MongoDB database instead of the file system.

  
  
  
  

Cambridge LibraryWe are currently working on an application that uses a mysql database. The application produces a large number of csv files that must be kept around for a few weeks, and then removed after being used in various ways by the users of the system. 

We need to keep track of all of these files and present a list of the files to the user so they can download them to their local machine, or send them to other systems as needed.  We need to track when the file was created, who created it, and other information. 

We considered a few alternatives for managing these files;  We could keep then on the file system and have scripts that keep the database synchoronized with the file system. Or we could load each file into a blob type and keep it in the mysql database. Either of these options will work fine if we are careful. But we are seeking something more.

Our research led us to MongoDB. An open source document oriented database.

MongoDB claims to bridge the gap between key-value stores which are typically used by high volume web applications that have simple data storage requirements, and traditional RDBMS database systems. 

In addition to simple queries based on key-value pairs, you can use boolean expressions, regular expressions, set operations, and sorting and limiting. MongoDB also has the ability to grab documents directly from the file system using its gridFS functionality. 

We have not implemented MongoDB for this project yet but it looks very promising.  

I will send updates as we get closer. 

Comments

Glad you're looking into MongoDB! Let us know if you have any questions as you continue evaluating it.
Posted @ Friday, July 09, 2010 3:21 PM by Mike Dirolf
Did you actually end up using Mongo? Curious to hear your findings...
Posted @ Friday, January 14, 2011 4:11 PM by Yoav Shapira
I have not had the need to use it yet so I dont have any follow up. Are you planning to use it for something? I would be interested to hear what you are considering it for.
Posted @ Saturday, January 15, 2011 11:54 AM by Robert Buda
We use it for one of the free Grader.com tools, to store some data in an intermediate data store before we do further analysis. It's been good. But relatively small scale / low requirements. 
Posted @ Saturday, January 15, 2011 4:06 PM by Yoav Shapira
Post Comment
Name
 *
Email
 *
Website (optional)
Comment
 *

Allowed tags: <a> link, <b> bold, <i> italics