Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Persistent Binary Tree / Hash table in .Net [closed]

Tags:

I need a pure .Net persistent hashtable/binarytree, functionally similar to berkeley-db Java edition.

Functionally it should opperate in a similar maner to a DHT such memcached and velocity etc but it doesn't have to be distributed. In essence I am looking for a persistent hashtable.

Does anyone have any ideas or suggestions?

A similar question is also here: Looking for a simple standalone persistent dictionary implementation in C#

Paul

like image 951
Kinlan Avatar asked Sep 20 '08 15:09

Kinlan


People also ask

What is a persistent hash table?

Persistent Hash Table, (persistent transposition table) a form of long-term memory, to remember "important" nodes from earlier analyzed positions or played games with its exact score and depth, in order to avoid repeating unsuccessful book lines.

What is the disadvantage of BST over the hash table?

Explanation: Hashing with separate chaining has a disadvantage that it takes more space. This space is used for storing elements in case of a collision. 4.

What is the advantage and disadvantage of Binarysearchtree over Hashtable data structures?

Binary Search Trees are generally memory-efficient since they do not reserve more memory than they need to. On the other hand, Hash tables can be a bit more demanding if we don't know the exact number of elements we want to store.

In what situations would a Hashtable be better than a binary search tree and in what situations would a binary search tree be better than a Hashtable?

If the input size is not known to you in advance, then use the Hash Table. Range Search: If you want to perform range search i.e. searching some key in between some keys, then you should go with Binary Search Tree because, in Binary Search Tree, you ignore that subtree which is impossible to have the answer.


2 Answers

How about this? SourceForge.net: Berkeley DB for .NET

like image 168
Omer van Kloeten Avatar answered Sep 30 '22 18:09

Omer van Kloeten


You might consider the Caching Application Block or System.Web.Caching. Both have methods for connecting them to a SQL Server database as the backing store.

The other method would be to simply serialize the object using a XML or Binary Formatter. (which can be used for deep cloning by the way)

like image 28
oglester Avatar answered Sep 30 '22 19:09

oglester