SlideShare ist ein Scribd-Unternehmen logo
1 von 32
CGS 2835 Interdisciplinary Web Development
Web
Database
Useful
Web Apps
+
CGS 2835 Interdisciplinary Web Development
The Value of Databases
• Databases and Database Management Systems (DBMS)
transform large quantities of data into specific and
valuable information for accomplishing some goal.
CGS 2835 Interdisciplinary Web Development
AMP
•Apache – open source Web server
•MySQL – open source database
•PHP – programming language that
works in HTML to provide
interactivity with MySQL
CGS 2835 Interdisciplinary Web Development
Database
Server
Web
ServerHTML REQUEST w/DATAHTML REQUEST w/DATA
SQL CommandSQL Command
PHP
CGS 2835 Interdisciplinary Web Development
Database
Server
Web
Server
PHP
data
PHP-created HTML
CGS 2835 Interdisciplinary Web Development
MySQL
Database
Server
PHPdata
PHP-created HTML
SQLSQL
Our Focus
CGS 2835 Interdisciplinary Web Development
Databases
CGS 2835 Interdisciplinary Web Development
File or Table
Database
• A collection of data organized to meet user’s
needs.
Records
(Entities)
Field
(Attribute)
CGS 2835 Interdisciplinary Web Development
Database Fields
• Fields are set to hold
specific types of data.
CGS 2835 Interdisciplinary Web Development
Database
A Database
is a
collection of
files/tables
CGS 2835 Interdisciplinary Web Development
Database Heirarchy
Table
CGS 2835 Interdisciplinary Web Development
Keys and Primary Key
• Key: A field in a record that is used to identify
the record
• Primary key: A field that uniquely identifies a
record
– A primary key field prevents duplicate records
from occurring in a table.
CGS 2835 Interdisciplinary Web Development
Primary Keys
• User identification number
• Sometimes email addresses are used as a unique
login, assuming two people cannot have the same
email
• A number is faster to look up, so a unique number
is often still generated
CGS 2835 Interdisciplinary Web Development
Primary Key
CGS 2835 Interdisciplinary Web Development
The Relational Model
• In a relational database, tables are linked (related) through
common fields.
• This can remove redundant data, and organize information
CGS 2835 Interdisciplinary Web Development
“Flat” database
userID First Name Last Name Email, …, … Message
1 Geo Miller …, … , … Hello!
2 Ken Baldauf …, … , … Greetings, how
are you?
1 Geo Miller …, … , … Doing well
2 Ken Baldauf ……, … , … Great!
The Relational Model
CGS 2835 Interdisciplinary Web Development
“Relational”
databaseuserID First
Name
Last
Name
Email, …,
…
1 Geo Miller …, … , …
2 Ken Baldauf …, … , …
The Relational Model
userID Message
1 Hello!
2 Greetings, how
are you?
1 Doing well
2 Great!
CGS 2835 Interdisciplinary Web Development
Relation Types
• One-to-many
– Makes use of primary key
– Example: one person makes
many posts
• One-to-one
– A piece of data only relating to one
record
• Many-to-many
– An item can have many sellers
and sellers can sell that item
many times
CGS 2835 Interdisciplinary Web Development
MySQL
An open-source, relational database
CGS 2835 Interdisciplinary Web Development
MySQL - Installing
• Some servers require an administrator to install
• On your own machine, there are installation packages for
AMP
• On Codio:
– parts install mysql
– parts start mysql
• On many linux distributions:
– apt-get install mysql-server
– service mysql start
CGS 2835 Interdisciplinary Web Development
MySQL – Creating a Database
Creating a database in MySQL is traditionally done with a terminal that has
administrator access to the MySQL server.
CREATE DATABASE IF NOT EXISTS “databasename”
A MySQL user must be created and given access to use the new database
CREATE USER IF NOT EXISTS “username”
SET PASSWORD FOR “username”=PASSWORD(“password”)
GRANT ALL PRIVILEGES ON “databasename” TO “username”
IDENTIFIED BY “password”
CGS 2835 Interdisciplinary Web Development
phpMyAdmin
is a popular application
for managing mySQL
databases.
Here you can click a
database name to access
its properties and tools.
Note that whenever
prompted for charset or
collation select UTF-8
Unicode (utf8).
CGS 2835 Interdisciplinary Web Development
Access MySQL Database
We will use phpMyAdmin
to:
•Create tables in databases
•Create fields in the tables
•Manage the database
•Examine table data
We will use PHP to:
• Enter records into tables
from HTML forms
• Read records from tables
and output to HTML pages
CGS 2835 Interdisciplinary Web Development
When I click my database link in phpMyAdmin, I am prompted to create a table.
CGS 2835 Interdisciplinary Web Development
Then I create fields for my table.
CGS 2835 Interdisciplinary Web Development
I can then use the
Insert tab to enter
records into the table.
CGS 2835 Interdisciplinary Web Development
CGS 2835 Interdisciplinary Web Development
The browse buttons allows you to view the contents of the table.
CGS 2835 Interdisciplinary Web Development
CGS 2835 Interdisciplinary Web Development
You can also run SQL
queries on your data from
within phpMyAdmin.
CGS 2835 Interdisciplinary Web Development
MySQL & phpMyAdmin
• phpMyAdmin is a useful tool for manipulating mySQL
databases; however, in order to work with Web-generated
data, the mySQL database must be accessed from the HTML
code using PHP.
MySQL
Database
Server
SQLSQLSQLSQL
PHP
CGS 2835 Interdisciplinary Web Development
MySQL & phpMyAdmin
• Either method of interacting with the database
requires knowledge of SQL
MySQL
Database
Server
SQLSQLSQLSQL
PHP

