Waxspace Hosting - Shared Web Hosting - Cheap Domain Names - Linux Web Hosting
Databases - Web Hosting Curriculum [6/10]
-
Upload
web-hosting-for-students -
Category
Technology
-
view
30 -
download
4
Transcript of Databases - Web Hosting Curriculum [6/10]
WEB HOSTINGModule 6: Databases
INTRODUCTIONDatabases 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.
MODULE OBJECTIVESUpon completion of this module, you should be able to:
• Define database• Describe the different types of
databaseso Flato 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
WHAT IS A DATABASE?
A database is a computerized system that makes it easy to:
o Search for informationo Select informationo 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.
TYPES OF DATABASES
Databases can be of two types, let’s explore each of them in detail.
FLAT FILE RELATIONALFlat 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.
TYPES OF DATABASES
IP addresses can be either static or dynamic.
FLAT FILE RELATIONALRelational
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.
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?
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.
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.
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
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
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
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
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
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
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
FalseTrue!
The business world depends on databases 24/7
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.
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
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.
DESCRIBEMySQL
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’;
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
ASSESMENT
Setup a MySQL database and user in cPanel.
Share your outcome with the rest of the class.
CONGRATULATIONS! You should now be able to:
• Define database• Describe the different types of
databaseso Flato 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