0% found this document useful (0 votes)
7 views13 pages

Project

Uploaded by

Alvin Okram
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views13 pages

Project

Uploaded by

Alvin Okram
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

OXFORD PUBLIC SCHOOL

ALVIN MEETEI OKRAM


CLASS XII-C

Index
Sno Title Date Pg.no Signature
0.1 Introduction to MySQL 2-3
0.2 Creation of Table 3
1 Text Function 4-6
1.1 LEFT() 4
1.2 RIGHT() 4
1.3 MID() 4
1.4 LENGTH() 5
1.5 UPPER() 5
1.6 LOWER() 5
1.7 INSTR() 6
1.8 SUBSTR() 6
2 Math Function 6-8
2.1 ABS() 6
2.2 MOD() 7
2.3 POWER() 7
2.4 SQRT() 7
2.5 ROUND() 8
2.6 TRUNCATE() 8
3 Date Function 8-10
3.1 NOW() 8
3.2 CURDATE() 9
3.3 DAY() 9
3.4 DAYNAME() 9
3.5 MONTH() 10
3.6 MONTHNAME() 10
3.7 YEAR() 10
4 Aggregate Function 11
4.1 MAX() 11
4.2 MIN() 11
4.3 COUNT() 11
4.4 SUM() 11
4.5 AVG() 11
5 Order by 12
6 Group by 12
7 Having Clause 12
Introduction to MySQL
Overview
MySQL is an open-source relational database management system (RDBMS) that uses Structured
Query Language (SQL) for accessing and managing data. It is widely used for web applications
and is known for its reliability, speed, and ease of use.

History and Origin


 Origin: MySQL was created in 1994 by Michael Widenius, David Axmark, and Allan
Larsson. It was initially developed as a solution to manage small to medium-sized databases
efficiently.
 Acquisition: In 2008, Sun Microsystems acquired MySQL AB, the company behind
MySQL. Later, in 2010, Oracle Corporation acquired Sun Microsystems, including
MySQL. Despite this, MySQL has continued to be a popular choice due to its strong
community and open-source nature.

Development and Features


 Open Source: MySQL is released under the GNU General Public License (GPL), which
means it is free to use, and its source code is available for modification and distribution.
 Scalability: MySQL supports a wide range of database sizes, from small-scale to large-
scale applications. It offers various storage engines, including InnoDB and MyISAM, to
meet different needs.
 Compatibility: MySQL is compatible with various operating systems, including Windows,
Linux, and macOS. It supports a wide range of programming languages such as PHP,
Python, and Java.
 Community: MySQL has a vibrant community of developers and users who contribute to
its continuous improvement. The MySQL community provides extensive documentation,
forums, and user groups.

Applications and Use Cases


MySQL is commonly used in web development, data warehousing, and business applications. It
powers many popular websites and platforms, including WordPress, Facebook, and Google.

Conclusion
MySQL's combination of performance, reliability, and open-source availability has made it a
leading choice for database management. This project will explore various MySQL functions,
their applications, and practical examples to demonstrate their utility.

Creation of Table
Table Structure
Show Table

FUNCTIONS
Text Function
1) LEFT Function
Question: How do you get the first 3 characters of the language_name?
2) RIGHT Function
Question: How can you retrieve the last 4 characters of the version?

3) MID Function
Question: How do you extract 3 characters starting from the 2nd position of the
version?

4) LENGTH Function
Question: How do you find the length of the version string for each language?

5) UPPER Function
Question: How can you convert the developer name to uppercase?
6) LOWER Function
Question: How can you convert the language_name to lowercase?

7) INSTR Function
Question: How do you find the position of the letter 'a' in the language_name?

8) SUBSTR Function
Question: How can you extract the substring starting from the 2nd character and up
to 4 characters long from the developer name?
Math Function
1) ABS Function
Question: How do you get the absolute value of the difference between the
total_users of each language and 5000000?

2) MOD Function
Question: How do you get the remainder when the number of total_users is
divided by 1000000?

3) POWER Function
Question: How can you calculate the square of the popularity_score for each
language?
4) SQRT Function
Question: How do you find the square root of total_users for each language?

5) ROUND Function
Question: How do you round the popularity_score to the nearest whole
number?

6) TRUNCATE Function
Question: How can you truncate the popularity_score to 1 decimal place?
Date Function
1) NOW Function
Question: How do you get the current date and time?

2) CURDATE Function
Question: How can you get the current date only (without the time)?

3) DAY Function
Question: How do you find the day of the month for the date_developed of
each language?
4) DAYNAME Function
Question: How can you get the name of the day of the week for the
date_developed of each language?

5) MONTH Function
Question: How do you find the month number for the date_developed of each
language?
6) MONTHNAME Function
Question: How can you get the name of the month for the date_developed of
each language?

7) YEAR Function
Question: How do you find the year for the date_developed of each language?

Aggregate Function
1) MAX Function
Question: How do you find the maximum popularity_score among all
languages?

2) MIN Function
Question: How can you determine the minimum total_users of any language?
3) COUNT Function
Question: How do you count the total number of languages listed in the table?

4) SUM Function
Question: How can you calculate the total number of total_users across all
languages?

5) AVG Function
Question: How do you find the average popularity_score of all languages?

MySQL Clauses
1) ORDER BY Clause
Question: How do you sort the languages by popularity_score in descending
order?
2) GROUP BY Clause
Question: How can you group the languages by the first letter of language_name
and count the number of languages in each group?

3) HAVING Clause
Question: How do you find the groups of languages (grouped by the first letter of
language_name) where the count of languages is greater than 1?

You might also like