JSON has proven to be a very import data format with immense
popularity. A good part of my time for the last two or so years
has been dedicated to this area and I even wrote a book on the subject. This is a
comparison of the implementations of handling JSON data in MySQL
and MariaDB. I had requests from the community and customers for
this evaluation.
JSON Data Types Are Not All Equal
MySQL added a JSON data type in version 5.7 and it has proven to
be very popular. MariaDB has JSON
support version 10.0.16 but is actually an alias to a
longtext data type so that statement based replication
from MySQL to MariaDB is possible.
MySQL stores JSON documents are …
With new MySQL Shell 8.0.13 comes a new way to quickly load JSON
data sets very quickly. In a past blog and in several talks
I have shown how to use the shell with the Python mode to pull in
the data. But now there is a much faster way to load
JSON
Load JSON Quickly Start a copy of the new shell with
mysqlsh. Connect to your favorite server \c
dave@localhost and then create a new schema
session.createSchema('bulk'). Then point you session to
the schema just created with \use bulk. Version
8.0.13 has a new utility function named importJson that does the
work. The first argument is the path to the data set (here
the MongoDB restaurant collection) and the second allows you to
designate the schema and collection where you wish to have the
data stored. In this example the data set was in the
downloads directory of my laptop and I wanted to put it in the
newly created 'bulk' schema …
Containers are eating the world. If you have built and deployed an application in production over the last few years, the odds are that you have deployed your code in containers. You might have created and deployed individual containers (Docker, Linux LXC, etc.) directly in the beginning, but quickly switched over to a container orchestration technology like Kubernetes (K8s) or Swarm when you needed to coordinate multi-node deployments and high availability (HA). In this container-driven world, what will the future of the application stack look like? Let’s start with what we need from this “future” application stack.
What Do We Need From This Future Application Stack?
- Cloud Agnostic
We …
Someone once told me you can tell how healthy a software project
is by the number of new books each year. For
the past few years the MySQL community has been blessed with one
or two books each year. Part of that was the major shift with
MySQL 8 changes but part of it was that the vast majority of the
changes were fairly minor and did not need detailed explanations.
But this year we have been blessed with four new
books. Four very good books on new facets of MySQL.
Introducing the MySQL 8 Document Store is the
latest book from Dr. Charles Bell on MySQL. If you have
read any other of Dr. Chuck's book you know they are well written
with lots of examples. This is more than a simple
introduction with many intermediate and advanced concepts covered
in detail.
… |
As a spin-off from the previous post, https://mysqlmed.wordpress.com/2018/08/23/get-the-auditors-in/, I thought that it would be good to see how well the Audit plugin upgrades to MySQL 8. The big change in auditing is that the tables change from MyISAM to InnoDB, so keep your eyes open.
I’m using the previously used instance in version 5.7.18.
Preparation
Before we do anything, let’s make sure auditing will be in place when we restart the instance with 8.0.12:
Uncomment the plugin-load & audit-log params we had originally commented out. After all, this is something we should have done in the last post (apologies!):
vi my_audit.cnf: .. [mysqld] plugin-load =audit_log.so audit-log =FORCE_PLUS_PERMANENT ..
Restart the 5.7 instance so we upgrade from a rebooted / ‘as real as can be …
[Read more]Introduction As I explained in this article, multitenancy is an architectural pattern which allows you to isolate customers even if they are using the same hardware or software components. There are multiple ways you can achieve multitenancy, and in this article, we are going to see how you can implement a multitenancy architecture using the … Continue reading Hibernate database catalog multitenancy →
The post Hibernate database catalog multitenancy appeared first on Vlad Mihalcea.
Introduction In software terminology, multitenancy is an architectural pattern which allows you to isolate customers even if they are using the same hardware or software components. Multitenancy has become even more attractive with the widespread adoption of cloud computing. A relational database system provides a hierarchy structure of objects which, typically, looks like this: catalog … Continue reading A beginner’s guide to database multitenancy →
The post A beginner’s guide to database multitenancy appeared first on Vlad Mihalcea.
Windowing functions are a critical tool for grouping rows of data
that are related to other rows. But they go far beyond the
regular aggregate functions found in MySQL 5.7 and earlier. In
MySQL 8 you do not have to collapse all the information down into
a single output row. Each row can retain its individual identity
but the server can analyze the data as a unit.
Statistics and Damned Lies Finding the total Population of
the District Texas from the world.city table
is simple.
SQL> select District, sum(Population)
from city where district = 'Texas';
+----------+-----------------+
| District | sum(Population) |
+----------+-----------------+
| Texas
| 9208281 |
+----------+-----------------+
1 row in set (0.0068 sec)
…
There was an interesting but hard to read post on StackOverflow about how 'insert select delete'
data from a MySQL JSON data type column. The first line of
the writer's problem is a little confusing '
In order to record user mac_address and count mac_address to
restrict user login's pc or notebook to control user available
max for example (it's work)' but the examples reveled more
about what was desired. The idea was to track MAC address used by
various users and the author of the question was wondering how to
up data a JSON Array of values with JSON_INSERT. INSERT is
for inserting and the better choice would be JSON_ARRAY_APPEND or
JSON_ARRAY_INSERT. But what caught my eye was the
second question: Select sql command for json column ? could be …
“We made it a point to hire really smart, visionary
people and then let them do their work.
I wanted to delegate and let people be in charge of things. My
own decision-making process was to decide who got to decide. To
make decisions, you have to first outline the problem, and if you
hire really great people, they’re going to know more about the
problem they’re dealing with than you ever will.”–Scott
McNealy
I have interviewed Scott McNealy. Scott is a Silicon Valley pioneer, most famous for co-founding Sun Microsystems in 1982. We talked about Innovation, AI, Big Data, Redis, Curriki and Wayin.
RVZ
Q1. You co-Founded Sun Microsystems in 1982, and served as CEO and Chairman of the Board for 22 years. What are the main lessons learned in all these years?
Scott …
[Read more]