Check out example codes for "Manage Database in MySQL". It will help you in understanding the concepts better.

Code Example 1

Before doing anything else with the data, you need to create a database. A database is a container of data. It stores contacts, vendors, customers or any kind of data that you can think of.

In MySQL, a database is a collection of objects that are used to store and manipulate data such as tables, database views, triggers, and stored procedures.

To create a database in MySQL, you use the CREATE DATABASE  statement as follows:

CREATE DATABASE [IF NOT EXISTS] database_name;
Let’s examine the CREATE DATABASE  statement in greater detail:

Followed by the CREATE DATABASE  statement is database name that you want to create. It is recommended that the database name should be as meaningful and descriptive as possible.
The IF NOT EXISTS  is an optional clause of the statement. The IF NOT EXISTS clause prevents you from an error of creating a new database that already exists in the database server. You cannot have 2 databases with the same name in a MySQL database server.

Learn ReactJs, React Native from akashmittal.com