> ## Documentation Index
> Fetch the complete documentation index at: https://notes.kodekloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Course Introduction

> Introduction to relational databases, CRUD operations, schema design, SQL querying, and choosing between SQL and NoSQL with hands-on MySQL examples

Have you ever wondered how banks keep track of millions of transactions, how your favorite streaming service remembers what you watched, or how online shops instantly find the perfect product for you?

It's not magic — it's databases.

Databases power everything from hospital records to social media feeds. In this lesson we'll explain what a database truly is, why merely storing data isn't enough, and how structured data helps you answer questions, make decisions, and build smarter systems.

Hi, I'm Alan, and I'll be your guide. Together we'll explore the essential concepts behind data storage and retrieval so you can design and query databases with confidence.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/r5E5jEqYAhDWcrfY/images/Database-Fundamentals/Introduction/Course-Introduction/video-user-database-diagram-kodekloud-cat.jpg?fit=max&auto=format&n=r5E5jEqYAhDWcrfY&q=85&s=0455d57644c6b7c7af42cc67bccb2314" alt="A stylized database diagram showing &#x22;Video Records&#x22; and a &#x22;User Table&#x22; with columns (video_id, user_id, title, link, upload_date) and sample rows connected by primary/foreign keys. A person wearing a KodeKloud shirt stands to the right and a small cartoon cat appears in the top corner." width="1920" height="1080" data-path="images/Database-Fundamentals/Introduction/Course-Introduction/video-user-database-diagram-kodekloud-cat.jpg" />
</Frame>

What we'll cover first

* What a database is (beyond files and spreadsheets).
* How structure — tables, columns, and types — enables fast, reliable queries.
* Why relationships between data matter.

Next, we'll look at how databases are organized and when a spreadsheet stops being enough. Relational databases introduce tables and the structural champions of data integrity: primary keys and foreign keys. You'll learn how to read an Entity Relationship Diagram (ERD) so you can visualize how data connects behind the scenes.

Core skills you'll gain

* Reading ERDs to map real-world entities to tables.
* Designing normalized schemas.
* Performing CRUD (Create, Read, Update, Delete) operations.

<Callout icon="lightbulb" color="#1CB2FE">
  CRUD is the set of core operations you'll use in almost every database workflow. Think of it as the four basic verbs for working with data: Create new records, Read or query them, Update values, and Delete when appropriate.
</Callout>

Then comes the heart of working with data: CRUD operations. CRUD stands for Create, Read, Update, and Delete — the four essential actions you'll perform in most databases.

<Frame>
  <img src="https://mintcdn.com/kodekloud-c4ac6d9a/r5E5jEqYAhDWcrfY/images/Database-Fundamentals/Introduction/Course-Introduction/kodekloud-presenter-crud-app-service-database.jpg?fit=max&auto=format&n=r5E5jEqYAhDWcrfY&q=85&s=b9544451f085e343324dd46f309b5d10" alt="A presenter stands on the right wearing a black KodeKloud t‑shirt and speaking toward the camera. On the left is a colorful CRUD graphic with the words Create, Read, Update, Delete and three gradient boxes labeled App, Service, and Database." width="1920" height="1080" data-path="images/Database-Fundamentals/Introduction/Course-Introduction/kodekloud-presenter-crud-app-service-database.jpg" />
</Frame>

Hands-on with MySQL
You’ll get practical experience building your first relational database in MySQL and writing basic SQL queries. Below is a typical interactive session showing two simple tables and their contents:

