Lesson 1: What is a Database?

Welcome to the first lesson of your SQL journey.

Introduction

When I first started learning coding at ThinkByByte, I was confused about where data actually lives. To handle this data efficiently, we use a DBMS (Database Management System).

In this lesson, we will understand what DBMS is, why it is needed, and how it works.

What is DBMS?

DBMS (Database Management System) is a software system that allows users to store, manage, retrieve, and modify data efficiently in a structured format.

A Real-Life Example

Imagine an organization 🏢:

  • Employee Details = Data
  • Register or Computer System = DBMS
  • Employer or Management = User

The DBMS helps management to:

  • Add new employees
  • Update employee data
  • Check employee data
  • Remove resigned/old employees' data

Why Do We Need DBMS?

In earlier days, data was stored using file systems like text files or Excel documents. This created many problems.

Problems with File Systems:

  • Duplicate Data: The same information is stored in multiple places.
  • Less Secure: Anyone with access to the file can see it.
  • Difficult Access: Searching for specific data takes a long time.
  • Inconsistent Data: Updates in one file might not reflect in another.
  • No Backup: If the file is deleted, it is gone forever.

How DBMS Helps:

  • Structured Format: Data is organized logically.
  • High Security: Only authorized users can access data.
  • Reduced Duplication: Data is stored centrally.
  • Fast Retrieval: We can find any record instantly using queries.
  • Backup & Recovery: Your data is safe even if the system crashes.

What is RDBMS?

RDBMS stands for Relational Database Management System.

An RDBMS is a type of DBMS where data is stored in the form of Tables (Rows and Columns). These tables maintain relationships between them.

Difference Between DBMS and RDBMS

DBMS RDBMS
Stores data in files or hierarchical formats Stores data only in Tables (Rows & Columns)
Relationships are not mandatory Relationships are mandatory (Primary/Foreign Keys)
Less strict structure Follows strict structure (Schema)
Example: XML, Hierarchical DB Example: MySQL, Oracle, SQL Server

Examples of RDBMS Software

Here are a few of the most commonly used RDBMS software:

  • Oracle (Widely used in large enterprises)
  • MySQL (Popular for web applications)
  • Microsoft SQL Server
  • PostgreSQL
  • SQLite (Used in mobile apps)

Summary: Advantages of DBMS

  • ✅ Improved data security
  • ✅ Easy data access to users
  • ✅ Reduced data redundancy
  • ✅ Data consistency
  • ✅ Multi-user support

Next Up: Now that we know what a database is, let's learn the language we use to talk to it.

Go to Lesson 2: Introduction to SQL & Datatypes (Coming Soon)

Comments

Popular posts from this blog

Lesson 2: Introduction to SQL

Lesson 4: SQL Constraints (Rules for Your Data).