Chapter 01 of 76 min read
Database Architecture & Table Schemas
Understand databases, tables, columns, rows, primary keys, and relational schema.
What is a Relational Database (RDBMS)?
MySQL is a relational database management system that organizes data into tables consisting of columns and rows. Tables can reference one another using primary keys and foreign keys.
MySQL Example • Chapter 01
-- 1. Create Students Table Schema
CREATE TABLE students (
id INTEGER PRIMARY KEY,
name VARCHAR(100) NOT NULL,
email VARCHAR(100) UNIQUE NOT NULL,
course VARCHAR(100),
enrolled_date DATE
);
-- 2. Insert Initial Records
INSERT INTO students (id, name, email, course, enrolled_date) VALUES
(1, 'Ankit Baruah', 'ankit@example.com', 'Web Dev with AI', '2026-01-15'),
(2, 'Dimple Kalita', 'dimple@example.com', 'Flutter Mobile Apps', '2026-02-01'),
(3, 'Manash Sharma', 'manash@example.com', 'Digital Marketing', '2026-02-10');
-- 3. View All Students
SELECT * FROM students;💡 Click "Try in Editor" to run, edit, and experiment with this code in our live split-view environment.100% Live Preview
Key Concepts • Chapter 01
- •A PRIMARY KEY uniquely identifies each record in a table.
- •NOT NULL prevents empty values in mandatory fields.
- •UNIQUE constraint prevents duplicate entries (e.g. emails).
🎯 Chapter Practice Challenge
Insert a 4th student record with your name and email.