MariaDB formally known as MYSQL developed in 2009 is high compatible and exact matching with MySQL APIs and commands. The original developers of MySQL created MariaDB after concerns raised by Oracle’s acquisition of MySQL.
MariaDB (and its predecessor MySQL) has been used around the world for over 20 years

Introduction to Relational Databases:
A database is as a collection of related files. A database and the tool that controls the database, called a database management system (DBMS). Most databases today are relational databases because they deal with tables containing related fields.
So let’s understand a few terms related to databases:
Database − A database is a data source containing tables of related data.
Table − A table, like a spreadsheet or excel sheet, containing data in tabular way.
Column − A column, is a structure holding data of one type.
Row − A row, sometime also known as a tuple or record is a structure grouping related data.
Primary Key − this refers to a unique, identifying value. This value cannot repeat within a table, and there can have only one primary key in the table.
Foreign Key − a foreign key serves as a link or interface between two tables.
Compound Key − A compound key is a key that refers to multiple columns.
Data types in Mysql / Mariadb :
Numeric Data Types:
INT (Integer): Int data type represents an integer of normal size. So simply it can used to store numeric value. There are also BIGINT, MEDIUMINT, SMALLINT and TINYINT which represent different range of integer values.
DECIMAL: Decimal data type represents numbers with specific floating values. Maximum permitted value is 65 and maximum decimals are 30. There are also FLOAT and DOUBLE to store numeric values with floating point.
BOOLEAN: This data type associates a value 0 with “false,” and a value 1 with true.
Date and Time Data Types:
DATE: The DATE data type represents a date in “YYYY-MM-DD” format.
TIME: The TIME data type represents a time in “hh:mm:ss” format.
DATETIME: The DATETIME data type represents date and time in “YYYY-MM-DD HH:MM:SS” format.
TIMESTAMP: This data type represents a timestamp of the “YYYY-MM-DD HH:MM:DD” format. it mainly used to insert current date and time of record insertion / updatation and deletion process.
String Data Types
CHAR: This data type represents a fixed-length string. default value is 1.
VARCHAR: This data type represents a variable-length string of 0 to 65535.
TEXT: This data type represents a text column with a maximum length of 65,535 characters. some more Text data types are MEDIUMTEXT, LONGTEXT and TINYTEXT.
ENUM: The ENUM data type represents a string object and allows only a single value from a given list.
SET: The SET data type represents a string object having zero or more values from a given list.
Types of Mysql/ MariadbTables
Now that you understand some of the general features of tables, you should know that there are different types of tables.
There are some main types of tables in the current version of Mysql:
MyISAM-A default table and will usually be sufficient for the user’s needs. It supports all the field types and the parameters.
ISAM- It is same as the MyISAM table, except that it can’t handle data larger than 4GB this means it isn’t portable across operating systems. This table type is no longer be available in PHP5.
HEAP – These are mostly used for temporary tables they don’t support a common features of the MyISAM table, such as auto_increment and blob/text columns etc.

author image

About admin

You Might Also Like...

php book written by indian author Hirdesh Bhardwaj
Online Video Tutorials-Hirdesh Bhardwaj
Table Example in Bootstrap

Leave a Reply

Your email address will not be published.

Enjoy the tutorial? Please spread the word :)

Follow by Email