Book Image

MariaDb Essentials

Book Image

MariaDb Essentials

Overview of this book

This book will take you through all the nitty-gritty parts of MariaDB, right from the creation of your database all the way to using MariaDB’s advanced features. At the very beginning, we show you the basics, that is, how to install MariaDB. Then, we walk you through the databases and tables of MariaDB, and introduce SQL in MariaDB. You will learn about all the features that have been added in MariaDB but are absent in MySQL. Moving on, you’ll learn to import and export data, views, virtual columns, and dynamic columns in MariaDB. Then, you’ll get to grips with full-text searches and queries in MariaDb. You’ll also be familiarized with the CONNECT storage engine. At the end of the book, you’ll be introduced to the community of MariaDB.
Table of Contents (15 chapters)
MariaDB Essentials
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Working with operators


In our examples, we used several operators, such as equals (=), less than, and greater than (<, >), and others. Now it is time to discuss operators in general, and list the most important ones.

In general, an operator is a sign that takes one or more operands, and returns a result. Several groups of operators exist in MariaDB. In this section, we will discuss the main types:

  • Comparison operators

  • String operators

  • Logical operators

  • Arithmetic operators

Comparison operators

A comparison operator checks if there is a certain relationship between its operands. If the relationship exists, the operator returns 1; otherwise it returns 0. For example, let's take the equality operator, which is probably the most used:

1 = 1 -- returns 1: the equality relationship exists
1 = 0 -- returns 0: no equality relationship here

In MariaDB, 1 and 0 are used in many contexts to indicate if something is true or false. In fact, MariaDB does not have a Boolean data type, so TRUE and FALSE...