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 columns


A table row can be seen as a collection of named properties are called columns or fields. So, columns must suit the units of data that make up the information.

In the previous sections, we learned the most important SQL statements for managing databases and tables. We have also seen some example column definitions. In this section, we will discuss the following:

  • Column definitions

  • The management of columns

A column definition has the following syntax:

<column_name> <data_type> [type_attributes] [NULL | NOT NULL]
[DEFAULT <value>] [AUTO_INCREMENT] [COMMENT 'string']

The following subsections will explain the data types, the NULL attribute, and the default values. The AUTO_INCREMENT attribute and comments will be discussed later in the indexing section of this chapter.

Data types

The data type is the most important characteristic that we need to set: it determines the class of data that the column will contain, its size, the way it will be stored, and the operations...