No history yet

Introduction to Databases

What Is a Database?

Think of a massive, old-school library. It has thousands of books, all organized on shelves. If you want to find a specific book, you don't wander aimlessly. You use the card catalog, which tells you exactly where to look. The library is a system for storing and retrieving information.

A database is a digital version of this. It's an organized collection of data, stored electronically. Its purpose is simple but powerful: to store, manage, and retrieve information quickly and efficiently. Every time you log into a social media account, check your bank balance, or buy something online, you're interacting with a database.

A database is just a structured collection of data. Its job is to make that data easy to access, manage, and update.

Relational Databases

There are different ways to organize data. One of the most common and powerful methods is the relational model. A database that uses this model is called a relational database.

The software used to manage these databases is called a Relational Database Management System, or RDBMS. You might have heard of some popular ones, like MySQL, PostgreSQL, and SQL Server. These systems are the gatekeepers of the data.

The key idea behind the relational model is that data is stored in separate tables, but those tables can be linked, or related, to each other. For example, a store's database might have one table for customers and another for orders. By creating a relationship between them, the database knows which customer placed which order.

The Building Blocks

Relational databases are built with a few simple components. If you've ever used a spreadsheet, these will feel familiar.

Table

noun

A collection of related data entries organized in rows and columns. A database usually contains multiple tables. Each table is designed to hold information about a single subject, like 'Customers' or 'Products'.

A table is like a single sheet in a spreadsheet file. For example, an online bookstore might have a Books table.

Column

noun

A vertical field in a table that contains all information of one specific type. Each column has a name, like 'FirstName' or 'Price'.

Columns define the attributes of the items in a table. In our Books table, we might have columns for Title, Author, and Genre.

Row

noun

A single record or entry in a table. It represents a complete set of information for one item.

Each row is a unique record. In the Books table, one row would represent one specific book, with its own title, author, and genre.

TitleAuthorGenre
The HobbitJ.R.R. TolkienFantasy
DuneFrank HerbertSci-Fi
A Brief History of TimeStephen HawkingNon-Fiction

This structure is the foundation of a relational database. It keeps data organized, prevents duplication, and makes it incredibly efficient to search, sort, and combine information. In the articles that follow, you'll learn how to use a language called SQL to communicate with these databases to perform all sorts of useful tasks.

Let's check your understanding of these core concepts.

Quiz Questions 1/5

What is the primary purpose of a database?

Quiz Questions 2/5

In a relational database, what is the key idea that allows different sets of data to be linked together?

Understanding this basic structure is the first step toward mastering data management.