MySQL is an open-source Relational Database Management System (RDBMS) used to store, organize, retrieve, and manage structured data.MySQL uses SQL (Structured Query Language) to interact with databases.
MySQL was created in 1995 by Michael Widenius (Monty), David Axmark, and Allan Larsson in Sweden. It was developed as a fast and simple relational database for application development. MySQL became popular because it was open-source, easy to use, reliable, and efficient, especially for web applications. In 2000, MySQL adopted the GNU General Public License (GPL), which helped its open-source community grow. In 2008, Sun Microsystems acquired MySQL AB, and in 2010, Oracle acquired Sun Microsystems. MySQL continued to evolve with major releases such as MySQL 5.7 and MySQL 8.0, adding improved performance, security, SQL capabilities, and JSON support. Today, MySQL remains an important database technology for web, enterprise, cloud, and application development.
It is widely used in:
- Web applications
- Enterprise applications
- Backend systems
- Data-driven applications
- E-commerce platforms
- Java and Spring Boot applications
MySQL is popular because it provides:
- Easy installation and configuration
- High performance
- Reliability
- Scalability
- Security
- Transaction support
- SQL support
- Multi-user access
- Backup and recovery capabilities
- Integration with Java, Python, PHP, .NET and other technologies
MySQL follows the relational database model. Data is organized into tables, where:
- Table : Collection of related data
- Row : Represents one record
- Column: Represents an attribute
- Primary Key : Uniquely identifies a record
- Foreign Key : Establishes a relationship between tables
- Constraint : Maintains data integrity
Why Did MySQL Become Popular?
MySQL became particularly popular during the growth of the World Wide Web because it was:
- Open source
- Relatively easy to install and use
- Fast for many web workloads
- Cost-effective
- Supported by a large developer community
- Easily integrated with programming languages
The combination of Linux + Apache + MySQL + PHP became popularly known as the LAMP stack.
MySQL SQL Command Categories
| Category | Commands |
|---|---|
| DDL | CREATE, ALTER, DROP, TRUNCATE |
| DML | INSERT, UPDATE, DELETE |
| DQL | SELECT |
| DCL | GRANT, REVOKE |
| TCL | COMMIT, ROLLBACK, SAVEPOINT |
MySQL Constraints
| Constraint | Purpose |
|---|---|
PRIMARY KEY |
Uniquely identifies each record. |
FOREIGN KEY |
Establishes a relationship between tables. |
UNIQUE |
Prevents duplicate values. |
NOT NULL |
Prevents NULL values. |
CHECK |
Ensures values satisfy a condition. |
DEFAULT |
Provides a default value. |
MySQL began as a lightweight open-source database project in the 1990s and evolved into one of the world’s widely used relational databases. Its simplicity, performance, open-source roots, and strong integration with application development made it especially important in web and enterprise software development.
