You should investigate how you’re storing & retrieving data. A database system is going to abstract away various things.
If you need direct control of primitives then there’s always fopen as SQLite says.