← Back to blog
bpdubuntu

Choosing Your Database: An Introduction to SQL vs. Document Databases

29 October 2025bpd · ubuntu

Storing Your Application’s Data

Nearly every dynamic web application needs a database to store information. The ‘Ubuntu System Administration Guide’ introduces two major categories of databases and provides installation guides for a popular choice from each: MariaDB (SQL) and MongoDB (Document).

MariaDB: The Relational SQL Database

SQL databases, like MariaDB (a community-driven fork of MySQL), store data in structured tables with predefined columns and data types. This relational model is excellent for data that has clear relationships, like users and their orders in an e-commerce store. They are known for their reliability and data integrity.

MongoDB: The Flexible Document Database

Document databases, like MongoDB, store data in flexible, JSON-like documents. There is no rigid schema, so each document can have a different structure. This makes them ideal for rapidly evolving applications, content management systems, and handling unstructured or semi-structured data.


This post is based from content of the book Ubuntu System adminstration guide. And the book can be found here https://www.amazon.com/stores/Mattias-Hemmingsson/author/B0FF5CQX13