Back to Hosting Glossary

What is a Database?

A database is an organized collection of data stored electronically so software can quickly find, add, and update it. Websites and applications rely on databases to hold structured information such as customer records, product catalogs, and blog posts, usually managed through a database management system like MySQL that answers queries and keeps the data consistent.

More About Databases

Tables, records, and fields

Relational databases, the kind almost every web host runs, organize data into tables of rows and columns, a bit like folders holding files. Each row in a table is a record, and each record is split into fields. A field holds one type of value: text, numbers, or dates.

A nested diagram showing how a database contains tables, each table is a grid of rows and columns, one highlighted row is a record, and one highlighted cell within that row is a field holding a single value. It shows that fields sit inside records, records inside tables, and tables inside the database.

WordPress makes this concrete. Every post has one main record in a table called wp_posts, and its fields hold real values: ID might be 42, post_title "Hello world!", and post_date the date you published it. When you edit the post, the record's post_modified field gets the new date while post_date keeps the original. WordPress also stores each saved update as a revision record in the same table, so earlier versions can be restored, and keeps extra details about the post in a related table, wp_postmeta.

Relational vs. non-relational databases

Not every database uses tables, and the split is worth knowing before you pick software:

  • Relational (SQL) databases store data in related tables and answer questions written in SQL, the Structured Query Language. MySQL, MariaDB, and PostgreSQL are the common choices.
  • Non-relational (NoSQL) databases store data as documents, key-value pairs, wide columns, or graphs instead. MongoDB and Redis are well-known examples, built for large volumes of loosely structured data.

The decision rule is short: a typical website on a hosting account, WordPress included, uses a relational database. Reach for NoSQL only when your application specifically calls for it.

Database management systems

The software that stores the data and answers queries is a database management system (DBMS). Your code never digs through the database's files directly. Instead, an application written in a language like PHP or Java sends the DBMS a query, and the DBMS returns the matching records.

On web servers, the systems you'll actually meet are MySQL, MariaDB, PostgreSQL, and SQLite. MariaDB is a MySQL-compatible fork, but the two have diverged over the years, so how compatible they are depends on the versions and features your application uses. Desktop tools such as Microsoft Access and Claris FileMaker fill the same role for small, local projects.

How your website uses a database

Most dynamic websites keep their content in a database. WordPress stores posts, pages, comments, users, and settings in MariaDB or MySQL, then builds each page from queries against those tables. The official requirements recommend MariaDB 10.11 or later, or MySQL 8.0 or later; WordPress still runs on MySQL 5.5.5 and up, but those versions have reached end of life and put your site's security at risk.

The connection details (database name, username, password, and host) live in your site's wp-config.php file. If you move hosts or rename the database, that's the file to update.

Managing a database on your hosting account

You create a database from your hosting control panel, then manage it through phpMyAdmin, a browser-based tool for browsing tables, running queries, and exporting a copy of your data. The panel also shows which database software your server runs; check the database version against the requirements above before you install anything. And before you change live tables, take a backup. A mistyped query has no undo.

Frequently Asked Questions

No. A spreadsheet suits small, single-user datasets and quick calculations. A database enforces structure with defined field types, serves many users and applications at once, and scales to millions of records. If a website or application needs the data, use a database.
WordPress can't reach its database, so it can't build any page. The usual causes are wrong credentials in wp-config.php or a database server that's down. Check the credentials first, then ask your host whether the server is running, and keep current backups so a corrupted database isn't fatal.
No. A static site is plain HTML files and needs no database. Most content management systems, online stores, and forums keep their content in one. Some dynamic sites build pages from files or external services instead, so check what your platform actually requires.
Special Offer

Web Hosting

Our Web Hosting plans offer a user-friendly interface and flexible options to fit your needs, with a 30-Day Money-Back Guarantee.

Web Hosting Plans