Main PDF 6 - MySQL Database
Main PDF 6 - MySQL Database
Emerging Technologies
MODULE 6
MySQL Database
Objectives
• To provide a good background of Relational Database using
MySQL.
• To know the importance of Database in Web Application using
MySQL.
• To Identify the importance of Database Structure in constructing
tables.
• To be familiar with the syntax in managing users and database.
• To define a good structure of tables in a given database for data
storage.
• To be familiar in the common syntax of creating database and
tables and the correct data type to be used for each field.
Introduction to Databases
• Database – is an ordered collection of information
from which a computer program can quickly access.
• Information stored in computer databases is actually
stored in tables similar to spreadsheet.
• A record in a database is a single complete set of
related information.
• Fields are the individual categories of information
stored in a record.
Example: Employee Directory DB
Fields
Records (Row)
mysql > \s
Basic Commands
Basic Commands
• Need help?:
mysql > \h
mysql > ?
mysql > \?
* You remove a table from the database when it is not required. You
use the DROP TABLE statement to remove a table. When you remove
a table, all the data from the table is also deleted.
To Delete Database
Syntax: DROP DATABASE <database name>;
mysql> DROP DATABASE dbStudent;