Weitere ähnliche Inhalte

Was ist angesagt?

Ajax Frameworks in the J(2)EE Environment
Ajax Frameworks in the J(2)EE EnvironmentAjax Frameworks in the J(2)EE Environment
Ajax Frameworks in the J(2)EE Environment
starchaser
 

Was ist angesagt? (20)

Do Logic Apps support error handling?
Do Logic Apps support error handling?Do Logic Apps support error handling?
Do Logic Apps support error handling?
 
Tech talk live share extras extension modules feb 13
Tech talk live   share extras extension modules feb 13Tech talk live   share extras extension modules feb 13
Tech talk live share extras extension modules feb 13
 
Tech talk-live-alfresco-drupal
Tech talk-live-alfresco-drupalTech talk-live-alfresco-drupal
Tech talk-live-alfresco-drupal
 
Wai yanleunglinktag
Wai yanleunglinktagWai yanleunglinktag
Wai yanleunglinktag
 
SQL vs NoSQL
SQL vs NoSQLSQL vs NoSQL
SQL vs NoSQL
 
Brian Campo, DoD JCS, Content.gov Presentation
Brian Campo, DoD JCS, Content.gov PresentationBrian Campo, DoD JCS, Content.gov Presentation
Brian Campo, DoD JCS, Content.gov Presentation
 
#3 Hanoi Magento Meetup - Part 3: Magento Website Optimization
#3 Hanoi Magento Meetup - Part 3: Magento Website Optimization#3 Hanoi Magento Meetup - Part 3: Magento Website Optimization
#3 Hanoi Magento Meetup - Part 3: Magento Website Optimization
 
My sql vs mongo
My sql vs mongoMy sql vs mongo
My sql vs mongo
 
Azure dboptions maniacs_nerdzao2802
Azure dboptions maniacs_nerdzao2802Azure dboptions maniacs_nerdzao2802
Azure dboptions maniacs_nerdzao2802
 
Speedup Magento Website
Speedup Magento WebsiteSpeedup Magento Website
Speedup Magento Website
 
MongoDB Security Features
MongoDB Security FeaturesMongoDB Security Features
MongoDB Security Features
 
Javascript & Jquery
Javascript & JqueryJavascript & Jquery
Javascript & Jquery
 
Css
CssCss
Css
 
EPiServer Charts
EPiServer ChartsEPiServer Charts
EPiServer Charts
 
managing content objects
managing content objectsmanaging content objects
managing content objects
 
Briney - Leveling Up Data Management - With Notes
Briney - Leveling Up Data Management - With NotesBriney - Leveling Up Data Management - With Notes
Briney - Leveling Up Data Management - With Notes
 
SQL vs. NoSQL Databases
SQL vs. NoSQL DatabasesSQL vs. NoSQL Databases
SQL vs. NoSQL Databases
 
