hi every one,

Iam desiging a small project with .net 2( and C#),enterprise lib, oracle.

i am using entity and entity collections in my data access layer along with entity libraries.

my goal is to convert the static tables of my database table in to static entity collection with an unique key and load it in to the application memory when the application is started.

the idea behind it is to make my application faster instead of accessing it to database for static tables alone.

the problem i faced is how to design this how to load the data in memory.iam expecting your ideas regarding this.


Re: Architecture General need guidlines or ideas- data model


I probably can't help you figure out how to do this because I don't beleive you can make it work unless you have a very small database and only one user. If that's the case, you are probably better off just building a big object collection and serializing it to disk when you're done. I you want to load the whole table into memory you will have to take an exclusive table lock on the table to ensure nobody else can change it and invalidate the copy you have in memory. You also have to keep in mind that your in-memory collection won't have all the indexing and query procesing that a database has so you may find that if your collection is very large, the database might actually be faster. If you can live with only accessing one record at a time and only through one key, a hash table might give you decent query performance. You might want to look at the Enterprise Library caching stuff to see if it come close to what you need.

Re: Architecture General need guidlines or ideas- data model

Arnon Rotem Gal Oz

Building an efficient in-memory database is not an easy task
You can either go with 3rd party solutions - Oracle which you are already using has TimesTen
However since you said "small" project it might be an overkill.
Other solutions you may want to look at are NCache ( or GigaSpaces (

What kind of performance requirements are you looking at