MYSQL02: Creating Database

MySQL database server manages more than one databases. But first, a database needs to be created inside the server before we can store some data. To create a database we use CREATE and DATABASE command.

CREATE DATABASE databaseName;

These commands will create a database with a given name. Database name are usually same as the application name, for example if we a developing an application for bookstore, most logical name for the database is also bookstore.

Once the database is created it has no data. It need tables to store them because, data are stored inside table. Each database can have one or more tables. Each table made of rows and columns.


Column 1
Column 2
Column 3
Row1




Row2










Columns represent the fields of the table. Fields are what data the table can store. Each row is a record of an entity. For example:

id
name
age
1
Calvin
12
2
Joe
15
3
Rosy
17

Where, (id, name, age) are fields of these table. First record is [1, Calvin, 12]. Followed by [2, Joe, 15] the second record and [3, Rosy, 17] is the third and last record.

Comments

Popular posts from this blog

Drawing Simple Pie Chart

VB.net connecting to SQL Server

VB.net