What is a Database?
A database is an organized collection of data. SQL is the language used to talk to databases — create tables, insert data, and retrieve information. This is a foundational concept in database management and queries that professional developers rely on daily. The explanations below are written to be beginner-friendly while covering the depth and nuance that comes from real-world SQL experience. Take your time with each section and practice the examples
What is a Database?
A database is an organized collection of structured data stored electronically. Think of it like a very powerful spreadsheet. Databases are used everywhere: websites store user accounts, banks store transactions, hospitals store patient records. SQL (Structured Query Language) is the standard language used to create, read, update, and delete data in a database.
Key Database Concepts
- Table — Like a spreadsheet with rows and columns
- Row (Record) — One entry in a table (e.g., one user)
- Column (Field) — A category of data (e.g., name, age, email)
- Primary Key — A unique ID for each row (e.g., user_id)
- SQL — The language used to query and manage databases
- RDBMS — Relational Database Management System (MySQL, PostgreSQL, SQLite)
A Simple Database Table
-- This is what a database table looks like:
-- Table: students
-- | id | name | age | city |
-- |----|---------|-----|-----------|
-- | 1 | Alice | 20 | Mumbai |
-- | 2 | Bob | 22 | Delhi |
-- | 3 | Charlie | 19 | Bangalore |
-- | 4 | Diana | 21 | Mumbai |
-- SQL to get all students:
SELECT * FROM students;
-- SQL to get just names:
SELECT name FROM students;