Ajax Frameworks in the J(2)EE Environment
Ajax Frameworks in the J(2)EE EnvironmentAjax Frameworks in the J(2)EE Environment
Ajax Frameworks in the J(2)EE Environment
 
Who's afraid of front end databases?
Who's afraid of front end databases?Who's afraid of front end databases?
Who's afraid of front end databases?
 
Code camp orlando
Code camp   orlandoCode camp   orlando
Code camp orlando
 

Andere mochten auch (7)

Workbook1
Workbook1Workbook1
Workbook1
 
CGS2835 HTML5
CGS2835 HTML5CGS2835 HTML5
CGS2835 HTML5
 
Chapter.03
Chapter.03Chapter.03
Chapter.03
 
Chapter.02
Chapter.02Chapter.02
Chapter.02
 
Chapter.01
Chapter.01Chapter.01
Chapter.01
 
Ting's report on training of spa
Ting's report on training of spaTing's report on training of spa
Ting's report on training of spa
 
School personnel sheet2
School personnel sheet2School personnel sheet2
School personnel sheet2
 

Ähnlich wie Database basics

Hadoop & no sql new generation database systems
Hadoop & no sql   new generation database systemsHadoop & no sql   new generation database systems
Hadoop & no sql new generation database systems
ramazan fırın
 
Sharing a Startup’s Big Data Lessons
Sharing a Startup’s Big Data LessonsSharing a Startup’s Big Data Lessons
Sharing a Startup’s Big Data Lessons
George Stathis
 
Week3 Lecture Database Design
Week3 Lecture Database DesignWeek3 Lecture Database Design
Week3 Lecture Database Design
Kevin Element
 

Ähnlich wie Database basics (20)

Database
DatabaseDatabase
Database
 
Mysql
MysqlMysql
Mysql
 
Hadoop & no sql new generation database systems
Hadoop & no sql   new generation database systemsHadoop & no sql   new generation database systems
Hadoop & no sql new generation database systems
 
NoSQL for SQL Users
NoSQL for SQL UsersNoSQL for SQL Users
NoSQL for SQL Users
 
Steps towards business intelligence
Steps towards business intelligenceSteps towards business intelligence
Steps towards business intelligence
 
Build a modern data platform.pptx
Build a modern data platform.pptxBuild a modern data platform.pptx
Build a modern data platform.pptx
 
Microsoft Azure Big Data Analytics
Microsoft Azure Big Data AnalyticsMicrosoft Azure Big Data Analytics
Microsoft Azure Big Data Analytics
 
Scalable relational database with SQL Azure
Scalable relational database with SQL AzureScalable relational database with SQL Azure
Scalable relational database with SQL Azure
 
AZMS PRESENTATION.pptx
AZMS PRESENTATION.pptxAZMS PRESENTATION.pptx
AZMS PRESENTATION.pptx
 
How to Achieve Scale with MongoDB
How to Achieve Scale with MongoDBHow to Achieve Scale with MongoDB
How to Achieve Scale with MongoDB
 
Building better SQL Server Databases
Building better SQL Server DatabasesBuilding better SQL Server Databases
Building better SQL Server Databases
 
Sharing a Startup’s Big Data Lessons
Sharing a Startup’s Big Data LessonsSharing a Startup’s Big Data Lessons
Sharing a Startup’s Big Data Lessons
 
Week3 Lecture Database Design
Week3 Lecture Database DesignWeek3 Lecture Database Design
Week3 Lecture Database Design
 
Webinar: Scaling MongoDB
Webinar: Scaling MongoDBWebinar: Scaling MongoDB
Webinar: Scaling MongoDB
 
SQL Server 2019 Big Data Cluster
SQL Server 2019 Big Data ClusterSQL Server 2019 Big Data Cluster
SQL Server 2019 Big Data Cluster
 
Transform your DBMS to drive engagement innovation with Big Data
Transform your DBMS to drive engagement innovation with Big DataTransform your DBMS to drive engagement innovation with Big Data
Transform your DBMS to drive engagement innovation with Big Data
 
SQL To NoSQL - Top 6 Questions Before Making The Move
SQL To NoSQL - Top 6 Questions Before Making The MoveSQL To NoSQL - Top 6 Questions Before Making The Move
SQL To NoSQL - Top 6 Questions Before Making The Move
 
