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:

    There is a terrible blindness in the love that wants only to accommodate. It’s not only to do with omissions and half-truths. It implants a lack of being in the speaker and robs the self of an identity without which it is impossible for one to grow close to another.
    Alexander Theroux (b. 1940)

    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 (1909–1995)

    It may be tempting to focus on the fact that, even among those who support equality, men’s involvement as fathers remains a far distance from what most women want and most children need. Yet it is also important to acknowledge how far and how fast many men have moved towards a pattern that not long ago virtually all men considered anathema.
    Katherine Gerson (20th century)