In the design of database management systems, the identity map pattern 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.
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.
There are four types of Identity Map
- Explicit
- Generic
- Session
- Class
Famous quotes containing the words identity, map and/or pattern:
“Unlike Boswell, whose Journals record a long and unrewarded search for a self, Johnson possessed a formidable one. His life in Londonhe arrived twenty-five years earlier than Boswellturned out to be a long defense of the values of Augustan humanism against the pressures of other possibilities. In contrast to Boswell, Johnson possesses an identity not because he has gone in search of one, but because of his allegiance to a set of assumptions that he regards as objectively true.”
—Jeffrey Hart (b. 1930)
“Unless, governor, teacher inspector, visitor,
This map becomes their window and these windows
That open on their lives like crouching tombs
Break, O break open,”
—Stephen Spender (19091995)
“In almost every marriage there is a selfish and an unselfish partner. A pattern is set up and soon becomes inflexible, of one person always making the demands and one person always giving way.”
—Iris Murdoch (b. 1919)