Best Ways to Implement Data Persistence for a Small Project

0
10
Asked By CuriousCoder84 On

I'm working on a project where I need to track various aspects like project name, start time, end time, and current state (which could be not started, running, or complete). Each project has multiple runs, and I want to keep track of their states, including start, stop, and elapsed time. I'm considering using a JSON file for data persistence. Does anyone have suggestions on how to best approach this?

4 Answers

Answered By TechExplorer77 On

In one of my projects, I just saved a JSON file in the user’s home directory. Once loaded, it functions as a custom PowerShell object where each property corresponds to a value I want to keep track of.

Answered By SimplicitySeeker94 On

It really comes down to what you expect for your project's future. For local scripts, I usually stick with CSV or JSON. Don't overthink it unless you know scalability will be an issue later on.

Answered By DataDabbler22 On

You might want to check out using export-clixml and import-clixml to save and load your state objects. It’s a straightforward approach if you’re after simplicity.

Answered By SQLWizard42 On

I personally write everything to an external SQL server. It's a bit overkill, but I have easy access since I'm a DBA. If you're looking for something simpler locally, CSV could also be a good option alongside JSON.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.