Reading:  

Beginners guide to MySQL and MariaDB


by

Overview

What is Database? 

A database is used to store and organize collection of data. Each database has set of APIs for reading, creating, managing, replicating and searching the data it holds. 

The data can be stored using files system or hash tables in memory but fetching of data and writing will not be as easy or fast with those type of systems. 

Currently we are using relational database management systems (RDBMS) for storing and managing huge volume of data. This is called relational database because all data are stored into different tables and relations are established using primary keys or other keys known as foreign keys. 

A Relational Database Management System (RDBMS) is a software which implements: 

  • Enables to implement a database with tables, columns, rows and indexes.
  • Maintain referential Integrity between rows of various tables.
  • Automatically index get updated. 

 

RDBMS Terminology:

 

Some of RDBMS Terminology are:

  • Database: A database consists of table’s collection along with related data.
  • Table: A table is matrix with data. A table in database looks like a simple spreadsheet.
  • Column: A column (data element) contains data of one type and same kind.
  • Row: A row (= tuple, entry or record) is a group of related data.
  • Redundancy: Storing data twice, redundantly to make system faster.
  • Primary Key: It is unique. It is used to access the data in that row. Each row in table has one Unique key.
  • Foreign Key: A foreign key is used to link between two relational tables.
  • Compound Key: A compound key (composite key) consists of multiple columns, because one column is not sufficiently unique.
  • Index: An index in database resembles to index page of a book.
  • Referential Integrity: Referential Integrity ensure that a foreign key value always points to existing row.

 

MySQL Database:

MySQL is simple and fast RDBMS database used for many big and small businesses. The MySQL development project has made its source code available under terms of GNU General Public License, as well as under a variety of proprietary agreements. MySQL was owned and sponsored by a single for-profit firm, Swedish company MySQL AB, now owned by Oracle Corporation. MySQL is popular due to following reason:

  • MySQL is released under an open-source license.
  • MySQL is powerful program in its own right.
  • MySQL uses a SQL data language.
  • MySQL works on different operating systems and with many languages including C#, PHP, C, C++, PERL, JAVA, etc.
  • MySQL works very quickly and works well with large data sets.
  • MySQL supports large databases up to 50 million rows or more in table.

 

MariaDB database

As from MariaDB website "MariaDB is a drop-in replacement for MySQL", it is no different to MySQL in the way queries and stuff are handled or the database engines used.

 

Description

In this tutorial, we will cover few topics that will give you a heads on start to build your knowledge on. Topics that we will cover briefly but still providing enough information are listed below

  • Overview
  • Installing on Linux and Windows
  • Some useful admin queries for starters
  • Connection
  • Create Database
  • Drop Database
  • Select Database
  • Data Type
  • Create Table
  • Drop Table
  • Inserting and Selecting data
  • Where Clause
  • Updating and deleting data
  • Like Clause
  • Sorting Result
  • Using Joins
  • Brief introduction to Regex, Transactions and Indexes
  • Alter Command
  • Temporary Tables
  • Database Info
  • Using Sequence
  • Database Export and Import
  • Resetting MySQL/MariaDB Administrator password


Audience

Absolute beginners looking to get a sneak peak into what MySQL. Please remember that this is not a full on guide but a quick introduction to the subject.

Learning Objectives

Get to know MySQL and MariaDB

Author: Subject Coach
Added on: 23rd Jun 2015

You must be logged in as Student to ask a Question.

None just yet!