Identity Map Pattern

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:

    An identity would seem to be arrived at by the way in which the person faces and uses his experience.
    James Baldwin (1924–1987)

    In my writing I am acting as a map maker, an explorer of psychic areas ... a cosmonaut of inner space, and I see no point in exploring areas that have already been thoroughly surveyed.
    William Burroughs (b. 1914)

    His talent was as natural as the pattern that was made by the dust on a butterfly’s wings. At one time he understood it no more than the butterfly did and he did not know when it was brushed or marred. Later he became conscious of his damaged wings and of their construction and he learned to think and could not fly any more because the love of flight was gone and he could only remember when it had been effortless.
    Ernest Hemingway (1899–1961)