# 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 October 29, 2026

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](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/09/637dfca63efb4e96b758322ab74b6cc0.png "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](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/09/50188388b73f4902a267947cedfc791c.png "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

Source: https://www.ask-codey.com/lessons/what-is-a-stream-data-in-transit-vs-data-at-rest
