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.
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 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.
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.