Copyright

Persistence in Databases: Definition, Examples & Importance

Lesson Transcript
Instructor: Vignesh Sivabalan

Viignesh has an MS in information technology.

Persistence in databases refers to the ways in which processes or objects can continue on, or remain, even when systems are shut down. Learn more about the definition of persistence and explore two types of persistence in databases: object persistence and process persistence. Then, discover the importance of persistent data and consider some examples of persistent databases. Updated: 01/25/2022

Definition of Persistence

Persistence denotes a process or an object that continues to exist even after its parent process or object ceases, or the system that runs it is turned off. When a created process needs persistence, non-volatile storage, including a hard disk, is used instead of volatile memory like RAM.

For example, imagine that you're using the Chrome browser on the Windows operating system and, due to some technical issues, the browser process was shut down or killed. The browser restarts the next time you open it and attempts to reopen any tabs that were open when it crashed. A persistent process thus exists even if it failed or was killed for some technical reasons. The persistent state is the state that remains even after a process shuts down. Persistent process states are stored in persistent storage (non-volatile storage like hard drives) before the system fails or shuts down. They're easily retrieved once the system is turned on. The core processes of the operating system must be persistent for maintaining the data, device, or workspace in a similar state when the system is switched on.

An error occurred trying to load this video.

Try refreshing the page, or contact customer support.

Coming up next: Two-Phased Locking, Releasing Locks & Deadlocks in Databases

You're on a roll. Keep up the good work!

Take Quiz Watch Next Lesson
 Replay
Your next lesson will play in 10 seconds
  • 0:04 Definition of Persistence
  • 1:14 Types of Persistence
  • 1:57 Object Persistence in…
  • 2:46 Persistent Data: Importance
  • 4:06 Persistent Databases: Examples
  • 6:38 Lesson Summary
Save Save Save

Want to watch this again later?

Log in or sign up to add this lesson to a Custom Course.

Log in or Sign up

Timeline
Autoplay
Autoplay
Speed Speed

Types of Persistence

There are two types of persistence: object persistence and process persistence. In data terms, object persistence refers to an object that is not deleted until a need emerges to remove it from the memory. Some database models provide mechanisms for storing persistent data in the form of objects. In process persistence, processes are not killed or shut down by other processes and exist until the user kills them. For example, all of the core processes of a computer system are persistent for enabling the proper functioning of the system. Persistent processes are stored in non-volatile memory. They do not need special databases like persistent objects.

Object Persistence in Databases

A persistent database stores persistent data in the form of objects, or records that are durable when changing devices and software. Persistent data is stable and recoverable. Traditional relational database management systems (RDBMS) store persistent data in the form of records and tables. However, they cannot store objects and their relationships. Objects have necessary features (like encapsulation, inheritance, persistence, and polymorphism) that do not translate well into records and tables. Thus, certain special databases like object-oriented database management systems (OODBMS) and object relational database management systems (ORDBMS) are needed for storing objects and preserving object persistence.

Persistent Data: Importance

Persistent data is important for several reasons. For example:

  1. Persistent data is static and does not change with time (not dynamic).
  2. Persistent data stores core information. For example, an organization's financial data must be persistent.
  3. Persistent data cannot be deleted by external processes or objects until the user deletes it, meaning it's stable.
  4. Persistent data is time independent data. The data created by an application or object continues to exist even after the parent application or object has been deleted and remains accessible beyond object boundaries, other processes, or transactions.
  5. Persistent data remains in its original format. If data resides in volatile memory, it's deleted once the process is closed. However, persistent data stored in persistent databases, or non-volatile storage, continues to reside there even after closing the program.
  6. Persistent data is non-volatile in nature and can withstand power outages.
  7. Persistent data is recoverable data even after a system restarts or shuts down.
  8. Persistent data changes cannot be lost and will always be available for access.

Persistent Databases: Examples

Data manipulated in a database can be persistent or transient. The transient data inside a program or transaction will be lost once its parent program or transaction terminates. Persistent data exists beyond the lifetime of its parent program or transaction and is capable of surviving transaction updates. Persistent databases are typically updated and accessed across several transactions.

To unlock this lesson you must be a Study.com Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use Study.com

Become a Study.com member and start learning now.
Become a Member  Back
What teachers are saying about Study.com
Try it now
Create an account to start this course today
Used by over 30 million students worldwide
Create an account