MySQL RDBMS

MySQL Tutorial

MySQL as an RDBMS (Relational Database Management System)

MySQL is a Relational Database Management System (RDBMS), which means it stores data in a structured format using tables, and allows relationships between those tables. It uses SQL (Structured Query Language) to manage and manipulate the database.


 What is an RDBMS?

An RDBMS (Relational Database Management System) is software used to create, manage, and operate relational databases. It organizes data in tables containing rows and columns, and relationships can be created using keys.

Example Table:

IDNameAgeCity

Each row = a record
Each column = a field


 Why MySQL is an RDBMS?

MySQL qualifies as an RDBMS because it:

  •  Stores data in multiple related tables
  • Uses SQL for data manipulation
  •  Supports Primary Keys, Foreign Keys, and Constraints
  •  Ensures data integrity and relationships

 Key Concepts in MySQL RDBMS

1. Database

A collection of tables and related data.

 2. Table

A structured format to store data in rows and columns.

3. Row (Record)

A single data entry in a table.

4. Column (Field)

Defines the type of data stored (e.g., name, age).


 Keys in MySQL RDBMS

Key TypePurpose
Primary KeyUniquely identifies each record in a table
Foreign KeyCreates a relationship between two tables
Unique KeyPrevents duplicate values
Composite KeyCombination of two or more columns to uniquely identify a record

Example:

Students Table

student_id (PK)name
1Neha
2Rahul

Courses Table

course_idstudent_id (FK)course_name
1011PHP
1022MySQL

Here, student_id connects both tables → Relationship.


 MySQL Supports ACID Properties

ACID ensures reliable and accurate transactions:

PropertyMeaning
A – AtomicityComplete transaction success or failure
C – ConsistencyEnsures valid and correct data
I – IsolationPrevents transaction conflicts
D – DurabilitySaves committed data permanently

SQL Operations in RDBMS

CategoryCommandsPurpose
DDL (Data Definition Language)CREATE, ALTER, DROPStructure control
DML (Data Manipulation Language)INSERT, UPDATE, DELETEModify data
DQL (Query Language)SELECTRetrieve data
DCL (Control Language)GRANT, REVOKEPermissions
TCL (Transaction Control)COMMIT, ROLLBACKTransaction management

 Advantages of MySQL RDBMS

  •  Fast and reliable

  •  Secure with user access control

  •  Maintains data accuracy and integrity

  •  Supports large multi-user applications

  •  Backup and recovery support


 Example Basic Commands


 


Summary

MySQL is a powerful Relational Database Management System that stores data in a structured table format and allows relationships using keys. It ensures data integrity, supports transactions, and is widely used in web applications, software systems, and enterprise-level solutions.

You may also like...