Bell | Introducing the MySQL 8 Document Store | E-Book | www.sack.de
E-Book

E-Book, Englisch, 545 Seiten

Bell Introducing the MySQL 8 Document Store


1. ed
ISBN: 978-1-4842-2725-1
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark

E-Book, Englisch, 545 Seiten

ISBN: 978-1-4842-2725-1
Verlag: Apress
Format: PDF
Kopierschutz: 1 - PDF Watermark



Learn the new Document Store feature of MySQL 8 and build applications around a mix of the best features from SQL and NoSQL database paradigms. Don't allow yourself to be forced into one paradigm or the other, but combine both approaches by using the Document Store. 
MySQL 8 was designed from the beginning to bridge the gap between NoSQL and SQL. Oracle recognizes that many solutions need the capabilities of both. More specifically, developers need to store objects as loose collections of schema-less documents, but those same developers also need the ability to run structured queries on their data. With MySQL 8, you can do both!?Introducing the MySQL 8 Document Store presents new tools and features that make creating a hybrid database solution far easier than ever before. This book covers the vitally important MySQL Document Store, the new X Protocol for developing applications, and a new client shell called the MySQL Shell. Also covered are supporting technologies and concepts such as JSON, schema-less documents, and more. The book gives insight into how features work and how to apply them to get the most out of your MySQL experience. The book covers topics such as:The headline feature in MySQL 8MySQL's answer to NoSQLNew APIs and client protocolsWhat You'll LearnCreate NoSQL-style applications by using the Document Store
Mix the NoSQL and SQL approaches by using each to its best advantage in a hybrid solution
Work with the new X Protocol for application connectivity in MySQL 8
Master the new X Developer Application Programming Interfaces
Combine SQL and JSON in the same database and application
Migrate existing applications to MySQL Document Store
Who This Book Is For

Developers and database professionals wanting to learn about the most profound paradigm-changing features of the MySQL 8 Document Store



Charles Bell conducts research in emerging technologies. He is a member of the Oracle MySQL Development team, and is a senior software developer for the MySQL Enterprise Backup team. He lives in a small town in rural Virginia with his loving wife. He received his Doctor of Philosophy in Engineering from Virginia Commonwealth University in 2005. 
Charles is an expert in the database field and has extensive knowledge and experience in software development and systems engineering. His research interests include 3D printers, microcontrollers, three-dimensional printing, database systems, software engineering, and sensor networks. He spends his limited free time as a practicing Maker, focusing on microcontroller projects and refinement of three-dimensional printers. 


 

Bell Introducing the MySQL 8 Document Store jetzt bestellen!

Autoren/Hrsg.


Weitere Infos & Material


