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:

    During the first formative centuries of its existence, Christianity was separated from and indeed antagonistic to the state, with which it only later became involved. From the lifetime of its founder, Islam was the state, and the identity of religion and government is indelibly stamped on the memories and awareness of the faithful from their own sacred writings, history, and experience.
    Bernard Lewis, U.S. Middle Eastern specialist. Islam and the West, ch. 8, Oxford University Press (1993)

    When I had mapped the pond ... I laid a rule on the map lengthwise, and then breadthwise, and found, to my surprise, that the line of greatest length intersected the line of greatest breadth exactly at the point of greatest depth.
    Henry David Thoreau (1817–1862)

    A two-week-old infant cries an average of one and a half hours every day. This increases to approximately three hours per day when the child is about six weeks old. By the time children are twelve weeks old, their daily crying has decreased dramatically and averages less than one hour. This same basic pattern of crying is present among children from a wide range of cultures throughout the world. It appears to be wired into the nervous system of our species.
    Lawrence Kutner (20th century)