Citizendia
Your Ad Here

This article is about the Identity Map software design pattern. For the mathematical concept, see Identity function. In Mathematics, an identity function, also called identity map or identity transformation, is a function that always returns the same value that

An identity map is a database access design pattern used to improve performance by providing a context-specific in-memory cache to prevent duplicate retrieval of the same object data from the database. In Software engineering, a design pattern is a general reusable solution to a commonly occurring problem in Software design. In Computer science, a cache (kæʃ like "cash") is a collection of data duplicating original [1]

If the requested data has already been loaded from the database, the identity map returns the same instance of the already instantiated object, but if it has not been loaded yet, it loads it and stores the new object in the map. In this way, it follows a similar principle to lazy loading. Lazy loading is a design pattern commonly used in computer programming to defer initialization of an object until the point at which it is needed

Four types of Identity Map

 1. Explicit
 2. Generic
 3. Session
 4. Class

See also

References

  1. ^ Fowler, Martin (2003). In Software engineering, a design pattern is a general reusable solution to a commonly occurring problem in Software design. In Computer science, the active record pattern is a design pattern frequently found in software that stores its data in Relational databases It was named Lazy loading is a design pattern commonly used in computer programming to defer initialization of an object until the point at which it is needed Patterns of Enterprise Application Architecture. Addison-Wesley, 195-199. ISBN 0321127420.  

© 2009 citizendia.org; parts available under the terms of GNU Free Documentation License, from http://en.wikipedia.org
Dapyx Software network: MP3 Explorer | Ebook Manager | Zenithic