What is a Database?
Before you write a single SQL query, you need to understand what a database actually is and why applications use them. In this chapter we'll use everyday analogies — like a library and a spreadsheet — to make the concept click instantly, then explore the different types of databases powering the modern world.
What is a Database?
A database is an organised collection of data stored electronically so it can be easily accessed, managed, and updated. Think of it like a very smart, very fast filing cabinet — except instead of paper folders, data is stored in structured tables that a computer can search through in milliseconds.
Every app you use daily — Instagram, Google Maps, your bank's mobile app, Amazon — has one or more databases quietly storing your data behind the scenes.
Why Not Just Use Files or Spreadsheets?
A common beginner question is: "Can't I just save everything in an Excel file or a text file?" — For 10 records, yes. But real applications need much more. Here's how files compare to a proper database:
Only one person can edit at a time No protection against duplicate or bad data Searching 100,000 rows is painfully slow No user permissions — everyone sees everything Hard to link related data across sheets Data can get corrupted if file is open by two people
Thousands of users can read/write simultaneously Constraints enforce data accuracy automatically Indexes find records in millions of rows in <1 ms Role-based access control per table or column Tables link via keys — no data duplication needed Transactions guarantee data stays consistent
How Data is Stored — Tables, Rows & Columns
In a relational database (the most common type), data is stored in
tables. Each table represents one type of thing — for example,
customers, orders,
or products. A table is made up of:
id, name,
email, city.
Each column has a data type (text, number, date, etc.) that it
always holds.
customer_id.
'Priya Sharma' in the
name column of row 1.
|
customer_id
|
name | city | joined_date | |
|---|---|---|---|---|
| 1 | Priya Sharma | priya@mail.com | Vadodara | 2023-01-15 |
| 2 | Rahul Patel | rahul@mail.com | Surat | 2023-03-22 |
| 3 | Anika Desai | anika@mail.com | Ahmedabad | 2023-07-10 |
| 4 | Kiran Mehta | kiran@mail.com | Vadodara | 2024-01-05 |
What is a DBMS?
The data itself (the tables and rows) is the database. The software that manages that data — letting you store, retrieve, update, and secure it — is called a DBMS (Database Management System).
Think of it this way: the database is the warehouse full of boxes. The DBMS is the warehouse manager who knows where every box is, controls who can enter, and keeps the inventory organised.
- A collection of tables, rows, and columns
- Stores all your application's data on disk
- Organised logically by schema (structure)
- Exists even when no software is running
- Accepts SQL queries from users and apps
- Finds and returns data efficiently (using indexes)
- Enforces constraints, security, and backups
- Examples: MySQL, PostgreSQL, SQLite, Oracle
Types of Databases
Not all databases work the same way. Over the years, different types have been created for different use cases. Here are the 6 main categories you'll encounter as a developer or data professional:
Real-World Apps & Their Databases
Every application you use every day is powered by one or more databases working in the background. Here's a glimpse at how real companies store their data:
| Application | What data is stored | Database type used |
|---|---|---|
|
|
Products, customers, orders, inventory, prices | Relational (Aurora / MySQL) + NoSQL (DynamoDB) |
|
|
User profiles, photos, likes, follows, comments | Relational (PostgreSQL) + Cache (Cassandra, Redis) |
|
|
Accounts, transactions, loans, interest rates | Relational (Oracle / SQL Server) — ACID critical |
|
|
User watch history, content catalog, recommendations | Relational + NoSQL (Cassandra) + In-Memory (EVCache) |
|
|
Location data, routes, businesses, reviews, traffic | Relational + Graph + Spatial databases |
|
|
Students, courses, marks, attendance, fees | Relational (MySQL / PostgreSQL) |
|
|
Clicks, events, page views, user behaviour over time | Time-series + Cloud warehouse (BigQuery / Snowflake) |
How You Work with a Database — Step by Step
As a developer or analyst, here's the typical journey from your idea to the data:
customers,
orders, products.
In the next chapters you'll learn each of these steps in detail. As a quick preview, here's what querying a database looks like with SQL:
SELECT name, email, city
FROM customers
WHERE city = 'Vadodara'
ORDER BY name ASC;
customers table.Which of the following best describes a DBMS?
- A database is an organised collection of data stored electronically — like a smart, fast, multi-user filing cabinet.
- Databases are far superior to files and spreadsheets for real-world apps — they handle concurrent users, enforce data integrity, and search millions of rows in milliseconds.
- In a relational database, data is organised into tables (rows + columns). Each table has a primary key that uniquely identifies every row.
- A DBMS (Database Management System) is the software — like MySQL or PostgreSQL — that manages the database, executes queries, and controls access.
- There are 6 main types of databases: Relational, NoSQL/Document, Time-Series, Graph, In-Memory, and Search.
- For beginners: always start with Relational databases + SQL — it's the most widely used, most in-demand, and easiest to understand first.
Rate Us on Google
Join Our Learning Community
Connect with thousands of learners, get daily tips, ask questions and stay updated with new tutorials.