Showing entries 51 to 60 of 168
« 10 Newer Entries | 10 Older Entries »
Displaying posts with tag: json (reset)
MonoDB versus MySQL Document Store Command Comparisons II

Last time I was stumped by the MongoDB $gt: operator.  I wanted to look for restaurants in a certain Manhattan burough OR in a zipcode greater than a certain zipcode.  Well, I was getting different results between Mongo and MySQL.

To > or Not To >, That Is the Query
Lets say we have three records with the same key but the values are 1, 2, and "3". Yup, you got it two numerics and one string.  I would expect schema less data to be free flowing, not typed, and pretty much a free for all.  Whoops. Bad assumption on my part for Mongo use.

I added three JSON documents into Mongo as can be seen below:

Our three documents with the values of 1, 2, …
[Read more]
Next week in Barcelona

Next week I will be speaking at DataOps in Barcelona about MySQL 8.0 Document Store. If you don’t know it yet, I really invite you to join this talk, you will be very surprised about all MysQL can do in the NoSQL world !

There will be also a lot other MySQL related sessions by many good speakers of the MySQL Community.

As I will be in Barcelona, the Barcelona MySQL Meetup invited me to give a session about MySQL InnoDB Cluster and Group Replication and I will also share the stage with my friend and colleague …

[Read more]
More Porting Data from MongoDB to the MySQL Document Store

Last time we looked at moving a JSON data set from MongoDB to the MySQL Document Store.  Let's move another and then see how to investigate this date.  We will use the primer-dataset.json that contains data on restaurants around New York City.

Loading Data
The loading of the JSON data set was covered last time but here is the gist. The first step is to fire up the MySQL Shell and login to the server.

Here a new schema is created and then a new collection

 We need a new schema for this data and the example shows one created as nyeats.  The within that new schema a collection is created with the name restaurants.


[Read more]
Porting Data From MongoDB to MySQL Document Store in TWO Easy Steps

Porting data from MongoDB to the MySQL Document Store is very easy.  The example I will use is an example data set from the good folks at Mongo named zips.json that contains a list of US Postal Codes and can be found at http://media.mongodb.org/zips.json for your downloading pleasure.

I copied the file into the Downloads directory on my Unbuntu laptop and then fired up the new MySQL Shell.  After login, I created a new schema creatively named zips with session.createSchema('zips').  When then set the db object to this new schema with the command \use zips.

[Read more]
MySQL participating to HKOSCon 2018

From June 16th to 17th, the MySQL Team will be attending and speaking at the Hong Kong Open Source Conference 2018.

Unfortunately I won’t be present but some of my great colleagues will be speaking about MySQL.

If you are planning to attend HKOSCon2018, don’t miss their talks:

[Read more]
MySQL and JSON - A Practical Programming Guide is now available!

My book MySQL and JSON - A Practical Programming Guide is now available! My promotional copies have arrived and I will be bringing them to PHP Tek, SyntaxCon, and Southeast Linuxfest in the next two weeks.

This is a book on discovering how to use JSON with MySQL with lots of examples, samples programs, and more.  Please order your copy today. Order From Amazon

Partial (Optimised) JSON updates and Replication in MySQL 8.0

           MySQL is the most widely used  Relational Database Management System in the open source world. MySQL stepped into the NoSQL world by introducing the JSON Data Type in MySQL 5.7 release. In this blog post I am going to explain one of the major advantage of optimisation made in JSON Replication .

This was done from the MySQL 8.0.3 release.

What happened before 8.0.3 ?

Before MySQL 8.0.3, Whatever changes (Updates) made in JSON document, it will log as a full document in binary log & replicate the same into slave. The JSON data is stored as a blob internally. Below is an example of how it is logged as full document in binary log ?

Example –

Server version - 5.7.22-log MySQL Community Server (GPL)

My Binlog …
[Read more]
Array Ranges in MySQL JSON

Pretend you have a JSON array of data that looks roughly like the following.

mysql> insert into x(y) values('["a","b","c","d"]');
Query OK, 1 row affected (0.10 sec)


You could get all the values from that array using $[*]


mysql> select y->"$[*]" from x;
+----------------------+
| y->"$[*]" |
+----------------------+
| ["a", "b", "c", "d"] |
+----------------------+
1 row in set (0.00 sec)

Or the individual members of the array with an index that starts with zero.


mysql> select y->"$[0]" from x;
+-----------+
| y->"$[0]" |
+-----------+
| "a" |
+-----------+
1 row in set (0.00 sec)


But what about the times you want the last item in the array and really do not want to loop through all the items? How about using …

[Read more]
This Week in Data with Colin Charles 33: Reporting from FOSSASIA 2018 and Azure Announces Database Services for MySQL and PostgreSQL

Join Percona Chief Evangelist Colin Charles as he covers happenings, gives pointers and provides musings on the open source database community.

Writing to you on the ground from FOSSASIA 2018, where I gave a track introduction yesterday since we have a pretty awesome database track most Saturday, and generally, all MySQL focused on Sunday. There’s even a list of talks by Oracle MySQL’ers (yes, there’s more than just Oracle folk, but for that, you got to get the schedule).

The Percona Live Community Dinner happens again this year during Percona Live 2018, at Pedro’s on 24 April 2018. It starts at 7 pm, and I highly recommend you purchase the …

[Read more]
Visualize This! MySQL Tools That Explain Queries

In this blog post, I want to go over some of the day-to-day MySQL tools and methods DBAs use to analyze queries and visualize “what is going on?” I won’t be going into the nitty-gritty details of each of these tools, I just want to introduce you to them and show you what they look like so you will know what types of information they provide.

This isn’t a comprehensive list by any means but consider it a primer for those starting with MySQL and wanting to know what a query is going to do or is doing.

The two sides of query analysis are examining a query BEFORE you run it, and then analyzing what actually happened AFTER you run it.

Let’s start with the tools you can use to predict a query’s future.

In the beginning, there was EXPLAIN. The venerable EXPLAIN command has been with us a long time as a built-in MySQL utility statement. Its purpose is to explain that what the optimizer …

[Read more]
Showing entries 51 to 60 of 168
« 10 Newer Entries | 10 Older Entries »