+ connecting to the web week 7, lecture a. + midterm basics thursday february 28 during class the...
TRANSCRIPT
KROENKE and AUER - DATABASE CONCEPTS (6th Edition) Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
+Midterm Basics
Thursday February 28 during Class
The lab Tuesday, February 26 is optional review
Class on Tuesday February 26 – Review Session Come prepared with questions and topics you want to
review. Attendance sheet will be used.
+We Have Web Sites
What capabilities are available in a static web site (one with no DB) view pages, images, video, etc. receive information
Who is this good for? small businesses personal web sites
+We Have Web Sites
What are some advantages of good web sites? easy to use universally accessible don't need to take college courses to be able to use them Web browsers are ubiquitous, no special software needed
+We Have Web Sites
What are some DISadvantages of static Web sites? information flows in one direction each page is built individually updates require access to the files and some knowledge
+We Have Data
What can we do with our DB? we can store lots of information we can examine and analyze our information we can update our information it's robust and good at what it does
+We Have Data
What are some drawbacks of the DB? steep learning curve to do basic actions setting up accounts for each person to access it requiring special software to use it possibly limited to specific machines or networks knowledge of databases/SQL required
+Let’s put them together!
Can we get the advantages of the web and the power of a DB together?
static Web sites easy to use and universally accessible don't need to take college courses to be able to use them Web browsers are ubiquitous, no special software needed
Databases we can store lots of information we can examine and analyze our information we can update our information
+WHY would we do this?
allow web sites to be much more powerful
use web sites to collect, analyze, and share data from a DB
make user-friendly methods for people to access DB they will probably never know they are using a DB
+HOW would we do this?
what are the parts? web server database that accepts connections some type of code
types of web servers
types of databases
types of code
+HOW would we do this?
an example (www.HighlandsForum.org) MySQL (database) ColdFusion (code) Apache (Web server)
How are they working?
What are we going to use in class? Windows Server (Web server) PHP (code) SQL Server (database)
KROENKE and AUER - DATABASE CONCEPTS (6th Edition) Copyright © 2013 Pearson Education, Inc. Publishing as Prentice Hall
+Midterm Basics
Thursday February 28 during Class
The lab Tuesday, February 26 is optional review
Class on Tuesday February 26 – Review Session Come prepared with questions and topics you want to
review. Attendance sheet will be used.
+Review Homework Assignment
read questions
class provides answers
discuss any difficulties or problems
+Examples of Web sites using Databases
Web page pulling data to displayconnection informationquery a tableresultsprogrammer must format the results for
displayprocessing query results row-by-row
Penn State Course Catalog
+Examples of Web sites using Databases
Web page(s) allowing the update/edit of dataconnection informationquery (update) results table data is changedprogrammer formats form data into a query
statementdatabase management system updates data
Angel (cms.psu.edu)
+Web Database Processing
Web servers connect to Database servers
They can be on the same machine or be connecting through network/internet
+ODBC
Open DataBase Connectivity
is a standardized architecture that is the tool a Web Server can use to connect to a Database server.
will use a Database driver appropriate for the DB server
Can process, reformat or pass on SQL to DB
+Data Source Name (DSN)
File data sourcea shared file, only requires dbms driver
and access credentials
System data sourceallows one computer to connect to the
database server
User data sourceonly for the user who created it
+Data Source Name (DSN)
System Data Sourcebest choice for Web ServerAllows Web Server to create a connection
with the Database ServerUsers (browsers) requests are interpreted
by the Web ServerWeb server then makes connection to
Database Server to send queries
+Book Example
Microsoft IIS (Internet Information Server)
p. 368
instructions for setting up a web server on a windows machine
+PHP
PHP: Hypertext Processor
code is lines of text in a text document saved with a .php file extension
PHP code mingles with HTML code
+PHP
Browser requests a page with a .php extension
Web Server sees the extension and knows to read and process the page
Web Server reads the code, takes appropriate actions, then generates results
Results are sent back to the browser as HTML
+PHP
PHP pages can do many thingsprocess form resultsmathconnect to databases (select, insert,
update, delete)
Use text code to collect, manipulate, edit and use data