Data in Transit vs Data at Rest

Stored data is at rest, and data moving between places, such as over a network or from a query, is in transit.

Apprentice · General · Updated

Working with data is like working with streams of water. Software development is all about moving data from one location to another.

Data at Rest

When data is stored, it is at rest. For example, data in a database, an email saved to your computer, a CSV file, or an SMS text on your phone would all be considered data at rest.

files or data saved to a computer is data at rest

Data in Transit

When a file (or data) needs to be moved from one computer to another, it is converted to a stream and transmitted over a network to the other computer. During this transmission, the data is considered to be in transit.

data in transit from one computer to another

When we query a database, the rows come back to our program as a stream. We loop through each row in the stream until there are no more rows to process.

Once we store the data in a list, the data is no longer in transit: it is at rest.

Key terms

  • Data at Rest
  • Data in Transit