CONTENTS

Acknowledgments

1     Introduction

JSON

MySQL

The Example Database

How to Use This Book

2     JSON as String Data vs. JSON as a Data Type

JSON String Data

The JSON Data Type

3     Finding the Path

Examining the world_x Data

Seeing the Keys

Path

Digging Deeper

4     Finding and Getting Data

All Keys

Searching for a Key

Searching for a Path

Searching for a Value

5     Changing Data

Using Arrays

Appending Arrays

Inserting into an Array

Using TRUNCATE Before Adding New Data

Using JSON_INSERT

Using JSON_REPLACE

JSON_REMOVE

JSON_SET

JSON_UNQUOTE

The Three JSON_MERGE Functions

JSON_MERGE

JSON_MERGE_PRESERVE

JSON_DEPTH

JSON_LENGTH

JSON_TYPE

JSON_VALID

JSON_STORAGE_SIZE

JSON_STORAGE_FREE

6     JSON and Non-JSON Output

JSON-Formatted Data

JSON_OBJECT

JSON_ARRAY

Casting

Non-JSON Output

Missing Data

Nested Data

7     Generated Columns

Using Generated Columns

Columns Generated from JSON

Generated Columns: Common Errors

8     GeoJSON

ST_GeomFromGeoJSON

ST_AsGeoJSON

9     PHP’s JSON Functions

JSON_DECODE

JSON_ENCODE

10     Loading JSON Data

From Download to Database

Step 1: Examine the Data

Step 2: Create the Table

Step 3: Load the Data Using a Wrapper

Step 4: Double-Check the Data

jq: JSON CLI Parser

With No Arguments

Select Certain Fields

The Restaurant Collection

11     The MySQL Document Store

The X DevAPI

mysqlsh

Connections

Session Types

Collections and Documents

CRUD: Create, Replace, Update, Delete

Filtering Find

Sorting

Binding

Indexing Collections

Dropping a Collection

12     Programming with the MySQL Document Store

Programming Examples

Python Example

Node.JS Example

PHP Example

Traditional SQL vs. MySQL Document Store

The MySQL Shell and JavaScript

Relational Tables

Both Relational and Document

Document as Relational

A     Additional Resources

Index

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.42.134