← Back to team overview

maria-developers team mailing list archive

JSON in MariaDB 10.2


Hi all,

We just had a session here at the MariaDB Server developer’s meeting in Amsterdam on JSON in MariaDB 10.2. Before forgetting while things are still fresh in the mind, here are the notes from it (in Markdown format).


# JSON in MariaDB

* Virtual columns with functional indexes (i.e. generated columns like in 5.7) can be implemented in 2-3 weeks (Sergei)
* Eric: Concern about using non-standard function names (functions in 5.7 are `JSN_INSERT` whereas the standard uses `JSON_QUERY`)
* Suggestion: Use standard names when available, create UDF to match MySQL names that can be loaded as desired. (or vice versa -- do what MySQL 5.7 does and have UDFs to follow the standard)
* Come up with Usable JSON Test suite
	* Employee DB in JSON?
	* Good tests exist in DocStore (from the 5.6 facebook tree)
* Monty believes we should have more strictly typed (DocStore for example says `unique key doc_c(doc.address.zipcode as int, c)`). Monty thinks it should be optional to keep compatibility with 5.7. This is also similar to the JSON proposed standard (where you have to choose between lax or strict mode)
* Colin: Might want to convert JSON document to a relational table (This is part of the standard as `JSON_TABLE`)
* Colin: Do we support something similar to what FB has or what oracle has?
	* SergeyP: We need to follow oracle to maintain compatibility.
* Colin: We need to do this soon (i.e. since 5.7 is coming and its going to be a problem for 10.1 not having it; so 10.2 needs it as soon as possible). Everyone generally agrees this is a good idea.

# References
* [SQL SUPPORT FOR JSON](http://jtc1bigdatasg.nist.gov/_workshop/08_SQL_Support_for_JSON_abstract.pdf)
* [WL#8132: JSON datatype and binary storage format](https://dev.mysql.com/worklog/task/?id=8132)
* [WL#7909: Server side JSON functions](https://dev.mysql.com/worklog/task/?id=7909)
* [WL#8249: JSON comparator](https://dev.mysql.com/worklog/task/?id=8249)
* [WL#8170: Expression analyzer for GC](https://dev.mysql.com/worklog/task/?id=8170)
* [WL#8149: B-tree Index Support on non-materialized virtual columns](https://dev.mysql.com/worklog/task/?id=8149)
* [WL#8227: Support SEs to create index on virtual generated columns](https://dev.mysql.com/worklog/task/?id=8227)
* [WL#8114: Don't store virtual generated columns in database](https://dev.mysql.com/worklog/task/?id=8114)
* [JSON Labs Release: Native JSON Data Type and Binary Format](http://mysqlserverteam.com/json-labs-release-native-json-data-type-and-binary-format/)
* [JSON Labs Release: JSON Functions, Part 1 — Manipulation JSON Data](http://mysqlserverteam.com/json-labs-release-json-functions-part-1-manipulation-json-data/)
* [JSON Labs Release: JSON Functions, Part 2 — Querying JSON Data](http://mysqlserverteam.com/mysql-5-7-lab-release-json-functions-part-2-querying-json-data/)
* [JSON Labs Release: Effective Functional Indexes in InnoDB](http://mysqlserverteam.com/json-labs-release-effective-functional-indexes-in-innodb/)
* [11.6 The JSON Data Type](https://dev.mysql.com/doc/refman/5.7/en/json.html)
* [DocStore: Document Database for MySQL at Facebook](https://www.percona.com/live/mysql-conference-2015/sites/default/files/slides/Facebook%20DocStore%20Percona%202015.pdf)
* [JSON Support in MySQL](https://www.percona.com/live/mysql-conference-2015/sites/default/files/slides/MySQL_5_7_JSON_PerconaLive2015.pdf)

# Thanks
Thanks to Bryan Alsdorf for writing some of the notes during the session
Colin Charles, Chief Evangelist, MariaDB Corporation
blog: http://bytebot.net/blog/ | t: +1-347-903-3201 | Skype: colincharles | Twitter: @bytebot

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail