Data Persistency
Subject:
Web Engineering
Presented by :
Umer Farooq
Bs-IT- (3049)
Evening -5th
University of Education okara ,Renala
Campus1
Introduction
 One of the most critical tasks that applications
have to perform is to save and restore data
 Persistence is the storage of data from
working memory so that it can be restored
when the application is run again
 The choice of persistence method is an
important part of the design of an application
University of Education okara ,Renala Campus
2
Persistence
 Persistence is the ability of data to outlive
the execution of the program that created
them.
 An obvious way of achieving persistence is to
simply save the data in a file
University of Education okara ,Renala Campus
3
Persistent Data denotes information that is infrequently
accessed and not likely to be modified.
The opposite of this is dynamic data (also known as
transactional data) where information is asynchronously
changed as further updates to the information become
available. Updates to dynamic data may come at any
time, with periods of inactivity in between.
Data Persistency
University of Education okara ,Renala Campus
4
The need for persistence
 Consider these examples
 Counting the number of “hits” on a website
 i.e. how many times does a client load your web page
source
 The questionnaire on computing experience
 Somehow your .php needs to remember previous
instances of it being requested by a client
University of Education okara ,Renala Campus
5
Persistence and HTTP
Recall http is a stateless protocol. It remembers nothing
about previous transfers
Two ways to achieve persistence:
 PHP cookies
 PHP sessions
HTTP
serverClient
Cookie
Session
6

Data-Persistency

  • 1.
    Data Persistency Subject: Web Engineering Presentedby : Umer Farooq Bs-IT- (3049) Evening -5th University of Education okara ,Renala Campus1
  • 2.
    Introduction  One ofthe most critical tasks that applications have to perform is to save and restore data  Persistence is the storage of data from working memory so that it can be restored when the application is run again  The choice of persistence method is an important part of the design of an application University of Education okara ,Renala Campus 2
  • 3.
    Persistence  Persistence isthe ability of data to outlive the execution of the program that created them.  An obvious way of achieving persistence is to simply save the data in a file University of Education okara ,Renala Campus 3
  • 4.
    Persistent Data denotesinformation that is infrequently accessed and not likely to be modified. The opposite of this is dynamic data (also known as transactional data) where information is asynchronously changed as further updates to the information become available. Updates to dynamic data may come at any time, with periods of inactivity in between. Data Persistency University of Education okara ,Renala Campus 4
  • 5.
    The need forpersistence  Consider these examples  Counting the number of “hits” on a website  i.e. how many times does a client load your web page source  The questionnaire on computing experience  Somehow your .php needs to remember previous instances of it being requested by a client University of Education okara ,Renala Campus 5
  • 6.
    Persistence and HTTP Recallhttp is a stateless protocol. It remembers nothing about previous transfers Two ways to achieve persistence:  PHP cookies  PHP sessions HTTP serverClient Cookie Session 6