Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
MySQL 8 for Big Data

You're reading from  MySQL 8 for Big Data

Product type Book
Published in Oct 2017
Publisher Packt
ISBN-13 9781788397186
Pages 296 pages
Edition 1st Edition
Languages
Concepts
Authors (4):
Shabbir Challawala Shabbir Challawala
Profile icon Shabbir Challawala
Chintan Mehta Chintan Mehta
Profile icon Chintan Mehta
Kandarp Patel Kandarp Patel
Profile icon Kandarp Patel
Jaydip Lakhatariya Jaydip Lakhatariya
Profile icon Jaydip Lakhatariya
View More author details

Table of Contents (17) Chapters

Title Page
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Customer Feedback
Preface
Introduction to Big Data and MySQL 8 Data Query Techniques in MySQL 8 Indexing your data for High-Performing Queries Using Memcached with MySQL 8 Partitioning High Volume Data Replication for building highly available solutions MySQL 8 Best Practices NoSQL API for Integrating with Big Data Solutions Case study: Part I - Apache Sqoop for exchanging data between MySQL and Hadoop Case study: Part II - Real time event processing using MySQL applier

Chapter 8. NoSQL API for Integrating with Big Data Solutions

In the previous chapter, we looked at best practices for MySQL 8 that we should follow in various aspects such as performance, implementation, security, and so on. Best practices always align the product with the industry standard and also give a good output. We have seen different best practices for different phases like Benchmark and Configuration, which detail configuration parameters to provide better benchmark results. Best practices for queries helps in designing complex queries and providing better performance. Best practices for Memcached need to be maintained while implementing caching mechanisms. The valid replication configuration will always result in better scalability and can provide better performance with low latency.

This chapter talks about integrating MySQL 8 to work like NoSQL with the different APIs available. We will see how MySQL, an RDBMS, will work as NoSQL to handle big data. MySQL provides various APIs...

NoSQL overview


The word NoSQL means No SQL, which means that it will skip the SQL layer and use the database directly. As data is rapidly growing everyday and big data enters the picture to make the data scalable and faster, then NoSQL helps in managing massive volumes of data with the evolution of the Relational Database Management System (RDBMS).

Many have also interpreted NoSQL as Not Only SQL, because this is not a complete replacement of the SQL layer but, we can say, a complementary addition to the Relational Database. NoSQL does not follow the rules of a relational database and can access data with the traditional database easily.

MySQL has already maintained its popularity in the structured world, but as per the current scenario, data has been pushing the boundaries, which takes storage and analysis to an entirely new level. This push of data has raised the need for NoSQL under big data to make stronger analysis and provide effective performance. This way, MySQL has unlocked its pure...

NoSQL versus SQL


Let's see the major differences between NoSQL and SQL databases:

NoSQL

SQL

NoSQL is referred to as a non-relational and distributed database system.

SQL is referred to as relational database system.

NoSQL is horizontally scalable.

SQL is vertically scalable.

NoSQL does not use a structured query language. It has an unstructured query language, which varies from database to database.

SQL uses the structured query language to manipulate the data.

NoSQL does not have a fixed or predefined schema.

SQL has a predefined static database.

NoSQL stores data in key/value pairs.

SQL stores data in tabular format.

For complex relational queries, NoSQL is not suitable.

SQL is best suited for complex relational queries.

Preferable to handle big data.

Preferable to handle relational data.

NoSQL stores data in the form of collections where data can be duplicated and stored in a single entity. Hence, reading/writing on a single entity is easier and faster.

SQL stores data in a normalized way and breaks down...

Implementing NoSQL APIs


So far, we have seen how NoSQL databases can help in various ways and also walked through the differences between SQL and NoSQL. Now you might be wondering how we can store/retrieve data to MySQL? MySQL 8 is already providing many APIs in different languages to access MySQL, which works like NoSQL. MySQL has implemented NoSQL interfaces on the top of InnoDB and MySQL Cluster engines, which bypass the SQL layer completely.

Hence, it will store key/value data directly to the MySQL tables with higher speed without doing SQL parsing and optimization. MySQL still maintains all the advantages of its existing relational database infrastructure and the user can continue executing complex queries with SQL on the same datasets.

There are mainly two types of NoSQL APIs used with MySQL 8 in various programming languages.

  • NoSQL API with the Memcached layer
    • NoSQL API with Java
    • NoSQL API with PHP
    • NoSQL API with Python
    • NoSQL API with Perl
  • NoSQL API with NDB Cluster
    • NDB API for NodeJS
    • NDB...

Summary


At the end of this chapter, we can now be sure about how we can use MySQL as a NoSQL database with our application that is built on different programming languages. At the start of this chapter, we discussed about the NoSQL database and its major advantages to use for use in our applications. Later, we have seen the differences between SQL and NoSQL and then we started looking into the different APIs with basic examples. We have understood the Memcached API with basic examples in different programming languages such as Java, PHP, Python, and Perl, which provide access to MySQL as a NoSQL database. Then, we have seen different NoSQL APIs used to manage the database for a clustered environment. We have discussed the NDB API and how it can be used with different programming languages such as NodeJS, Java, and C++. These different, supporting NoSQL APIs make it convenient for the developers and enterprises to handle big data within MySQL.

In the next chapter, we will understand how we...

lock icon The rest of the chapter is locked
You have been reading a chapter from
MySQL 8 for Big Data
Published in: Oct 2017 Publisher: Packt ISBN-13: 9781788397186
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.
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}