What is MySQL?
MySQL is an open source, Oracle based Relational Database Management System. It is developed and supported by Oracle Corporation. It is based on SQL i.e., Structured Query Language.
What is Database?
A Database is an organized collection of data. It supports the storage and manipulation of the data. The concept of a database makes data management easier.
A DBMS is a system software used for creating and managing databases. It allows users to access database, and manipulation of the data. MySQL is one of the popular DBMS software.
Types of DBMS- There are four major types of DBMS
- Hierarchical DBMS- In this type of DBMS, data is represented using a “parent-child” relationship. This type is rarely used nowadays. Example- Windows registry used in Windows XP.
- Network DBMS- This type of DBMS supports a “many-to-many” relationship. It results in complex database structures. Example- RDM Server
- Relational DBMS- In this type, data is stored in the form of tables, also known as “relations”. This is the most popular type of DBMS used in the market. Example- MySQL, Oracle, etc.
- Object oriented RDBMS- As the name suggests, the data is stored in the form of objects. The objects have attributes and methods that define what to do with the data. Example- PostgreSQL.
What is Structured Query Language (SQL)? – SQL is the crux of a relational database. It is primarily used for managing and accessing the database. With the help of SQL, you can add, update or delete the rows of the data, modify the databases, and many more actions. We can say that SQL is the language which is responsible for operating the database.
SQL commands- These commands are divided into four groups
- DDL (Data Definition Language)- As the name indicates, DDL consists of a set of commands used to define the database. It is used to create and modify the structure of the database objects. Example of DDL commands-
- CREATE-create a database
- DROP-delete from database
- ALTER-alter the database
- TRUNCATE-delete all records from a table
- COMMENT-add comments to the data dictionary
- RENAME-rename an object in the database
DML (Data Manipulation Language)-
It includes the set of commands used to manipulate the data present in the database. Examples of DML commands-
- SELECT-retrieve data from the database
- INSERT-insert data into the table
- UPDATE-update existing data within the table
- DELETE-delete records from the table
DCL (Data Control Language)-
It includes the commands which primarily deals with the controls of the database. Example of DCL commands-
- GRANT-allows user’s access privileges to the database
- REVOKE-withdraw user access privileges given by GRANT
TCL (Transaction Control Language)-
It mainly deals with the transactions carries out in the database. Examples of TCL commands are-
- COMMIT-commits a transaction
- ROLLBACK-rollback a transaction if any error occurs
- SAVEPOINT-sets a save point within the transaction
- SET TRANSACTION-specify the characteristics of the transaction
Some popular features of MySQL are: -
- It is free of cost. It is an open source software, so you have nothing to pay.
- It is easy to use. You can build and interact with the MySQL with only a few simple SQL queries.
- MySQL is compatible to run on various operating systems such as Windows, Linux, Unix, and many more.
- MySQL follows the client-server architecture. There is a central database server (MySQL) and multiple clients interacting with the server.
- MySQL has the property of scalability. It can handle a huge amount of data, up to 50 million rows or more,
Scope- Nowadays, organizations/companies have huge amount of data and they need a person to manage that data efficiently. This work is done by DBA (Database Administrator). The role of DBA is to maintain a successful database environment. He is the one who manages the whole database keeping in mind the security issues.
If you have a dream to become a DBA (Database Administrator) then join Tech forest institute for MySQL coaching classes institute Indore . The average salary of DBA is Rs. 9,59,626 per annum, which is worthwhile.