AWS Certified Cloud Practitioner / Databases & Analytics

Databases Introduction

πŸ—„οΈ What is a Database?

AWS storage services like S3, EBS, and EFS are great for files β€” images, PDFs, videos. But they don't understand how files relate to each other.

A database goes further. It stores data in a structured way so you can:

  • Search and retrieve info fast

  • Index for quicker queries

  • Link related data together

  • Manage large volumes efficiently


πŸ“ Storage vs πŸ—„οΈ Database

File storage (S3, EBS, EFS) β€” just create, read, update, delete files. No relationships understood.

Databases β€” understand structure and relationships.

Example: an online store has a Customers table and an Orders table. The database knows Order 5001 belongs to Customer 101 (John) β€” a relationship, not just two separate files.


🧩 Types of Databases

Every database type has its own data model, strengths, and limits. The key exam skill: matching the right database to the right use case.


πŸ—ƒοΈ Relational Databases (SQL)

Think of an Excel sheet β€” rows, columns, tables. Relational databases work the same way, but let you link tables together.

Example:

  • Students table has a Department ID

  • Departments table also has Department ID

  • That shared key connects the two

You can keep linking β€” Students ↔ Subjects, and so on β€” using keys as the glue. This linking is why they're called relational.

πŸ’¬ SQL (Structured Query Language)

Used to insert, update, delete, and search data.

This query retrieves all students from the Students table.

🧠 Exam tip: See "SQL" β†’ think Relational Database.


πŸ“„ NoSQL Databases & Why use NoSQL

NoSQL = "Not Only SQL." No fixed tables β€” built for flexibility and scale.

1. πŸ”€ Flexible schema

Data can be nested (like JSON), and fields can change over time β€” no rigid table structure.

{
  "name": "John",
  "address": { "city": "Nairobi", "country": "Kenya" },
  "cars": ["Ford", "BMW"]
}

2. πŸ“ˆ Easier scaling

  • Relational DBs scale vertically β†’ bigger server

  • NoSQL scales horizontally β†’ more servers

3. ⚑ High performance

Optimized for specific workloads β€” fast, distributed, purpose-built.


πŸ”– NoSQL Flavors

Type

Icon

Best for

Key-Value

πŸ”‘

Simple lookups (User123 β†’ data)

Document

πŸ“„

JSON-style nested records

Graph

πŸ”—

Relationships (social networks, recommendations)

In-Memory

⚑

Caching, real-time speed

Search

πŸ”Ž

Logs, analytics, full-text search