Reader small image

You're reading from  MySQL 8 Administrator???s Guide

Product typeBook
Published inFeb 2018
Reading LevelBeginner
PublisherPackt
ISBN-139781788395199
Edition1st Edition
Languages
Tools
Right arrow
Authors (4):
Chintan Mehta
Chintan Mehta
author image
Chintan Mehta

Chintan Mehta is a co-founder of KNOWARTH Technologies and heads the cloud/RIMS/DevOps team. He has rich, progressive experience in server administration of Linux, AWS Cloud, DevOps, RIMS, and on open source technologies. He is also an AWS Certified Solutions Architect. Chintan has authored MySQL 8 for Big Data, Mastering Apache Solr 7.x, MySQL 8 Administrator's Guide, and Hadoop Backup and Recovery Solutions. Also, he has reviewed Liferay Portal Performance Best Practices and Building Serverless Web Applications.
Read more about Chintan Mehta

Ankit K Bhavsar
Ankit K Bhavsar
author image
Ankit K Bhavsar

Ankit Bhavsar is a senior consultant leading a team working on ERP solutions at KNOWARTH Technologies. He received an MCA from North Gujarat university. He has had dynamic roles in the development and maintenance of ERP solutions and astrology portals Content Management that including OOP, technical architecture analysis, design, development as well as database design, development and enhancement process, data and object modeling, in order to provide technical and business solutions to clients.
Read more about Ankit K Bhavsar

Hetal Oza
Hetal Oza
author image
Hetal Oza

Hetal Oza an MCA from a reputable institute of India, is working as a lead consultant at KNOWARTH Technologies. She has rich experience in Java-based systems with various databases. Her 10 years of experience covers all stages of software development. She has worked on development of web-based software solutions on various platforms. She has good exposure to integration projects with web-service-based and thread-based architecture. Her knowledge is not bound to any single field because she has worked on wide range of technologies and tools.
Read more about Hetal Oza

Subhash Shah
Subhash Shah
author image
Subhash Shah

Subhash Shah is an experienced solution architect. With 14 years of experience in software development, he works as an independent technical consultant now. He is an advocate of open source development and its utilization in solving critical business problems. His interests include Microservices architecture, Enterprise solutions, Machine Learning, Integrations and Databases. He is an admirer of quality code and test-driven development (TDD). His technical skills include translating business requirements into scalable architecture and designing sustainable solutions. He is a co-author of Hands-On High Performance with Spring 5, Hands-On AI for Banking and MySQL 8 Administrator's Guide. He has also been a technical reviewer for other books.
Read more about Subhash Shah

View More author details
Right arrow

MySQL 8 Storage Engines

In the previous chapter, we learned about setting up a new system, data dictionary, and system database. Detailed information was provided on caching techniques, globalization, different types of components, and plugin configuration, along with several types of log files which are very important for administration.

This chapter gives detailed information on MySQL 8 storage engines. It explains the InnoDB storage engine and its features in detail and also provides a practical guideline on custom storage engine creation and how to make it pluggable so that it can be installed in MySQL 8. The topics that we will be covering in this chapter are as follows:

  • Overview of storage engines
  • Several types of storage engines
  • The InnoDB storage engine
  • Creating a custom storage engine

Overview of storage engines

Storage engines are MySQL components for handling the SQL operations used in different types of tables. MySQL storage engines are designed to manage different types of tasks in different types of environments. It is very important to know and choose which storage engine is best suited for the system or application requirements. In following sections, we will get to know in detail about the types of storage engines, the default storage engine, and the creation of custom storage engines.

Let us go through and see why the storage engine is a very important component in databases, including MySQL 8. Storage engines work with database engines to perform various types of tasks in different environments. They execute create, read, update, and delete operations in the form of statements on data from the database. It looks quite simple when you provide the ENGINE...

Several types of storage engines

In this section, we will take a closer look at the widely used storage engines that are supported by MySQL 8. But before checking on them, let us see how the storage engine architecture has made it pluggable and provided flexibility to enable using multiple storage engines in the same schema or server.

The following is the list of storage engines supported in MySQL 8:

  • InnoDB: The default storage engine for MySQL 8. It is an ACID compliant (transaction-safe) storage engine that has commit, roll back, and crash-recovery for protecting the user data and referential-integrity constraints to maintain data integrity, and much more.
  • MyISAM: The storage engine with tables having a small footprint. It has table-level locking and so is mostly used in read-only or read-mostly data workloads, such as in data warehousing and web configurations.
  • Memory: The...

