DATABASES / LESSON 01
What is a Database?
Understanding databases, why they matter, and the different types available

Loading the lesson…
Loading activities…
DATABASES / LESSON 01
Understanding databases, why they matter, and the different types available

Loading the lesson…
Loading activities…
Say you're running an online store. You've got customers, products, orders and reviews piling up. Where does all of that actually live? You need somewhere reliable to keep it, find it fast and keep it safe... and that's exactly the job a database does.
A database is an organized collection of data that's easy to get to, manage and update. Think of it as a super-powered filing cabinet that never loses anything and can pull up any piece of info in milliseconds.
Quick confession before we go further. I'm not a developer. I'm an operator who came up through SEO and local marketing, so if this stuff feels foreign right now, you're in good company.
You might be thinking "can't I just save everything in a text file or a JSON file?" For a tiny project, sure. Once things get real though, files start falling apart in some pretty specific ways.
The most popular kind of database is a relational database. It stores data in tables that look a whole lot like spreadsheets.
Here's the lingo you'll keep running into.
| Database | Best For | Notes |
|---|---|---|
| PostgreSQL | Production apps, complex queries | Most popular for web apps. Free and open source. |
| MySQL | Simple web apps, WordPress | Very common, easy to start with. |
| SQLite | Mobile apps, prototypes | Stores everything in a single file. No server needed. |
Not all data fits nicely into tables. NoSQL databases give you some more flexible options.
Your app talks to the database through a connection. Here's how a single request flows through it.
Somebody clicks "Sign Up" on your website.
Your app sends a SQL command to the database that basically says "insert this new user."
The database checks the data, stores it and confirms it worked.
Your app tells the user "Account created successfully!" (and they never see any of the plumbing behind it).
Now that you know what a database is and why it matters, it's time to learn the language you use to talk to one. That language is SQL, and in the next lesson you'll write your very first queries to pull data out of a database...