SQL Introduction

Welcome to the world of SQL! This document will introduce you to the fundamentals of relational database management systems.

What is SQL?

SQL stands for Structured Query Language. It’s the standard language for interacting with relational databases like MySQL, PostgreSQL, and SQL Server. It's used to manage and retrieve data in a structured manner.

Basic Concepts

A relational database stores data in tables, which are collections of related data. Each table represents an entity (e.g., customers, products, orders).

Rows in a table represent individual records, and columns represent the attributes of those records.

Relational Database

SQL works on relational databases, which are databases that store data in tables and maintain relationships between them.

Introduction to a Table

Let’s look at a simple table:

Example Query

Here's a simple query to select the names and ages of Alice and Bob:

SELECT Name, Age FROM Customers WHERE City = 'New York';

Name Age City
Alice 30 New York
Bob 25 Los Angeles