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

Preface

Nowadays, computers are present everywhere, and they are all connected to each other. A lot of information is exchanged between them, but this data needs to be stored somewhere.

MariaDB is a fork of MySQL, started when MySQL was acquired by Sun Microsystems in 2008. Sun Microsytems and MySQL were then acquired by Oracle in 2009.

In most Linux distributions, MariaDB is now the default package, providing a relational database that is compatible with MySQL.

MariaDB has interesting new features, better testing, performance improvement, and bug fixes that are not available in MySQL.

This book provides an introduction to the SQL language. It presents some advanced features of MariaDB and features that aren't present in MySQL but come with MariaDB. By the end of this book, you should be able get your own MariaDB database server running and take advantage of its features.

What this book covers

Chapter 1, Installing MariaDB, describes the steps that need be taken before starting to use MariaDB.

Chapter 2, Databases and Tables, explains how to create data structures.

Chapter 3, Getting Started with SQL, covers the statements used to add, modify, or delete data in a database and the queries used to extract information.

Chapter 4, Importing and Exporting Data, explains how to import and export data.

Chapter 5, Views and Virtual Columns, presents views and virtual columns, which are used to shift the data logic from an application to a database.

Chapter 6, Dynamic Columns, explains how to store heterogeneous data in MariaDB using dynamic columns.

Chapter 7, Full-Text Searches, presents different ways to do full-text searches with MariaDB.

Chapter 8, Using the CONNECT Storage Engine, presents the CONNECT storage engine and ways to connect external data sources directly to MariaDB.

What you need for this book

To put the information provided in this book into practice, you need to install MariaDB on your computer. MariaDB runs on most operating systems, but the following are specifically mentioned in this book: Windows (from XP to Windows 8), Mac OS X, or a standard Linux distribution. Ubuntu, Debian, Mint, Fedora, CentOS, and Red Hat EL, among others, are also supported.

You will also need an Internet connection and the necessary administrative rights to install any software in order to install MariaDB.

No other software is required.

Who this book is for

If you don't know the SQL language but want to quickly jump into the SQL world and learn how to use MariaDB, this is the book for you.

Alternatively, if you already know how to use MySQL but want to go further into it in detail, this book is ideal for you. You will learn all the features added in MariaDB but absent in MySQL.

Conventions

In this book, you will find a number of text styles that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles are shown as follows: "Create a /tmp/mariadb/books2.xml file following this structure."

A block of code is set as follows:

   <book id="bk101">
      <author>
         <last>Gambardella</last>
         <first>Matthew</first>
      </author>
      <title>XML Developer's Guide</title>
      <genre>Computer</genre>
      <price>44.95</price>
      <publish_date>2000-10-01</publish_date>
      <description>An in-depth look at creating applications
      with XML.</description>
   </book>

Any command-line input or output is written as follows:

SELECT WEEKDAY(date), COUNT(*)
  FROM product_order
  WHERE YEAR(date) = YEAR(NOW())
  GROUP BY WEEKDAY(date);

New terms and important words are shown in bold. Words that you see on the screen, for example, in menus or dialog boxes, appear in the text like this: "Clicking the Next button moves you to the next screen."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or disliked. Reader feedback is important for us as it helps us develop titles that you will really get the most out of.

To send us general feedback, simply e-mail , and mention the book's title in the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide at www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files from your account at http://www.packtpub.com for all the Packt Publishing books you have purchased. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you could report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the Errata Submission Form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded to our website or added to any list of existing errata under the Errata section of that title.

To view the previously submitted errata, go to https://www.packtpub.com/books/content/support and enter the name of the book in the search field. The required information will appear under the Errata section.

Piracy

Piracy of copyrighted material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works in any form on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors and our ability to bring you valuable content.

Questions

If you have a problem with any aspect of this book, you can contact us at , and we will do our best to address the problem.