Store HashTable in a database

G

Guest

Is it possible to store objects like HashTables in a database? How do I do
this?

The method I was thinking of is:
1. Serialize the HashTable.
2. Store the serialized data in XML.
3. To access the object, we deserialize the data and cast into HashTable.

Any suggestions to make this process more efficient would be appreciated.

Thanks
 
S

Sahil Malik

Yes it is possible. Also, there is no need to do XML, you could
binaryserialize the hashtable and save it as a blob instead (probably more
efficient).
The success of this whole thing obviously depends on the ISerializable
implementations of the objects you have thrown inside your HashTable.

Though I must say, I am almost of the inclination of storing them as memory
mapped files with unique filenames, and storing the filenames in the d/b.
That'd probably be better for the database. You might run into issues if
this operation is happening on a webfarm.

- Sahil Malik
http://dotnetjunkies.com/weblog/sahilmalik
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top