Chapter 6. Storing data
This chapter covers
- In-memory storage with structs
- File storage with CSV and gob binary files
- Relational database storage with SQL
- Go and SQL mappers
We introduced data persistence in chapter 2, briefly touching on how to persist data into a relational database, PostgreSQL. In this chapter we’ll delve deeper into data persistence and talk about how you can store data in memory, files, relational databases, and NoSQL databases.
Data persistence is technically not part of web application programming, but it’s often considered the third pillar of any web application—the other two pillars are templates and handlers. This is because most web applications need to store data in one form or another.
I’m generalizing ...
Get Go Web Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.