Databases let you store lots of information for easy access on a site. Web development courses will often teach how to save content to databases using web forms.
2. INTRODUCTION
Databases let you store lots of
information for easy access on a
site. Web development courses will
often teach how to save content to
databases using web forms.
3. MODULE OBJECTIVES
Upon completion of this module, you should
be able to:
• Define database
• Describe the different types of databases
o Flat
o Relational
• Define DB and user access
• Identify common uses for databases
• Describe phpMyAdmin
• Apply your knowledge to setup a MySQL
database and user in cPanel
4. WHAT IS A DATABASE?
A database is a computerized system that
makes it easy to:
o Search for information
o Select information
o Store information
The most common reason for needing a
database is when a customer is using a
Content Management System (CMS) such as
WordPress or Joomla.
A database acts as the brain of the website.
Anytime you make a change to your website
your database is what remembers the change
or update.
5. TYPES OF DATABASES
Databases can be of two types, let’s explore
each of them in detail.
FLAT FILE RELATIONAL
Flat file
A "flat file" database allows users to specify data
attributes (columns, datatypes) for one table at a
time, storing those attributes independently from any
application.
dBase III and Paradox are good examples of this
kind of database in the CP/M and MS-DOS
environments, and the original FileMaker was a
good Mac O/S example.
6. TYPES OF DATABASES
IP addresses can be either static or dynamic.
FLAT FILE RELATIONAL
Relational
A relational database is one that contains multiple
tables of data that relate to each other through
special key fields.
Relational databases are far more flexible (though
harder to design and maintain) than what are known
as flat file databases, which contain a single table of
data.
7. Let’s see..
PAYING ATTENTION?
Select one or more of
the options. Then move
on to the next slide to
check your answer.
They are more flexible but harder to design.
They contain multiple tables.
FileMaker is an example of a relational database.
Which of the following statements are true relational databases?
8. Let’s see..
PAYING ATTENTION?
Select one or more of
the options. Then move
on to the next slide to
check your answer.
Which of the following statements are true relational databases?
Relational databases contain multiple
tables and are far more flexible tan flat
file databases.
They are more flexible but harder to design.
They contain multiple tables.
FileMaker is an example of a relational database.
9. USING DATABASES
Databases affect almost every aspect of daily life -- from grocery store inventories and cable-TV subscriber
information to marketing mailing lists and issuing payroll checks to employees. Databases aren't just for big
business. You can create a handy personal or family database to keep track of just about anything, including your
video game collection, recipes, contacts, music CDs and books.
10. DIFFERENT USES OF
DATABASES
FOR EDUCATION
The business world depends on databases 24 hours a day, seven days a week.
Inventory, order processing, payroll, accounting, shipping and transportation
routing are often tracked within a main database that keeps the company
functioning.
FOR BUSINESSES
FOR NON-PROFITS
FOR HOUSEHOLD
EVERYDAY USES
11. FOR BUSINESSES
From elementary schools to colleges, educational institutions use databases to
keep track of students, grades, transfers, transcripts and other student data.
There are even specialized database packages geared toward schools and
colleges.
FOR EDUCATION
FOR NON-PROFITS
FOR HOUSEHOLD
EVERYDAY USES
DIFFERENT USES OF
DATABASES
12. FOR EDUCATION
Like businesses and educational institutions, non-profit organizations use
systems to track information. Many charities and other non-profit groups use a
database to store details of donations, volunteers, hours served in the
community, clients helped and other information related to the organization.
FOR NON-PROFITS
FOR BUSINESSES
FOR HOUSEHOLD
EVERYDAY USES
DIFFERENT USES OF
DATABASES
13. FOR EDUCATION
The database also has a role in household and family management. Many
people use databases to keep track of family birthdays, bills and expenses in the
home; addresses of friends and relatives and movie/DVD collections.
FOR HOUSEHOLD
FOR NON-PROFITS
FOR BUSINESSES
EVERYDAY USES
DIFFERENT USES OF
DATABASES
14. FOR EDUCATION
Each time you make a purchase and the sales clerk asks for your address or ZIP
code, your information is kept and stored on a customer database. These
collections of data are used to send mailings of special offers, discounts and
other deals.
EVERYDAY USES
FOR NON-PROFITS
FOR HOUSEHOLD
FOR BUSINESSES
DIFFERENT USES OF
DATABASES
15. Let’s see..
PAYING ATTENTION?
Select one of the
options. Then move on
to the next slide to check
your answer.
True or False:
Databases are essential for the business world.
True
False
16. Let’s see..
PAYING ATTENTION?
Select one of the
options. Then move on
to the next slide to check
your answer.
True or False:
Databases are essential for the business world.
True
False
True!
The business world depends on
databases 24/7
17. PAYING ATTENTION?
PhpMyAdmin is one of the most popular applications
for MySQL databases management. It is a free tool
written in PHP.
Through this software you can create, alter, drop,
delete, import and export MySQL database tables.
You can run MySQL queries, optimize, repair and
check tables, change collation and execute other
database management commands.
All the SiteGround clients can manage their MySQL
databases through the preinstalled PhpMyAdmin
software which is integrated in cPanel.
18. phpMyAdmin
MAIN FEATURES
The main PhpMyAdmin features are:
• A User-friendly web interface;
• Support for most MySQL functions like browse, drop, create, copy and alter databases, tables, views, fields and indexes, execute
MySQL queries
• Manage stored procedures and functions;
• Import data from CSV and SQL files;
• Export data to various formats: CSV, SQL, XML, PDF, ISO/IEC 26300 - OpenDocument Text and Spreadsheet, Word, Excel,
LATEX and others;
• Search globally in a database or a subset of it
19. MySQL is an open source database
management software that helps users store,
organize, and later retrieve data.
It has a variety of options to grant specific
users nuanced permissions within the tables
and databases.
DESCRIBE
MySQL
20. Let’s start by making a new user within the MySQL shell.
CREATE
A NEW USER
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
Then, provide the user with access to the information they will need.
The asterisks in this command refer to the database and table
(respectively) that they can access—this specific command allows to
the user to read, edit, execute and perform all tasks across all the
databases and tables.
GRANT ALL PRIVILEGES ON * . * TO 'newuser'@'localhost';
To provide a specific user with a permission, you can use this framework:
GRANT [type of permission] ON [database name].[table name]
TO ‘[username]’@'localhost’;
21. PRACTICE TASK
Take some time to
research and complete
this task.
1. Practice creating a database using the DB wizard in cPanel
2. Open up phpMyAdmin
3. Explain what a database is and how it can be useful in relation to web hosting
22. ASSESMENT
Setup a MySQL database
and user in cPanel.
Share your outcome with the
rest of the class.
23. CONGRATULATIONS! You should now be able to:
• Define database
• Describe the different types of databases
o Flat
o Relational
• Define DB and user access
• Identify common uses for databases
• Describe phpMyAdmin
• Apply your knowledge to setup a MySQL
database and user in cPanel