Introduction to MySQL

1. Why Do We Need a Database?

Before learning MySQL, it is important to understand the problem it is meant to solve.

In earlier days, data was commonly stored using notebooks, Excel sheets, or simple text files. This method works only when the amount of data is small and used by very few people. As data grows and more users start accessing it, file-based storage becomes difficult to manage.

Some common problems with file-based storage are:

  • The same data may be stored multiple times, which leads to duplication
  • Searching and updating data becomes slow and confusing
  • There is no proper security for sensitive information
  • Multiple users cannot safely access the same data at the same time
  • Files can be accidentally deleted or corrupted

To handle large amounts of data in a safe, organised, and efficient way, databases are used.


2. What Is a Database?

A database is an organised collection of data that is stored in a structured way so that it can be easily accessed, updated, and managed when required. Instead of keeping data scattered across different files, a database stores related data in one place while maintaining proper structure.

A database helps to:

  • Store data in an organised manner
  • Search data quickly
  • Update data easily
  • Keep data secure
  • Allow multiple users to access data at the same time

Real-life examples of databases

System

Type of Data Stored

College management system

Student records, marks, and attendance

Banking system

Account details, transactions

Social media platform

Users, posts, comments

Online shopping website

Products, orders, customers

In all these systems, large amounts of data must be stored reliably and safely.


3. From Database to DBMS

A database by itself is not very useful unless there is a system to manage it properly. This system is called a Database Management System (DBMS).

A DBMS acts as an interface between users and the database and provides tools to work with the data safely and efficiently.

A DBMS allows us to:

  • Create and manage databases
  • Insert, update, and delete data
  • Control who can access the data
  • Maintain data accuracy and consistency

Without a DBMS, managing a database would be difficult and unsafe.


4. MySQL Is an RDBMS

MySQL is a Relational Database Management System (RDBMS).

This means MySQL is software used to store, manage, and retrieve data in accordance with the rules of a relational database system. It does not store data randomly in files. Instead, it stores data in a structured and organised form that can be easily accessed by applications.

To understand MySQL clearly, we must first understand what an RDBMS is.


5. What Is an RDBMS?

An RDBMS (Relational Database Management System) is a type of DBMS that stores data in the form of tables.

In an RDBMS:

  • Data is stored in tables
  • Tables contain rows and columns
  • Each row represents one complete record
  • Each column represents a specific attribute of the data

Image

The key feature of an RDBMS is that tables can be related to each other using common columns. These relationships help organise data properly and reduce unnecessary duplication.


6. Why Is MySQL Called a Relational Database?

MySQL follows the RDBMS model, which means it stores data in tables and allows relationships between those tables.

Example table:

id

name

branch

1

Asha

EE

2

Ravi

CSE

  • Each row represents one student record
  • Each column represents a specific piece of information

When data in one table is connected to data in another table using a common field, a relationship is formed. Because MySQL supports and manages these relationships, it is called a relational database.


7. DBMS vs RDBMS vs MySQL

These terms are often confusing for beginners, so the difference must be clear.

Term

Meaning

DBMS

General concept of managing databases

RDBMS

A DBMS that stores data in tables and supports relationships

MySQL

Software that implements the RDBMS concept

DBMS and RDBMS are concepts, while MySQL is the actual tool used in real systems.


8. Where Is MySQL Used?

MySQL is widely used in applications where structured data storage is required, such as:

  • Websites and web applications
  • College and office management systems
  • Banking and financial systems
  • Online shopping platforms
  • Backend systems for mobile and web applications

Many applications rely on MySQL in the background to store and manage their data.


9. How Does MySQL Store Data? (High-Level View)

At a basic level, MySQL stores data in tables, and this data is saved permanently on disk so that it remains available even after the system is turned off. The data inside tables is organised into rows and columns, which makes it easier to manage and retrieve information.

At this stage, it is not necessary to understand SQL commands or internal processing.


10. MySQL Environment Overview

In a typical setup:

  • A MySQL server stores and manages the database
  • A client tool or application sends requests to the server
  • The server processes the request and returns the result

This client–server interaction forms the basic working model of MySQL.


Summary

  • File-based data storage becomes difficult to manage as data grows and multiple users need access.
  • A database helps store data in an organised, secure, and structured way.
  • A Database Management System (DBMS) is used to manage databases and control how data is stored and accessed.
  • MySQL is a Relational Database Management System (RDBMS).
  • An RDBMS stores data in tables made of rows and columns and allows relationships between tables.
  • MySQL follows the relational model and is widely used in real-world applications.