Online Book Reader

Home Category

MariaDB Crash Course - Ben Forta [4]

By Root 519 0
and also to help you identify important concepts.

Text that you type and text that should appear on your screen is presented in monospace type. It looks like this to mimic the way text looks on your screen.

Placeholders for variables and expressions appear in monospace italic font. You should replace the placeholder with the specific value it represents.

This arrow () at the beginning of a line of code means that a single line of code is too long to fit on the printed page. Continue typing all the characters after the as though they were part of the preceding line.

* * *

Note

A Note presents interesting pieces of information related to the surrounding discussion.

* * *

* * *

Tip

A Tip offers advice or teaches an easier way to do something.

* * *

* * *

Caution

A Caution advises you about potential problems and helps you steer clear of disaster.

* * *

* * *

New Term

Provides clear definitions of new, essential terms.

* * *

Input

The Input icon identifies code that you can type in yourself. It usually appears next to a listing.

Output

The Output icon highlights the output produced by running MariaDB code. It usually appears after a listing.

Analysis

The Analysis icon alerts you to the author’s line-by-line analysis of input or output.

1. Understanding SQL

In this chapter, you learn about databases and SQL, prerequisites to learning MariaDB.

Database Basics


The fact that you are reading this book indicates that you, somehow, need to interact with databases. And so before diving into MariaDB and its implementation of the SQL language, it is important that you understand some basic concepts about databases and database technologies.

Whether you are aware of it or not, you use databases all the time. Each time you select a name from your e-mail address book, you are using a database. If you conduct a search on an Internet search site, you are using a database. When you log in to your network at work, you are validating your name and password against a database. Even when you use your ATM card at a cash machine, you are using databases for PIN verification and balance checking.

But even though we all use databases all the time, there remains much confusion over what exactly a database is. This is especially true because different people use the same database terms to mean different things. Therefore, a good place to start our study is with a list and explanation of the most important database terms.

* * *

Tip: Reviewing Basic Concepts

What follows is a brief overview of some basic database concepts. It is intended to either jolt your memory if you already have some database experience, or to provide you with the absolute basics, if you are new to databases. Understanding databases is an important part of mastering MariaDB, and you might want to find a good book on database fundamentals to brush up on the subject if needed.

* * *

What Is a Database?


The term database is used in many different ways, but for our purposes a database is a collection of data stored in some organized fashion. The simplest way to think of it is to imagine a database as a filing cabinet. The filing cabinet is simply a physical location to store data, regardless of what that data is or how it is organized.

* * *

New Term: Database

A container (usually a file or set of files) to store organized data.

* * *

* * *

Caution: Misuse Causes Confusion

People often use the term database to refer to the database software they are running. This is incorrect, and it is a source of much confusion. Database software is actually called the Database Management System (or DBMS). The database is the container created and manipulated via the DBMS. A database might be a file stored on a hard drive, but it might not. And for the most part this is not even significant as you never access a database directly anyway; you always use the DBMS, and it accesses the database for you.

* * *

Tables


When you store information in your filing cabinet you don’t just toss

Return Main Page Previous Page Next Page

®Online Book Reader