There are two broad types. Relational databases (like PostgreSQL and MySQL) store data in structured tables with clear relationships, ideal for orders, users, and anything that must stay consistent. Non-relational databases (like MongoDB) store flexible documents, useful when the shape of the data varies.
You rarely see the database directly. The backend talks to it and sends the results to the page. Choosing and structuring it well early matters, because a messy data model is one of the hardest things to fix once a product is live.
Updated July 2026