#5 Database For web developers, the database is the core of web development. You can save almost anything in database, query and update data, like user information, products or news list.
Go doesn't have any driver for database, but it does have a driver interface defined in package database/sql
, people can develop database drivers based on that interface. In section 5.1, we are going to talk about database driver interface design in Go; in sections 5.2 to 5.4, I will introduce some SQL database drivers to you; in section 5.5, I'll show the ORM that I developed which is based on database/sql
interface standard, it compatible with most of drivers that implemented database/sql
interface, and easy to access database in Go code style.
NoSQL is a hot topic in recent years, more websites decide to use NoSQL database as their main database instead of just for cache usage. I will introduce two NoSQL database which are MongoDB and Redis to you in section 5.6.
##Links
- Directory
- Previous Chapter: Chapter 4 Summary
- Next section: database/sql interface