No history yet

Introduction to Databases

Databases Everywhere

Think of a massive, old-school library. It has thousands of books, all organized on shelves by genre and author. If you want to find a specific book, you don't wander aimlessly. You use the library's catalog system to find exactly where it is. A database is like that library, but for digital information. It's a structured system for storing, managing, and retrieving data.

You interact with databases constantly, even if you don't realize it. When you log into an app, a database checks your username and password. When you shop online, a database tracks inventory and your shopping cart. They are the invisible backbone of almost every modern application, making sure data is kept safe, organized, and accessible.

At its core, a database is simply an organized collection of data, designed for easy access and management.

Keeping It All in Relation

There are many types of databases, but the most common is the relational database. The software used to manage them is called a Relational Database Management System, or RDBMS. Popular examples include MySQL, PostgreSQL, and SQL Server.

What makes it "relational"? The data is organized into tables that can be linked, or related, to each other. Imagine your phone's contact list. You have a list of people. You might also have a separate list of their phone numbers and another for their email addresses. In a relational database, these lists would be connected, so you can easily see that a specific name, number, and email all belong to the same person.

Relational Database Management Systems (RDBMS) store data in tables with rows and columns and establish relationships between these tables using keys (e.g., primary keys and foreign keys).

The Building Blocks

Relational databases have a simple and powerful structure, much like a spreadsheet. This structure consists of three key components: tables, columns, and rows.

Table

noun

A collection of related data held in a structured format within a database. It consists of columns and rows.

A table is a collection of data about a specific topic, like Customers or Products. Each table has a name that describes the information it holds.

Each table is made up of columns (also called fields or attributes). A column represents a specific piece of information. For a Customers table, the columns might be CustomerID, FirstName, LastName, and Email.

Finally, we have rows (also called records or tuples). A row is a single entry in the table. It contains the actual data for one item. For example, one row in our Customers table would contain the ID, first name, last name, and email for a single customer.

This simple, organized structure is what makes relational databases so reliable and widely used. By breaking data down into tables, columns, and rows, we create a logical and efficient way to handle vast amounts of information.

Quiz Questions 1/5

What is the primary purpose of a database?

Quiz Questions 2/5

In a relational database, what is the term for a single entry in a table, like the information for one specific customer?

Now that you understand the basic building blocks, you're ready to learn how to communicate with a database to get the information you need.