1;Table of Contents;5
2;About the Author;12
3;About the Technical Reviewer;13
4;Acknowledgments;14
5;Introduction;15
6;Chapter 1: Introducing MySQL 8—A New Beginning;20
6.1;Old Features New Again;22
6.1.1;JSON Data Type;23
6.1.2;MySQL Shell;27
6.1.3;X Plugin, X Protocol, and X DevAPI;31
6.1.4;InnoDB Improvements;33
6.2;New Features;35
6.2.1;Data Dictionary;36
6.2.2;Account Management;37
6.3;Removed Options, Variables, and Features;38
6.4;Paradigm Shifting Features;39
6.4.1;Group Replication;40
6.4.2;InnoDB Cluster;44
6.5;Summary;53
7;Chapter 2: Getting Started with MySQL;55
7.1;Getting to Know MySQL;55
7.1.1;How Do I Connect to MySQL?;57
7.1.2;How to Get and Install MySQL;60
7.1.3;Configuring and Managing Access to MySQL;66
7.1.3.1;Configuration Files;66
7.1.3.2;Creating Users and Granting Access;69
7.1.3.3;Configuring the Document Store;70
7.2;A MySQL Primer;72
7.2.1;Creating Databases and Tables;72
7.2.2;Searching for Data;75
7.2.3;Creating Data;79
7.2.4;Updating Data;80
7.2.5;Deleting Data;81
7.2.6;Using Indexes;82
7.2.7;Views;83
7.2.8;Triggers;83
7.2.9;Simple Joins;84
7.2.10;Stored Routines;87
7.3;Summary;88
8;Chapter 3: JSON Documents;90
8.1;Concepts and Technologies: Jargon Explained;91
8.1.1;Origins: Key, Value Mechanisms;91
8.1.2;JSON;93
8.1.3;Application Programming Interface;93
8.1.4;NoSQL Interface;94
8.1.5;Document Store;95
8.2;Introducing JSON Documents;96
8.2.1;JSON Format Rules;96
8.2.2;Using JSON in MySQL;98
8.2.3;Path Expressions;103
8.2.4;JSON Functions;111
8.2.4.1;Creating JSON Data;113
8.2.4.2;Modifying JSON Data;119
8.2.4.3;Searching JSON Data;122
8.2.4.4;Utility Functions;132
8.3;Combining SQL and JSON - Indexing JSON Data;142
8.4;Summary;150
9;Chapter 4: The MySQL Shell;151
9.1;Getting Started;152
9.1.1;Features;153
9.1.2;Shell Commands;155
9.1.3;Options;157
9.1.4;Sessions and Modes;160
9.1.4.1;Session Objects;160
9.1.4.2;Modes Supported;162
9.1.5;Connections;162
9.1.5.1;Using a URI;163
9.1.5.2;Using Individual Options;164
9.1.5.3;Using Connections in Scripts;165
9.1.5.4;Using SSL Connections;166
9.2;Set Up and Install;166
9.2.1;Install the MySQL Shell;167
9.2.2;Setup the X Plugin;171
9.2.2.1;Enable the X Plugin Using the MySQL Shell;172
9.2.2.2;Enable the X Plugin Using the MySQL Client;172
9.3;Tutorial: MySQL Shell by Example;174
9.3.1;Installing the Sample Database;175
9.3.2;SQL;178
9.3.3;JavaScript;185
9.3.4;Python;188
9.4;Summary;190
10;Chapter 5: X Developer API;191
10.1;Overview;192
10.1.1;Clients;193
10.1.2;Target Language Conformity;194
10.1.3;MySQL X Module;196
10.2;Classes and Methods;197
10.2.1;Session Class;201
10.2.1.1;Schema Methods;201
10.2.1.2;Transaction Methods;203
10.2.1.3;Connection Methods;205
10.2.1.4;Miscellaneous Methods;206
10.2.2;CRUD Operations;207
10.2.2.1;Schema Class;207
10.2.2.2;Collection Class;211
10.2.2.3;Table Class;224
10.2.3;Example Data Used in this Chapter;235
10.2.4;Working with Data Sets;236
10.2.4.1;Document Identifiers;242
10.2.4.2;Auto Increment;244
10.2.4.3;Accessing Data in Data Sets;244
10.2.4.4;Accessing Metadata in Results;246
10.2.4.5;Column Metadata;248
10.2.5;Expressions;249
10.2.5.1;Expression Strings;250
10.2.5.2;Boolean Expression Strings;251
10.2.6;Warnings and Errors;252
10.2.6.1;Warnings from the Server;252
10.2.6.2;Errors from the X DevAPI;254
10.3;Additional Features;260
10.3.1;Parameter Binding;260
10.3.2;Method Chaining;264
10.3.3;CRUD Prepared Statements;265
10.3.4;Asynchronous Execution;267
10.4;For More Information;268
10.5;Summary;269
11;Chapter 6: X Plugin;270
11.1;Overview;270
11.1.1;Features;271
11.1.1.1;Secure Socket Layer (SSL) Connections;272
11.1.1.2;Changing the Default Port;274
11.1.2;Going Deeper—Journey into the Source Code;275
11.2;Options and Variables;278
11.2.1;How to View Values of Variables;278
11.2.2;How to Set Values of Variables;281
11.2.3;System Variables and Startup Options;284
11.2.4;Status Variables;286
11.3;Monitoring the X Plugin;286
11.3.1;Communication;288
11.3.2;Connections;289
11.3.3;CRUD Operations;290
11.3.4;Errors and Warnings;291
11.3.5;Sessions;292
11.3.6;SSL;293
11.3.7;Statements;295
11.3.8;Worker Threads;296
11.4;Summary;297
12;Chapter 7: X Protocol;299
12.1;Overview;299
12.1.1;Goals for the X Protocol;302
12.1.1.1;Extensibility;303
12.1.1.2;Security;303
12.1.1.3;Performance;304
12.1.2;X Protocol and Protocol Buffers;304
12.1.2.1;Installing the Protobuf Compiler;306
12.1.2.2;Protobuf Example;307
12.2;X Protocol: Under the Hood;313
12.2.1;Protobuf Implementation;313
12.2.2;X Protocol Examples;318
12.2.2.1;Example 1: Authentication;318
12.2.2.2;Example 2: Simple Inserts;320
12.2.3;X Protocol Walkthrough;323
12.2.3.1;Example 1: Authentication;323
12.2.3.2;Example 2: Simple Inserts;326
12.3;Creating X Clients;329
12.3.1;Setup for the Examples;331
12.3.2;Document Store Example;333
12.3.3;Relational Data Example;339
12.4;Summary;343
13;Chapter 8: Library Application: User Interface;345
13.1;Getting Started;346
13.1.1;Library Application;346
13.1.2;Setup Your Environment;347
13.1.2.1;Installing Flask;349
13.1.2.2;Installing Flask-Script;350
13.1.2.3;Installing Flask-Bootstrap;351
13.1.2.4;Installing Flask-WTF;352
13.1.2.5;Installing WTForms;352
13.2;Flask Primer;355
13.2.1;Terminology;357
13.2.2;Initialization and the Application Instance;359
13.2.2.1;Flask-Script;359
13.2.2.2;Flask-Bootstrap;362
13.2.2.3;WTForms;363
13.2.2.4;Flask-WTF;363
13.2.2.4.1;Form Classes;363
13.2.2.4.2;CSRF Protection;367
13.2.2.5;Message Flashing;367
13.2.3;HTML Files and Templates;368
13.2.3.1;Jinja2 Templates Overview;369
13.2.3.2;Template Language Constructs;374
13.2.3.2.1;Comments;374
13.2.3.2.2;Include;374
13.2.3.2.3;Macros;375
13.2.3.2.4;Import;375
13.2.3.2.5;Extend (Inherit);376
13.2.3.2.6;Blocks;376
13.2.3.2.7;Loops;376
13.2.3.2.8;Conditionals;377
13.2.3.2.9;Variables and Variable Filters;378
13.2.3.3;HTML Files Using Templates;379
13.2.4;Error Handlers;382
13.2.4.1;Not Found (404) Errors;383
13.2.4.2;Application (500) Errors;383
13.2.5;Redirects;384
13.2.6;Additional Features;385
13.2.7;Flask Review: Sample Application;386
13.3;Library Application User Interface Design;388
13.3.1;Preparing the Directory Structure;389
13.3.2;User Interface Features;390
13.3.3;Form Classes;394
13.3.3.1;Author Form Class;394
13.3.3.2;Publisher Form Class;395
13.3.3.3;Book Form Class;395
13.3.3.4;List Form Class;398
13.3.4;View Functions;398
13.3.5;Templates;401
13.3.5.1;Author Template;402
13.3.5.2;Publisher Template;403
13.3.5.3;Book Template;404
13.3.5.4;List Template;406
13.3.5.5;Other Templates;407
13.3.6;Application Code;407
13.4;Summary;411
14;Chapter 9: Library Application: Database Implementations;412
14.1;Version 1: Relational Database;413
14.1.1;Database Design;413
14.1.2;Database Code;417
14.1.2.1;SQL Strings;417
14.1.2.2;Author Class;419
14.1.2.3;Publisher Class;421
14.1.2.4;Book Class;423
14.1.2.5;Library Class;427
14.1.3;Application Code;430
14.1.3.1;Setup and Initialization;430
14.1.3.2;List View Function;431
14.1.3.3;Author View Function;433
14.1.3.4;Publisher View Function;437
14.1.3.5;Book View Function;439
14.1.4;Templates;444
14.1.5;Executing the Code;444
14.1.6;Observations;446
14.2;Version 2: Relational Database + JSON Fields (Hybrid);447
14.2.1;Database Design;447
14.2.2;Database Code;450
14.2.2.1;Code Deleted;451
14.2.2.2;SQL Strings;451
14.2.2.3;Library Class;453
14.2.2.4;Publisher Class;456
14.2.2.5;Book Class;458
14.2.3;Application Code;463
14.2.3.1;Setup and Initialization;464
14.2.3.2;Form Classes;464
14.2.3.3;View Functions;465
14.2.4;Templates;469
14.2.5;Executing the Code;471
14.2.6;Observations;474
14.3;Version 3: Document Store;474
14.3.1;Database Design;475
14.3.2;Database Code;476
14.3.2.1;Code Deleted;477
14.3.2.2;Setup and Initialization;477
14.3.2.3;Books Class;478
14.3.2.3.1;Class Declaration;478
14.3.2.3.2;Create Function;479
14.3.2.3.3;Read Function;480
14.3.2.3.4;Update Function;480
14.3.2.3.5;Delete Function;482
14.3.2.3.6;Utility Functions;482
14.3.2.3.7;Completed Code;484
14.3.3;Application Code;490
14.3.3.1;Setup and Initialization;491
14.3.3.2;Form Classes;491
14.3.3.3;Book View Function;493
14.3.4;Templates;497
14.3.5;Executing the Code;499
14.3.6;Observations;502
14.4;Challenges;502
14.5;Summary;503
15;Chapter 10: Planning for MySQL 8 and the Document Store;504
15.1;Upgrading from MySQL 5.7 and Earlier;505
15.1.1;Types of Upgrades;505
15.1.1.1;Revision Upgrade;506
15.1.1.2;Minor Upgrade;507
15.1.1.3;Major Upgrade;507
15.1.1.4;Incompatible Upgrades;507
15.1.2;Upgrade Practices;509
15.1.2.1;Check Prerequisites;509
15.1.2.2;Plan the Upgrade;511
15.1.2.3;Consider Parallel Deployment;512
15.1.2.4;Test, Test, Test!;512
15.1.2.5;Production Deployment Strategies;513
15.1.3;Reasons for Upgrading;514
15.1.4;Considerations for Upgrading to MySQL 8;515
15.2;Migrating to Schemaless Documents;517
15.2.1;Normalization vs. Denormalization;518
15.2.2;Formal Rules vs. Heuristics;518
15.2.2.1;View Data as Code;520
15.2.3;Take Storage for Granted;520
15.2.4;Embed or Separate?;520
15.2.5;Strategies for Migrating to a Document Store;521
15.2.5.1;Migrating to a Hybrid Solution;526
15.2.5.2;Converting to a Document Store;531
15.3;Document Store Tips and Tricks;535
15.4;Summary;537
16;Index;538



Ihre Fragen, Wünsche oder Anmerkungen
Vorname*
Nachname*
Ihre E-Mail-Adresse*
Kundennr.
Ihre Nachricht*
Lediglich mit * gekennzeichnete Felder sind Pflichtfelder.
Wenn Sie die im Kontaktformular eingegebenen Daten durch Klick auf den nachfolgenden Button übersenden, erklären Sie sich damit einverstanden, dass wir Ihr Angaben für die Beantwortung Ihrer Anfrage verwenden. Selbstverständlich werden Ihre Daten vertraulich behandelt und nicht an Dritte weitergegeben. Sie können der Verwendung Ihrer Daten jederzeit widersprechen. Das Datenhandling bei Sack Fachmedien erklären wir Ihnen in unserer Datenschutzerklärung.