No history yet

Introduction to Databases

A Smarter Filing Cabinet

Think of a database as a highly organized digital filing cabinet. Its job is to store information in a way that makes it easy to find, update, and manage later. While you could store lists of customers or products in a spreadsheet, you'd quickly run into problems. What happens when two people need to update the file at the same time? Or when the file gets so big it slows to a crawl? Databases solve these problems.

A database is a structured collection of data, designed for efficient storage, retrieval, and management.

They are the backbone of most modern applications. When you book a flight, check your bank account, or browse an online store, a database is working behind the scenes to serve you the correct information instantly and reliably. They ensure that data is kept safe, consistent, and accessible.

Organizing with Relationships

The most common type of database is a relational database. The concept is simple: data is organized into tables, which look a lot like spreadsheets. Each table stores information about a single, specific subject. For example, an online store might have one table for its customers, another for its products, and a third for orders.

This structure is built on three core components:

Table

noun

A collection of related data held in a structured format. Each table represents a single subject, like 'Customers' or 'Products'.

Column

noun

A vertical field in a table that contains a specific category of information for each record. It defines an attribute of the subject, like 'FirstName' or 'Price'.

Row

noun

A single record in a table, representing one specific item. It contains the data for all columns for that item.

Let's look at a simple Customers table. The table itself is the subject. The columns—CustomerID, FirstName, LastName, and Email—are the attributes we want to store about every customer. Each row is a complete record for a single, unique customer.

CustomerIDFirstNameLastNameEmail
1MariaGarciam.garcia@email.com
2ChenWeichen.wei@email.com
3SamJonessamjones@email.com

By splitting information into separate, related tables, we avoid duplicating data and keep everything much cleaner. We'll explore how these tables connect later on.

The System in Charge

So, what actually manages all these tables and ensures the data is safe and accessible? That's the job of a Relational Database Management System (RDBMS).

An RDBMS is the software used to create, manage, and interact with relational databases. It's the engine that makes the database run.

Think of the RDBMS as the librarian. It knows where every piece of information is stored, enforces the rules for how data can be added or changed, handles requests from multiple users at once, and keeps everything secure. You don't interact with the data directly; you ask the RDBMS, and it does the work for you.

Some popular examples of RDBMS software include MySQL, PostgreSQL, SQL Server, and Oracle. While they have their differences, they all operate on the same fundamental principles of relational databases.

With this foundation, you're ready to learn the language we use to communicate with these systems: SQL.