Framing the Argument: How to Scale Faster with NoSQL
Framing the Argument: How to Scale Faster with NoSQLFraming the Argument: How to Scale Faster with NoSQL
Framing the Argument: How to Scale Faster with NoSQL
 
Integration Monday - Analysing StackExchange data with Azure Data Lake
Integration Monday - Analysing StackExchange data with Azure Data LakeIntegration Monday - Analysing StackExchange data with Azure Data Lake
Integration Monday - Analysing StackExchange data with Azure Data Lake
 
Azure database as a service options
Azure database as a service optionsAzure database as a service options
Azure database as a service options
 

Mehr von Program in Interdisciplinary Computing (20)

Mysocial databasequeries
Mysocial databasequeriesMysocial databasequeries
Mysocial databasequeries
 
Mysocial databasequeries
Mysocial databasequeriesMysocial databasequeries
Mysocial databasequeries
 
01 intro tousingjava
01 intro tousingjava01 intro tousingjava
01 intro tousingjava
 
Xhtml
XhtmlXhtml
Xhtml
 
Webdev
WebdevWebdev
Webdev
 
Web architecture
Web architectureWeb architecture
Web architecture
 
Sdlc
SdlcSdlc
Sdlc
 
Mysocial
MysocialMysocial
Mysocial
 
Javascript
JavascriptJavascript
Javascript
 
Javascript
JavascriptJavascript
Javascript
 
Html5
Html5Html5
Html5
 
Frameworks
FrameworksFrameworks
Frameworks
 
Drupal
DrupalDrupal
Drupal
 
Javascript2
Javascript2Javascript2
Javascript2
 
12 abstract classes
12 abstract classes12 abstract classes
12 abstract classes
 
11 polymorphism
11 polymorphism11 polymorphism
11 polymorphism
 
13 interfaces
13 interfaces13 interfaces
13 interfaces
 
15b more gui
15b more gui15b more gui
15b more gui
 
15a gui
15a gui15a gui
15a gui
 
14b exceptions
14b exceptions14b exceptions
14b exceptions
 

Kürzlich hochgeladen

Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Peter Udo Diehl
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
UK Journal
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 

Kürzlich hochgeladen (20)

WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo DiehlFuture Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
Future Visions: Predictions to Guide and Time Tech Innovation, Peter Udo Diehl
 
TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024TopCryptoSupers 12thReport OrionX May2024
TopCryptoSupers 12thReport OrionX May2024
 
IESVE for Early Stage Design and Planning
IESVE for Early Stage Design and PlanningIESVE for Early Stage Design and Planning
IESVE for Early Stage Design and Planning
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
Oauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoftOauth 2.0 Introduction and Flows with MuleSoft
Oauth 2.0 Introduction and Flows with MuleSoft
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdfBreaking Down the Flutterwave Scandal What You Need to Know.pdf
Breaking Down the Flutterwave Scandal What You Need to Know.pdf
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 

