# Storing a value in text format\_ using local pc as database

**URL:** https://discourse.nodered.org/t/storing-a-value-in-text-format-using-local-pc-as-database/78777
**Category:** General
**Tags:** function-node
**Created:** [29 May 2023 09:58 UTC](https://discourse.nodered.org/t/storing-a-value-in-text-format-using-local-pc-as-database/78777 "2023-05-29T09:58:59Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)
#### Post date: [29 May 2023 10:53 UTC](https://discourse.nodered.org/t/storing-a-value-in-text-format-using-local-pc-as-database/78777/8 "2023-05-29T10:53:45Z")

</div>

> [@colin0031](#):
>
> Since its only one number, I would like to store it in text formal using write node.

I am a fan of using databases for data storage. However, it would be ridiculous to install a database to store just one number.

> [@jbudd](#):
>
> Have you read up on persistent context?

> [@colin0031](#):
>
> Yes, its storing value into variables isnt it. I want to store restored even if the pc got restarted.
> 
> I believe context value will be erased when node red stopped.

No, you believe wrong.  
[This forum post](https://discourse.nodered.org/t/a-guide-to-understanding-persistent-context/4115) might better explain persistent context, though it is 4 years old.

---

_[View the full topic](https://discourse.nodered.org/t/storing-a-value-in-text-format-using-local-pc-as-database/78777)._
