views:

29

answers:

1

Hi

Is there any specifications (online resources ) avaialbe for DB file system development. Like how the data file is organized and algorithms used for traversal, indexing.

Am in a task to build a system to handle the operations like storing and retrieving the documents(JSON) in a custom file structure..

I know there are No-SQL alternatives like CouchDB & mongoDB available, But my requirement is simple and its just storing & retrieval (no querying) and wanted to do it in .Net.

Cheers

+2  A: 

Usually, databases use the B-tree data structure, plus a paging mechanism to handle space acquisition efficiently. But that's a complex task and you can leave all that hard work to a well
tested engine, like SQLite.

Anyway, 2 simple ad hoc methods:

  1. Keep records sorted in a file, so you'll be able to use binary search.
  2. Use one file with data records and a separate index file, with record offsets.
Nick D
@Nick D, thansk for the suggestion.. There is a c# SQL lite port is available in http://code.google.com/p/csharp-sqlite/.. i ll check out the B-tree implementations...
Ramesh Vel