Databases store organized data that software can search and update quickly. Database management systems (DBMS) are the software that operates them. Two main families exist, which are relational databases with linked tables and NoSQL databases with flexible formats. Spreadsheets suit small lists while databases suit large shared data. Most websites and apps depend on one.
You use databases every day without noticing. Logging in, searching a shop, sending a message and checking a balance all send a query to a database.
What is a Database?
Databases store information in a structured way so people and software can find and update it fast. Contacts in a notebook work until you need to search, sort or share them with an app. Databases solve that with a format built for fast, reliable access.
Database management system software (DBMS) manages every database. MySQL, PostgreSQL, Oracle and MongoDB are all DBMS products. Your DBMS acts as the engine for the data in your database.
Relational databases organize data into tables of rows and columns. Every row is one record and every column is one field, like a name or a city.
| ID | Name | City |
|---|---|---|
| 101 | Maya Rao | Pune |
| 102 | Leo Park | Austin |
What are the Main Types of Databases?
Two families account for most databases you will meet. They differ in how they store data.
What is a Relational Database?
Relational databases store data in tables and link the tables to one another. Your Customers table can link to an Orders table through a shared ID. That link answers questions like which orders one customer placed.
You query a relational database with SQL, which stands for Structured Query Language. ISO publishes SQL as ISO/IEC 9075 and the PostgreSQL documentation states that PostgreSQL implements a large part of that standard.
Relational databases suit structured data where consistency matters, like banking, inventory and bookings. MySQL, PostgreSQL, Oracle and Microsoft SQL Server are common examples.
What is a NoSQL Database?
NoSQL stands for not only SQL. NoSQL databases trade some of the fixed structure of tables for flexibility and scale. They store data as documents, key value pairs, wide columns or graphs.
NoSQL suits data that changes shape or arrives in huge volumes, like social feeds, real time analytics and large content libraries. MongoDB stores documents, Redis stores key value pairs and Cassandra stores wide columns.
Graph databases store connections between items. Time series databases store timestamped readings. See SQL vs NoSQL to choose between the two families.
Compare the two families on four points in the table.
| Point | Relational (SQL) | NoSQL |
|---|---|---|
| Data shape | Fixed tables, rows and columns | Flexible formats like documents, key value pairs and graphs |
| Query language | SQL | Varies by database |
| Best for | Structured, consistent data | Unstructured data and massive scale |
| Examples | MySQL, PostgreSQL, Oracle | MongoDB, Redis, Cassandra |
Where do You See Databases in Daily Life?
Four everyday services show databases at work.
- Online shopping stores product catalogs, prices, stock levels and your order history in databases that answer queries in real time.
- Banking apps store your balance and every transaction in a relational database where accuracy is required.
- Social media stores posts, likes and connections in databases built for huge volumes.
- Streaming services store what you watched and your watchlist, then use that data for recommendations.
How do Apps Use a Database?
Your app sends a request to a server when you tap a button. That server sends a query to a database, receives the answer and shows it to you.
Well designed databases make the difference between quick apps and slow ones.
Damaged or corrupted databases need data recovery to bring their data back, which is why backups matter as much here as anywhere else. See how to recover data from an SSD or hard drive for the storage side.
Frequently Asked Questions
What is the Difference Between a Database and a Spreadsheet?
Spreadsheets work best for flat, single table data that you analyze by hand. Databases store structured data in related tables so many users can update records at the same time. Microsoft guidance says Excel suits calculations and analysis and Access suits managing and organizing data. Many people use both.
What does SQL Mean?
SQL stands for Structured Query Language. SQL is the standard language for asking questions of a relational database and for changing its data, like finding all customers in a city or adding a new order. ISO publishes it as ISO/IEC 9075.
Is a Relational or NoSQL Database Better?
Neither is better in every case. Relational databases suit structured data where accuracy and relationships matter, like finance. NoSQL databases suit flexible data and massive scale, like social feeds. Many large systems use both.
Is a Database the Same as a DBMS?
No. Databases are collections of data. DBMS software manages that data. MySQL and PostgreSQL are examples of DBMS software.
Do You Need to Code to Use a Database?
No, not to use a database through an app. You use databases through apps every day without code. Building or querying a database directly takes SQL or a database tool. Some no code tools offer a visual interface.
What are Examples of Database Software?
Relational examples include MySQL, PostgreSQL, Oracle and Microsoft SQL Server. NoSQL examples include MongoDB, Redis and Cassandra. Your data, your scale and your team decide the right choice.
Where is a Database Stored?
Databases live on disks inside servers. Those servers can sit in a company office or in a cloud provider's data center. For storage basics, see what cloud storage is and how it works.
Key Takeaways
- Databases are organized collections of data that software can access fast.
- DBMS software manages a database and answers its queries.
- Relational databases use linked tables and suit structured data where consistency matters.
- NoSQL databases use flexible formats and suit huge or changing data.
- Most apps and websites depend on a database working behind the scenes.
Sources and References
This explainer draws on official documentation from Microsoft, ISO and the PostgreSQL project.
- What Is PostgreSQL? (PostgreSQL documentation) www.postgresql.org
- ISO/IEC 9075-1 SQL Framework www.iso.org
- Using Access or Excel to Manage Your Data support.microsoft.com
- Describe Concepts of Relational Data learn.microsoft.com