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:
“Having an identity at work separate from an identity at home means that the work role can help absorb some of the emotional shock of domestic distress. Even a mediocre performance at the office can help a person repair self-esteem damaged in domestic battles.”
—Faye J. Crosby (20th century)
“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)
“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)