# CSV vs Database Decision

CSV should not be used as the live online database for PSP Radar.

## Why not CSV as live database

CSV has no safe support for:

- multiple admins editing at the same time
- transactions / rollback
- permissions per record
- audit log integrity
- relationships between providers, applications, complaints, ads and users
- reliable search / filtering at scale
- file locking on cloud deployments
- secure image/file handling

Using CSV online can easily cause overwritten data or corrupted files when two users submit or approve records at the same time.

## Recommended approach

### Production / online shared system

Use PostgreSQL.

```text
Browser → Backend API → PostgreSQL
```

### Very small single-server internal tool

SQLite can be considered, but only if there is one server and low concurrency.

### CSV

Use CSV only for:

- export
- import
- backup
- reporting
- manual review outside the system

