A starting point for anyone learning databases for the first time. It covers why databases are needed, how relational (RDBMS), NoSQL, and vector DBs differ, table design and normalization, how indexes and transactions work, how to choose between Oracle, MySQL, PostgreSQL, and MongoDB, and a learning roadmap from SQL basics to operations and tuning.
Beginner
Updated Oct 1, 2026
~8 min read
12 sections
1 code examples
🧭
The big picture of DB conceptsChoosing RDBMS vs NoSQLTable design basicsUnderstanding indexes and transactionsDB learning order
Understanding DB Intro & Roadmap as a real-world workflow
A starting point for anyone learning databases for the first time. It covers why databases are needed, how relational (RDBMS), NoSQL, and vector DBs differ, table design and normalization, how indexes and transactions work, how to choose between Oracle, MySQL, PostgreSQL, and MongoDB, and a learning roadmap from SQL basics to operations and tuning. Rather than listing concepts, this guide is organized so you can follow the content in the order you have to make decisions on a real project.
Key perspective
Databases
Alongside query syntax, look at schema design, indexes, transactions, permissions, and backups from an operations perspective.
The big picture of DB conceptsChoosing RDBMS vs NoSQLTable design basicsUnderstanding indexes and transactionsDB learning order
Architecture diagrams
To make what you read stick, it helps to capture the flow as a picture first. The two diagrams below are reference maps you can keep coming back to while learning DB Intro & Roadmap.
Learning flow
Rendering diagram…
Architecture view
Rendering diagram…
Why databases are needed
When you first open DB Intro & Roadmap, the big picture matters more than individual commands. This section starts with the problems the concepts ahead were created to solve.
Could you not just store data in a spreadsheet or a file? With one user, that is fine. But it is a different story when thousands of people place orders at the same time, the data must not disappear even if the server suddenly goes down, and you have to find the row you want among hundreds of millions within 0.01 seconds.
A database (DBMS) is software that has evolved over decades to solve exactly these problems — concurrency, durability, consistency, fast search, and security. Because a large share of backend performance problems end up being DB problems, the DB is an essential skill for every server developer.
Requirement
File storage
Database
Concurrent edits
Data lost to overwrites
Handled safely with locks and transactions
Crash recovery
The file is corrupted if power is lost mid-write
Log-based recovery keeps it consistent
Search speed
Everything has to be read from the start
Found immediately through an index
Data rules
Wrong values are stored as-is
Blocked by constraints (NOT NULL, UNIQUE, FK)
Permissions
Per file
Per table, row, and column
Map of DB types: relational · NoSQL · special purpose
Map of DB types: relational · NoSQL · special purpose is a point where the options diverge. Using the table to compare what each approach is for and how it differs in operation makes later decisions much easier.
The days of picking just one of "SQL vs NoSQL" are over. Real services mostly keep a relational DB at the center and use purpose-fit DBs alongside it.
How to choose a product: Oracle · MySQL · PostgreSQL · MongoDB
How to choose a product: Oracle · MySQL · PostgreSQL · MongoDB is a point where the options diverge. Using the table to compare what each approach is for and how it differs in operation makes later decisions much easier.
Unless there is a specific reason otherwise, PostgreSQL is the safest choice for a new project. Relational features, JSON storage, and even vector search (pgvector) are all covered by one DB. If you are aiming at finance or the public sector, Oracle experience helps.
Product
Traits
Where it is mostly used
Guide
Oracle
Commercial, top-tier features and stability, high cost
Finance, public sector, large enterprise legacy systems
Table design basics: entities, relationships, normalization is a point where the options diverge. Using the table to compare what each approach is for and how it differs in operation makes later decisions much easier.
Good table design starts with "not storing the same information in two places". If the member name is also stored in the orders table, a name change has to be applied in both places, and missing one leaves the data inconsistent. The process of splitting data into tables by subject to prevent this is called normalization.
Relationship
Example
How to implement
1:1
Member ↔ detailed member profile
The PK of one side as a UNIQUE FK on the other table
1:N
One member ↔ many orders
A member FK on the N side (orders) table
N:M
Orders ↔ products (many products in one order, one product in many orders)
Split out a join table (order items)
Your first SQL: create tables and query them
Here you look at Your first SQL: create tables and query them alongside real code. Rather than copying the example as-is, read it with an eye on the inputs, the outputs, and the parts most likely to change.
SQL is a language where you declare "what" you want, not "how". The example below creates member and order tables and totals the order amount per member. With just JOIN and GROUP BY you can write more than half of real-world queries.
first.sqlSQL
CREATE TABLE members ( id BIGSERIAL PRIMARY KEY, email VARCHAR(255) NOT NULL UNIQUE, name VARCHAR(100) NOT NULL, created_at TIMESTAMP NOT NULL DEFAULT now());CREATE TABLE orders ( id BIGSERIAL PRIMARY KEY, member_id BIGINT NOT NULL REFERENCES members(id), -- 1:N relationship amount INTEGER NOT NULL CHECK (amount > 0), ordered_at TIMESTAMP NOT NULL DEFAULT now());CREATE INDEX idx_orders_member ON orders(member_id); -- JOIN and lookup performanceINSERT INTO members (email, name) VALUES ('kim@example.com', 'Dev Kim'), ('lee@example.com', 'DB Lee');INSERT INTO orders (member_id, amount) VALUES (1, 30000), (1, 12000), (2, 8000);-- Order count and total per member (biggest spenders first)SELECT m.name, COUNT(o.id) AS order_count, SUM(o.amount) AS totalFROM members mJOIN orders o ON o.member_id = m.idGROUP BY m.id, m.nameORDER BY total DESC;
Indexes and transactions: the two pillars of a DB
Indexes and transactions: the two pillars of a DB is a point where the options diverge. Using the table to compare what each approach is for and how it differs in operation makes later decisions much easier.
An index is like the index of a book. Just as finding a word without one means paging through the whole book, without an index the DB reads the whole table (Full Scan). On the other hand, indexes cost write performance and storage, so create them only for conditions you query often.
A transaction is a unit that groups operations which must succeed or fail together, such as "withdraw from account A + deposit to account B". The four properties that guarantee this are called ACID.
ACID
Meaning
Example
Atomicity
Everything succeeds or everything is rolled back
A withdrawal never happens without the deposit
Consistency
Constraints always hold
A balance never goes negative
Isolation
Concurrent transactions do not interfere with each other
Two people cannot buy the last item in stock at once
Durability
Committed data survives failures
The order is kept even if the server dies right after commit
Operations basics: backup, permissions, monitoring is a point where the options diverge. Using the table to compare what each approach is for and how it differs in operation makes later decisions much easier.
A backup only means something once "you have restored from it". Include a regular rehearsal of actually restoring from backup in your operating procedures.
Area
What to do
If you miss it
Backup
Regular full backups + log backups, recovery rehearsals
Permanent data loss in an incident
Permissions
Application accounts get only the tables and privileges they need
The whole DB leaks if you are breached
Connection management
Tune the connection pool size, clean up idle connections
Service outage from connection exhaustion
Slow queries
Collect the slow query log and improve regularly
DB overload as traffic grows
Replication
Read-only replicas, failover on incident
A single point of failure
Schema changes
Version them with a migration tool, change large tables online
Table locks in production
Before you start
Before you start is a point where the options diverge. Using the table to compare what each approach is for and how it differs in operation makes later decisions much easier.
Databases are a field you can start learning with no programming experience. SQL reads much like English sentences, so many people in non-developer roles (product, marketing, data analysis) learn it too.
Step-by-step roadmap: from SQL basics to operations and tuning
Step-by-step roadmap: from SQL basics to operations and tuning is a point where the options diverge. Using the table to compare what each approach is for and how it differs in operation makes later decisions much easier.
Step
Goal
What to learn
Guides
Done check
0. SQL basics
Query and modify data
SELECT, WHERE, JOIN, GROUP BY, INSERT/UPDATE/DELETE
8-week study plan: 1 hour a day is a point where the options diverge. Using the table to compare what each approach is for and how it differs in operation makes later decisions much easier.
If you need practice data, load a CSV from an open data portal such as data.gov into your DB. Real data has missing values, duplicates, and format errors, which makes it good practice.
Week
Topic
Deliverable
Week 1
SELECT, WHERE, ORDER BY, functions
30 practice queries on a sample DB
Week 2
JOIN, GROUP BY, subqueries
Sales analysis report queries
Week 3
Table design, normalization, constraints
An online shop ERD + DDL
Week 4
Indexes and execution plans
Compare before and after an index on 100,000 rows
Week 5
Transactions and isolation levels
A concurrent order scenario experiment
Week 6
MongoDB · Redis
Redesign the same data as a document model
Week 7
Vector DB
Semantic document search with pgvector
Week 8
Backup, permissions, monitoring
A backup recovery rehearsal + an operations checklist
Common mistakes of DB beginners
Common mistakes of DB beginners is a point where the options diverge. Using the table to compare what each approach is for and how it differs in operation makes later decisions much easier.
UPDATE/DELETE without WHERE in particular is a classic accident that even experienced developers cause. For any work on a production DB, always open a transaction and check the number of affected rows before you commit.
Mistake
Problem
Do this instead
The SELECT * habit
Unneeded data transferred, weaker index use
Name only the columns you need
UPDATE/DELETE without WHERE
Every row changed or deleted
Check the target with SELECT first, inside a transaction
An index on every column
Slower writes, wasted space
Choose based on real query patterns
Applying a function to an indexed column
The index cannot be used
Transform the value side of the condition, not the column side
Assembling SQL from strings
SQL injection
Parameter binding
Skipping foreign keys and constraints
Orphaned data, wrong values pile up
Enforce the rules at the DB level
Experimenting directly on the production DB
Service incident
Use a replica or a staging environment
Key terms
Key terms is a point where the options diverge. Using the table to compare what each approach is for and how it differs in operation makes later decisions much easier.
Term
One-line explanation
PK (primary key)
The column that uniquely identifies each row
FK (foreign key)
A column that references the PK of another table to form a relationship
The design process of splitting tables to remove duplication
Execution plan
The plan the DB makes for the order and method of processing a query
Isolation level
The setting for how much data concurrent transactions can see of each other
Deadlock
Two transactions stuck waiting for each other to release a lock
Replica
A read-only copy replicated from the primary DB
Sharding
Horizontal partitioning that spreads data across several DB servers
DB Intro & Roadmap: frequently asked questions
Where should I start studying databases?
Start with relational databases and SQL. Table design, joins, indexes, and transactions are common to every product and are the baseline for understanding other kinds of databases. Then learn one real product (PostgreSQL or MySQL) and widen out to document or vector databases as needed.
Should I choose a relational database or NoSQL?
For ordinary business data where relationships between records matter and consistency is required, a relational database is the default. Choose a NoSQL store that matches when the access pattern is clear: document-shaped data whose structure changes often, simple lookups at very large scale, or caching. Many services use both, each for its purpose.
Should I choose PostgreSQL or MySQL?
Both are enough for most services. PostgreSQL has strong standard SQL support and rich extensions such as JSON, full-text search, and vector search, and MySQL has a great deal of operational experience, tooling, and people who know it. If the team already knows one, using that is the safest choice.