```mysql theme={null}
mysql> SELECT * FROM users;
+---------+----------+--------------------+
| user_id | username | email              |
+---------+----------+--------------------+
|       1 | fluffy   | fluffy@email.com   |
|       2 | paws     | paws@email.com     |
+---------+----------+--------------------+
2 rows in set (0.00 sec)

mysql> SELECT * FROM videos;
+----------+---------+-------------------+---------------------------+-------------+
| video_id | user_id | title             | link                      | upload_date |
+----------+---------+-------------------+---------------------------+-------------+
|        1 |       1 | Cat Skateboard    | www.miaowtube/watch1      | 2025-05-25  |
|        2 |       2 | Epic Cat Jump     | www.miaowtube/watch2      | 2025-05-27  |
|        3 |       1 | Cat vs Curtain    | www.miaowtube/watch3      | 2025-05-29  |
+----------+---------+-------------------+---------------------------+-------------+
3 rows in set (0.00 sec)
```

Relational vs. non-relational (NoSQL)
Not all databases look or behave the same. Choosing between SQL (relational) and NoSQL (non-relational) depends on your data shape, consistency needs, and scaling goals. The table below summarizes common trade-offs:

| Resource Type | When to choose | Common examples |
| - | - | - |
| Relational (SQL) | Strong consistency, structured schemas, complex joins | `MySQL`, `PostgreSQL`, `MariaDB` |
| Non-relational (NoSQL) | Flexible schemas, horizontal scale, high write throughput | `MongoDB`, `Cassandra`, `DynamoDB` |

Common misperceptions

* NoSQL is not inherently "better" — it's optimized for different use cases.
* Relational databases can scale well with appropriate architecture and indexing.

Finding and filtering data: key SQL clauses
You’ll learn to find data efficiently using SELECT, WHERE, ORDER BY, LIMIT, and JOIN. Indexes are the secret behind fast searches — but they add write overhead and extra storage, so use them thoughtfully.

<Callout icon="warning" color="#FF6B6B">
  Indexes speed up reads but can slow writes and require additional storage. Create indexes for frequently searched columns and measure their impact with real workloads.
</Callout>

Example: find the 3 most recent videos uploaded after a date

```sql theme={null}
SELECT *
FROM videos
WHERE upload_date > '2025-06-01'
ORDER BY upload_date DESC
LIMIT 3;
```

Quick reference: common SQL clauses

| Clause | Purpose | Example |
| - | - | - |
| `SELECT` | Choose columns | `SELECT title, upload_date FROM videos` |
| `WHERE` | Filter rows | `WHERE upload_date > '2025-06-01'` |
| `ORDER BY` | Sort results | `ORDER BY upload_date DESC` |
| `LIMIT` | Restrict row count | `LIMIT 10` |
| `JOIN` | Combine tables | `JOIN users ON videos.user_id = users.user_id` |

Schema design: an example
At the end of the course you’ll design a relational schema and practice CRUD across connected tables. Here’s a basic example of creating a `customers` table in SQL:

```sql theme={null}
CREATE TABLE customers (
    customer_id INT AUTO_INCREMENT PRIMARY KEY,
    name VARCHAR(100) NOT NULL,
    email VARCHAR(255) UNIQUE NOT NULL,
    created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
```

What you’ll be able to do after this lesson

* Design normalized, maintainable relational schemas.
* Write SQL queries to read and manipulate data.
* Choose between relational and NoSQL approaches based on requirements.
* Optimize common queries with indexes and sensible schema choices.

Resources and further reading

* [Kubernetes Basics](https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/) (reference)
* [MySQL Documentation](https://dev.mysql.com/doc/)
* [PostgreSQL Documentation](https://www.postgresql.org/docs/)
* [MongoDB Documentation](https://docs.mongodb.com/)

You're not alone — at KodeKloud you'll join a global community where you can ask questions and share progress.

If you've ever wanted to turn messy data into powerful insights or simply understand the technology shaping our digital world, get ready to dive in.

<CardGroup>
  <Card title="Watch Video" icon="video" cta="Learn more" href="https://learn.kodekloud.com/user/courses/database-fundamentals/module/774d0759-f241-4acf-bf3c-3533b24824a4/lesson/af2e54d4-4a9d-4927-8903-55073ee9b51d" />
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.