This presentation is a summary of the MySQL 8.0.17 new features.
The post MySQL 8.0.17 - New Features Summary first appeared on dasini.net - Diary of a MySQL expert.
This presentation is a summary of the MySQL 8.0.17 new features.
The post MySQL 8.0.17 - New Features Summary first appeared on dasini.net - Diary of a MySQL expert.
Mid September, MySQL Community, MySQL Customers and MySQL Engineers will be in San Francisco to share their experience and present the new features of your favorite database !
The event will be held in Moscone South (just Mirko Ortensi‘s Hands-on Lab will be delivered in Moscone West).
During the week, the MySQL Community Team will host the traditional MySQL Reception. We got so great feedback from last year that we decided to renew the experience in the same awesome location, the Samovar Tea Lounge at Yerba Buena Gardens. Don’t forget that you need to register for this reception but no OOW pass is required. Please register here !
Back to the conference, you can find the full schedule for the session in the …
[Read more]
Multi-Valued Indexes are going to change the way you think about
using JSON data and the way you architect your data. Before MySQL
8.0.17 you could store data in JSON arrays but trying to search
on that data in those embedded arrays was tricky and usually
required a full table scan. But now it is easy and very
quick to search and to access the data in JSON arrays.
Multi-Valued IndexesA Multi-Valued Index (MVI) is a secondary
index defined on a column made up of an array of values. We
are all used to traditional indexes where you have one value per
index entry, a 1:1 ratio. A MVI can have multiple records
for each index record. So you can have multiple postal
codes, phone numbers, or other attributes from one JSON document
indexed for quick access. See Multi-Valued Indexes for details.
…
The ability to import data in parallel is now a feature of
the new MySQL Shell. And you can run it from a command line
instead of from within an interactive shell.
How Does It Work?
The importTable utility, new on MySQL Shell 8.0.17,
analyzes the input file, divides that file into chunks, and then
uploads that data using parallel connections. This is much
faster than the LOAD DATA statement. You get the ability to
define how the data is delimited as far a field and lines are
defined. And it works on DOS CSVs, Unix CSVs, TSVs, and
JSON if that JSON is in one document per line mode. You also
can adjust the number of threads, number of bytes sent per each
chunk, and the maximum rate of data transfer per thread so you
can balance the load on the network and the speed of data …
JSON has become the standard document interchange format over the
last several years. MySQL 5.7 added a native JSON data type
and it has been greatly enhanced with version 8.0.
But many in the relational world have complained the the NoSQL
approach does not allow you to have rigor on your data. That is
to make sure an integer value is really an integer and within
specified ranges or string of the proper length. And there was no
way to make sure that email addresses are not listed under a
combination of E-mail, e-mail, eMail, and eMAIL. JSON is
great for many things but traditional, normalized data was better
for making certain that your data matched what was
specified.
If only there was a way to enforce come rigor on JSON data! Or a
way to annotate (pronounced 'document') your JSON data. Well
there is. MySQL 8.0.17 has added the ability to validate JSON
documents against a schema following the guidelines of the …
MySQL 8.0.17 adds three new functions to the JSON
repertoire. All three can take advantage of the new
Multi-Value Index feature or can be used on JSON arrays.
JSON_CONTAINS(target, candiate[,
path])
This function indicates with a 1 or 0 if a candidate
document is contained in the target document. The optional
path argument lets you seek information in embedded
documents. And please note the 'haystack' is before the
'needle' for this function.
mysql> SELECT JSON_CONTAINS('{"Moe": 1, "Larry":
2}','{"Moe": 1}');
+------------------------------------------------------+
| JSON_CONTAINS('{"Moe": 1, "Larry": 2}','{"Moe": 1}') |
+------------------------------------------------------+
…
Presentation of some of the new features of MySQL 8.0.16 released on April 25, 2019
The world seems awash in unstructured, NoSQL data, mainly of the
JSON variety. While this has a great many benefits as far
as data mutability and not being locked into a rigid structure
there are some things missing that are common in the structured
world of SQL databases.
What if there was a way to take this unstructured NoSQL JSON data
and cast it, temporarily, into a structured table? Then you
could use all the processing functions and features found in a
relation database on you data. There is a way and it is the
JSON_TABLE function.
JSON_TABLE
You can find the documentation for JSON_TABLE here but there are some examples below
that may make learning this valuable function easier than the
simple RTFM.
I will be using the world_x dataset for the next example
If …
As you may have noticed, MySQL 8.0.16 has been released today !
One of the major long expected feature is the support of
CHECK contraints .
My colleague, Dave Stokes, already posted an article explaining how this works.
In this post, I wanted to show how we could take advantage of this new feature to validate JSON values.
Let’s take the following example:
So we have a collection of documents representing rates from a user on some episodes. Now, I expect that the value for the rating should be between 0 and …
[Read more]MySQL 8.0 provides another way to handle JSON documents, actually in a "Not only SQL" (NoSQL) approach... In other words, if you need/want to manage JSON documents (collections) in a non-relational manner, with CRUD (acronym for Create/Read/Update/Delete) operations then you can use MySQL 8.0! Did you know that?