1

I imagine it is simply, as it is named, the existence of data throughout layers of a software application. I ask because I have not been able to find a clear definition that states something of the sort: Data Persistence is the existence of data throughout layers of a software application. If that exists please share the link.

I did find this link but it seems to be, at least partially, incorrect. I'm assuming that data persistence in software allows change and is accessed frequently; I'm just assuming though.

If I am correct, are there other qualities to this "data persistence" that I am leaving out.

I'm sure there are best practices and anti-patterns to data persistence. I just want to know the definition of data persistence.

  • 1
    Can you give more context? Where have you heard/seen that term being used? What is their definition of that term? In what context have you seen/heard it used? There are at least two completely unrelated uses of the term "persistence" that I can think of, and it would be beneficial to know what context the term occurred in, to know which of the two we are talking about here. – Jörg W Mittag Feb 11 '18 at 21:09
  • 1
    How much research did you do? Googling "data persistence" gives you all answers you need. – Euphoric Feb 11 '18 at 21:15
  • 4
    en.wikipedia.org/wiki/Persistence_(computer_science) "In computer science, persistence refers to the characteristic of state that outlives the process that created it. This is achieved in practice by storing the state as data in computer data storage. Programs have to transfer data to and from storage devices and have to provide mappings from the native programming-language data structures to the storage device data structures." – Euphoric Feb 11 '18 at 21:19
  • 2
    I may be overthinking this... – JohnOsborne Feb 11 '18 at 21:26
  • 2
    Data persistence is the collective set of mechanisms that allow you to save ("persist") your data somewhere before it evaporates from memory when you turn the power off. – Robert Harvey Feb 11 '18 at 21:28
4

Computing devices have memory hierarchies with varied power failure considerations. Volatile storage technologies like main memory, aka RAM, loses their value on power failure, while non-volatile storage technologies, like Disc and NVM/SSD do not. We use both technologies — RAM, despite its volatility, though because is so much faster that it offers a huge performance advantage.

The other consideration is that of process: application restart, software upgrades, etc.. These maintenance activities act almost like a controlled power failure, forcing temporary data in RAM to be reconstructed from non-volatile memory (which means that ideally, the data in RAM is written to these non-volatile memories first, during process restart).

(It is very difficult to update running code, so we use a strategy of first save as needed to disc, stop the running process, update code, restart running process, reload data from disc (modulo multiple service endpoints and such).)

Persistence is either the non-volatile storage itself: content and format, or, the act of writing new or updated RAM content back to non-volatile storage for durability.

That is not the end of the story, however; because in a disaster, we may lose even our non-volatile storage like hard drives, or even a whole data center. So, we need additional backups as per the importance of the data (i.e. even longer-term persistence strategies).

-1

Data persistence in the context of SE and computer science refers to the characteristic of state that outlives the process that created it. MyReference

In reference to this link, in the context of asp.net MVC web development data can be persisted in four ways.

  1. TempData
  2. Session State
  3. Application State
  4. Data Store

Objects in memory are data that are persisting. They are used to pass data throughout the application. Though, they probably don't exist for very long relative to storing data in a RDBMS.

  • 1
    I understand what you're saying about "data existing," but that's not how the word "persistence" is commonly used in computing, where it's used more like a verb than an adjectve. – Robert Harvey Feb 11 '18 at 22:44
  • The definition of persistence seems to support my answer. Time is relative and so all data persists for some amount of time. The keyword in my answer is essence. – JohnOsborne Feb 11 '18 at 22:50
  • No. That definition is the one used outside of computing, and it is not in dispute. But many ordinary English words are used in a different way within the context of computer science or software engineering; the commonly-accepted definition for this word within the computer science field can be found here: en.wikipedia.org/wiki/Persistence_(computer_science) – Robert Harvey Feb 11 '18 at 22:56
  • Oh yeah, sometimes I tend to take a philosophical tangent. You are correct. Thank you – JohnOsborne Feb 11 '18 at 22:57
  • 1
    @JohnOsborne: As it stands, this answer is incorrect. See comments from Robert Harvey and others which quite clearly explains what persistence means. – JacquesB Feb 12 '18 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.