The InnoDB storage engine

InnoDB is the most general-purpose storage engine and is the default engine in MySQL 8, providing high reliability and high performance .

The following are the key advantages offered by the InnoDB storage engine:

  • Its DML operations follows the ACID model and transactions have commit, rollback, and crash-recovery features to protect user data
  • Oracle-style gives consistent reads and row level locking increases the performance of multi-user concurrency
  • Each InnoDB table has a primary key index, known as the clustered index, that arranges data on the disk in order to optimize queries based on primary key and minimizes I/O during primary key lookups
  • By supporting foreign keys, inserts, deletes, and updates are checked, ensuring consistency across different tables in order to maintain data integrity

The following are the key benefits of using InnoDB tables...

Creating a custom storage engine

MySQL AB introduced pluggable storage engine architecture in MySQL 5.1 and all later versions, including MySQL 8, have taken advantage of the flexible storage engine architecture.

The storage engine pluggable architecture provides the capability to create and add new storage engines without recompiling the server, adding directly to a running MySQL server. The architecture makes it very easy to develop and deploy new storage engines to MySQL 8.

When developing new storage engine, it is required to take care of all the components that work for and with storage engines. These include installation handlers, operations on table such as creating, opening, and closing, DML, indexing, and so on.

In this section, we will cover how you can start developing a new storage engine on a high-level basis with reference to the MySQL documentation provided in the...

Summary

By now, you have learned the different database engines available in MySQL 8 and we learned why we should care about storage engines and available storage engine options in MySQL 8. We covered in detail theInnoDB storage engine and related important features already provided within the InnoDB storage engine. Now you are practically able to create a custom storage engine as per the system requirement and make it pluggable in MySQL 8. An important aspect was to choose a suitable storage engine for your system, which is covered detail.

In the next chapter, you will learn about how indexing works in MySQL 8, the new features introduced related to indexing, the different types of indexing, and how to use indexing on your tables. Along with that, a comparison will also be provided along with in-depth knowledge of various ways of index implementation.

...
lock icon
The rest of the chapter is locked
You have been reading a chapter from
MySQL 8 Administrator???s Guide
Published in: Feb 2018Publisher: PacktISBN-13: 9781788395199
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (4)

author image
Chintan Mehta

Chintan Mehta is a co-founder of KNOWARTH Technologies and heads the cloud/RIMS/DevOps team. He has rich, progressive experience in server administration of Linux, AWS Cloud, DevOps, RIMS, and on open source technologies. He is also an AWS Certified Solutions Architect. Chintan has authored MySQL 8 for Big Data, Mastering Apache Solr 7.x, MySQL 8 Administrator's Guide, and Hadoop Backup and Recovery Solutions. Also, he has reviewed Liferay Portal Performance Best Practices and Building Serverless Web Applications.
Read more about Chintan Mehta

author image
Ankit K Bhavsar

Ankit Bhavsar is a senior consultant leading a team working on ERP solutions at KNOWARTH Technologies. He received an MCA from North Gujarat university. He has had dynamic roles in the development and maintenance of ERP solutions and astrology portals Content Management that including OOP, technical architecture analysis, design, development as well as database design, development and enhancement process, data and object modeling, in order to provide technical and business solutions to clients.
Read more about Ankit K Bhavsar

author image
Hetal Oza

Hetal Oza an MCA from a reputable institute of India, is working as a lead consultant at KNOWARTH Technologies. She has rich experience in Java-based systems with various databases. Her 10 years of experience covers all stages of software development. She has worked on development of web-based software solutions on various platforms. She has good exposure to integration projects with web-service-based and thread-based architecture. Her knowledge is not bound to any single field because she has worked on wide range of technologies and tools.
Read more about Hetal Oza

author image
Subhash Shah

Subhash Shah is an experienced solution architect. With 14 years of experience in software development, he works as an independent technical consultant now. He is an advocate of open source development and its utilization in solving critical business problems. His interests include Microservices architecture, Enterprise solutions, Machine Learning, Integrations and Databases. He is an admirer of quality code and test-driven development (TDD). His technical skills include translating business requirements into scalable architecture and designing sustainable solutions. He is a co-author of Hands-On High Performance with Spring 5, Hands-On AI for Banking and MySQL 8 Administrator's Guide. He has also been a technical reviewer for other books.
Read more about Subhash Shah