Book Image

Getting Started with MariaDB

By : Daniel Bartholomew
Book Image

Getting Started with MariaDB

By: Daniel Bartholomew

Overview of this book

<p>In the modern age, storing data is of paramount importance, and this is where databases enter the picture. MariaDB is a relatively new database that has become very popular in a short amount of time. It is a community-developed fork of MySQL and it is designed to be an enhanced and backward compatible database solution.</p> <p>Getting Started with MariaDB is a practical, hands-on, beginner-friendly guide to installing and using MariaDB. This book will start with the installation of MariaDB before moving on to the basics. You will then learn how to configure and maintain your database with the help of real-world examples.</p> <p>Getting Started with MariaDB literally starts at square one by walking you through the basics of what you need to know about MariaDB. This book will teach you how to install MariaDB as well as how to configure it. Following that, you will then be shown how to secure MariaDB. This book will also teach you common commands and will help you learn how to maintain a MariaDB server.</p>
Table of Contents (14 chapters)

Selecting, inserting, updating, and deleting data


Getting data into and out of our database tables and updating, and deleting data when necessary is where we will spend most of our time when working with MariaDB.

Inserting data

To put data into our database, we use the INSERT command. The basic syntax isas follows:

INSERT [INTO] <table_name> [(<column_name>[, column_name,...])]
{VALUES | VALUE}
({expression|DEFAULT},...)[,(...),...];

As with the CREATE TABLE command, the parts in angle brackets (<>) are what we'll replace with our own values. The square brackets ([]) are optional and the pipe character (|) means or. The curly brackets ({}) specify a section that is mandatory but for this there is a choice of the key word you can use. For example, the INTO keyword is optional but makes the INSERT line more readable and we can use the keyword VALUES or VALUE depending on whether or not we are inserting a column of information or multiple items but we must use one of them. Anywhere...