Comprehensive notes Introduction to MySQL Class 11

Introduction to MySQL Class 11 is a part of CBSE informatics practices class 11 curriculum. In this article, I will provide you a detailed guide about the introduction to MySQL. So let’ start!

Introduction to MySQL Class 11

If you missed the fundamentals of database follow the below given link:

Database Concepts

Now let’s start the article Introduction to MySQL Class 11. There are many DBMS and RDBMS software packages are available. This software provides an interface and the complete database management system solutions to create and maintain databases. For example, MySQL, Oracle, MS SQL Server, PostgreSQL, SQLite etc. So in this article, we will see how to work with an introduction to MySql.

Structured Query Language (SQL)

As you know to work with computers you need commands or script or coding. All the applications required commands to work up on. Similarly, MySQL also requires commands which is considered as query language that allows to use and manage the data from database efficiently. This query language is known as SQL.

Advantages of SQL

SQL offers following advantages:

  1. As the commands follow simple English language words that are very easy to learn
  2. SQL is not a case sensitive language, means whether commands are written in capital letters or small letters are similar only
  3. Retrieve data very easily from the database
  4. Provides various statements to define the structure of data
  5. Make Easy data manipulations
  6. Provides constraints to apply various kind of validations

Installing MySQL

You need to install MySQL to work with MySQL database. In the next section of Introduction to MySQL Class 11 we will discuss installing MySQL. MySQL is an open source software and you can easily download it by following the below give link.

Download MySQL

When you open the above link you will get this screen. Click on MySQL Installer for windows.

MySQL Download - Introduction to MySQL Class 11
MySQL Download – Introduction to MySQL Class 11

Now you will get this screen.

Comprehensive notes Introduction to MySQL Class 11

After downloading it install an start my sql service from services.msc, if not started. Then click on Start > All Programs > MySQL > MySQL Command Line Client to work on MySQL command. You need to follow some basic rules while writing SQL commands in MySQL.

  1. The commands are case insensitive, which means that “STUDENTS” and “students” both are similar.
  2. Every MySQL command statement ends with a semicolon (;)
  3. You can extend the command to multiple lines by pressing the enter key
  4. The text values and date values must be enclosed with a single quote (‘), For example, ‘Arvind’, ‘2005-02-56’, etc.
  5. MySQL follows the ‘YYYY/MM/DD’ format for dates.

The next section of Introduction to MySQL Class 11 will talk about data types.

Data Types in MySQL

MySQL supports following datatypes. The following table shows the numeric data types in MySQL.

UseDatatypeStorage in BytesRange
For numbers without decimal placestinyint1-128 to 127
smallint2-32,768 to 32,767
mediumint3-83,88,608 to 83,88,607
int4-2,14,74,83,648 to
bigint8-263-1 to 264-1
Numbers with point valuesDecimalMaximum 65 digits length

The next datatype is string data type. The following string datatypes available in MySQL.

  1. Char
  2. Varchar
  3. Binary
  4. Varbinary
  5. Blob
  6. Text
  7. Enum
  8. Set

Mostly we will use char or varchar datatypes. Observe the following table and understand the difference.

ValueCHAR(4)Storage RequiredVARCHAR(4)Storage Required
'''    '4 bytes''1 byte
'ab''ab  '4 bytes'ab'3 bytes
'abcd''abcd'4 bytes'abcd'5 bytes

The next data types is datetime. It is used to store the date values. In the next section of this article Comprehensive notes Introduction to MySQL Class 11 we will discuss about the constraints.


Constraints are some set of rules created to apply data validations. It ensures the accuracy and reliability of data. MySQL supports the following constraints:

  1. Primary Key: As we have discussed the Primary key concept, the primary key is a field or column or attribute which identifies the rows uniquely.
  2. Foreign Key: It refers to a column which is referenced from the primary key table column.
  3. Unique Key: It contains the unique records for the column except the primary key
  4. Default: The default constraint allows to assigns a default value if the value is not inserted
  5. Not Null: Null refers to a missing or unknown or not applicable value. When this constraint is applied to a column, you cannot insert a value in that column.

That’s all from the Comprehensive notes Introduction to MySQL Class 11. If you have any doubt, feel free to ask in the comment section. Thank you for reading this article.

One thought on “Comprehensive notes Introduction to MySQL Class 11”

Leave a Reply