Introduction to MySQL
What is MySQL?
MySQL is a freely available open-source Relational Database Management System(RDBMS) that uses Structured Query Language(SQL). It can be easily downloaded from website . In a MySQL database, information is stored in Tables. A single MySQL database can contain many tables and store thousands of individual records. It is a fast, reliable, scalable alternative to many of the commercial RDBMSs available today.
Features of MySQL:
- It operates on client-server architecture in which the server runs on the machine containing the databases and clients connect to the server over a network.
- It is free to use which means we can download it from the official website without any cost.
- It is platform-independent and compatible with most of the operating systems such as Windows, Linux, many kinds of Unix, etc.
- MySQL is scalable as it supports multi-threading.
- It is secured as passwords are also shown in encrypted form.
- It has several commands that allow the user to manage and control transactions.
Who uses MySQL?
Web developers use MySQL to develop their respective web applications. MySQL is quite prominent in content development systems like WordPress, phpBB, etc. Some of its customers are Twitter, LinkedIn, Tesla, Netflix, Paytm, Uber, etc.
Advantages of MySQL:
- By using the MySQL queries we can quickly retrieve an ample amount of information from the database as the time factor of execution of queries is very less.
- MySQL offers scalability and portability i.e., it can be used in mobile devices, personal computers, laptops, etc.
- It is very easy to manage a database system as it doesn't require a huge amount of code to carry out the operations on the database.
- It provides robust support in the transaction and full data integrity is assured during the transaction.
- It makes maintenance, debugging, and upgrades fast and easy while enhancing the end-user experience.
- Data security is an important advantage of MySQL.
Disadvantages of MySQL:
- MySQL version (5.0 or less) doesn't support ROLE, COMMIT, and stored procedure.
- MySQL does not support a very large database size as efficiently.
- MySQL doesn't handle transactions very efficiently and it is prone to data corruption.
- It doesn't have a good developing and debugging tool compared to other databases.
What is SQL?
The word SQL is an acronym for Structured Query Language. It is a standard programming language for relational databases. It helps us to store, manipulate, and retrieve information from databases.
Classification of SQL Statements
SQL provides many different types of commands used for different purposes. SQL commands can be mainly divided into the following categories:
- Data Definition Language(DDL) commands :Commands that allow you to perform tasks related to data definition such as creating, altering, and dropping.
- Data Manipulation Language(DML) commands :Commands that allow you to perform data manipulation such as retrieval, insertion, deletion, and modification of data stored in the respective database.
- Transaction Control Language(TCL) commands :Commands that allow you to manage and control the transactions; a transaction is one complete unit of work involving many steps e.g., making/undoing changes to the database, creating savepoints, setting properties of ongoing transactions.
There are other categories of SQL commands but above mentioned three categories are majorly used by learners.