Database basics

  • 1. CGS 2835 Interdisciplinary Web Development Web Database Useful Web Apps +
  • 2. CGS 2835 Interdisciplinary Web Development The Value of Databases • Databases and Database Management Systems (DBMS) transform large quantities of data into specific and valuable information for accomplishing some goal.
  • 3. CGS 2835 Interdisciplinary Web Development AMP •Apache – open source Web server •MySQL – open source database •PHP – programming language that works in HTML to provide interactivity with MySQL
  • 4. CGS 2835 Interdisciplinary Web Development Database Server Web ServerHTML REQUEST w/DATAHTML REQUEST w/DATA SQL CommandSQL Command PHP
  • 5. CGS 2835 Interdisciplinary Web Development Database Server Web Server PHP data PHP-created HTML
  • 6. CGS 2835 Interdisciplinary Web Development MySQL Database Server PHPdata PHP-created HTML SQLSQL Our Focus
  • 7. CGS 2835 Interdisciplinary Web Development Databases
  • 8. CGS 2835 Interdisciplinary Web Development File or Table Database • A collection of data organized to meet user’s needs. Records (Entities) Field (Attribute)
  • 9. CGS 2835 Interdisciplinary Web Development Database Fields • Fields are set to hold specific types of data.
  • 10. CGS 2835 Interdisciplinary Web Development Database A Database is a collection of files/tables
  • 11. CGS 2835 Interdisciplinary Web Development Database Heirarchy Table
  • 12. CGS 2835 Interdisciplinary Web Development Keys and Primary Key • Key: A field in a record that is used to identify the record • Primary key: A field that uniquely identifies a record – A primary key field prevents duplicate records from occurring in a table.
  • 13. CGS 2835 Interdisciplinary Web Development Primary Keys • User identification number • Sometimes email addresses are used as a unique login, assuming two people cannot have the same email • A number is faster to look up, so a unique number is often still generated
  • 14. CGS 2835 Interdisciplinary Web Development Primary Key
  • 15. CGS 2835 Interdisciplinary Web Development The Relational Model • In a relational database, tables are linked (related) through common fields. • This can remove redundant data, and organize information
  • 16. CGS 2835 Interdisciplinary Web Development “Flat” database userID First Name Last Name Email, …, … Message 1 Geo Miller …, … , … Hello! 2 Ken Baldauf …, … , … Greetings, how are you? 1 Geo Miller …, … , … Doing well 2 Ken Baldauf ……, … , … Great! The Relational Model
  • 17. CGS 2835 Interdisciplinary Web Development “Relational” databaseuserID First Name Last Name Email, …, … 1 Geo Miller …, … , … 2 Ken Baldauf …, … , … The Relational Model userID Message 1 Hello! 2 Greetings, how are you? 1 Doing well 2 Great!
  • 18. CGS 2835 Interdisciplinary Web Development Relation Types • One-to-many – Makes use of primary key – Example: one person makes many posts • One-to-one – A piece of data only relating to one record • Many-to-many – An item can have many sellers and sellers can sell that item many times
  • 19. CGS 2835 Interdisciplinary Web Development MySQL An open-source, relational database
  • 20. CGS 2835 Interdisciplinary Web Development MySQL - Installing • Some servers require an administrator to install • On your own machine, there are installation packages for AMP • On Codio: – parts install mysql – parts start mysql • On many linux distributions: – apt-get install mysql-server – service mysql start
  • 21. CGS 2835 Interdisciplinary Web Development MySQL – Creating a Database Creating a database in MySQL is traditionally done with a terminal that has administrator access to the MySQL server. CREATE DATABASE IF NOT EXISTS “databasename” A MySQL user must be created and given access to use the new database CREATE USER IF NOT EXISTS “username” SET PASSWORD FOR “username”=PASSWORD(“password”) GRANT ALL PRIVILEGES ON “databasename” TO “username” IDENTIFIED BY “password”
  • 22. CGS 2835 Interdisciplinary Web Development phpMyAdmin is a popular application for managing mySQL databases. Here you can click a database name to access its properties and tools. Note that whenever prompted for charset or collation select UTF-8 Unicode (utf8).
  • 23. CGS 2835 Interdisciplinary Web Development Access MySQL Database We will use phpMyAdmin to: •Create tables in databases •Create fields in the tables •Manage the database •Examine table data We will use PHP to: • Enter records into tables from HTML forms • Read records from tables and output to HTML pages
  • 24. CGS 2835 Interdisciplinary Web Development When I click my database link in phpMyAdmin, I am prompted to create a table.
  • 25. CGS 2835 Interdisciplinary Web Development Then I create fields for my table.
  • 26. CGS 2835 Interdisciplinary Web Development I can then use the Insert tab to enter records into the table.
  • 27. CGS 2835 Interdisciplinary Web Development
  • 28. CGS 2835 Interdisciplinary Web Development The browse buttons allows you to view the contents of the table.
  • 29. CGS 2835 Interdisciplinary Web Development
  • 30. CGS 2835 Interdisciplinary Web Development You can also run SQL queries on your data from within phpMyAdmin.
  • 31. CGS 2835 Interdisciplinary Web Development MySQL & phpMyAdmin • phpMyAdmin is a useful tool for manipulating mySQL databases; however, in order to work with Web-generated data, the mySQL database must be accessed from the HTML code using PHP. MySQL Database Server SQLSQLSQLSQL PHP
  • 32. CGS 2835 Interdisciplinary Web Development MySQL & phpMyAdmin • Either method of interacting with the database requires knowledge of SQL MySQL Database Server SQLSQLSQLSQL PHP