Reputation: 3760
I am looking for a database system where I can store a large document (10-20MB) and do the following:
This will be used with a web application where users will create contents in form of continuous documents (example, one document is a simplified Google doc with 100s of pages). I have thought about MongoDB, but I don't know enough about it.
-
What kind of database could I use here? (I am looking for an open-source database)
OR
If I have to write such system on my own what should be my approach and where could I start?
Thank you :)
Upvotes: 1
Views: 169
Reputation: 1357
Ive always felt uncomfortable putting files inside a database; the filesystem is the ideal database for files (you are not limited in size to what your o/s can handle), the indexing/search can be handled by a separate application and your database can be reduced to a simple table containing uri-esque links back to each actual file in your system and any other appropriate meta data.
In your case, a file indexer/search engine like lucene may be a better fit for your project than trying to use a traditional DMBS as a filesystem.
Since you are planning on putting your content into a database I am assuming you will have control over how documents are added to your system. This allows you to more easily and highly integrate your presentation layer with your filesystem data store without worrying about files being dropped, changed or removed willy nilly into your special repository.
So a very very basic high level system overview might look something like this:
[(APP) Your System]---------[(DB) Catalog ]
| \ |
| -------- |
| \ |
[(FileSystem) Files]--------[(App) Indexer]
With Your system doing all the smarts of the document maintenance and front facing searching and the Indexer monitoring the File System and updating the Catalog DB. (The Catalog may be unnecessary if your indexer ends up providing sufficient functionality or the ability to add meta data - but it might be easier to use in conjunction with the indexer if you really need to searches based on 'documents between 100 and 300')
Upvotes: 1