Courses NumNameDesc Record Field Table Credits. “PROJECT”“SELECT” Operators on Tables.

Slides:



Advertisements
Similar presentations
PHP SQL. Connection code:- mysql_connect("server", "username", "password"); Connect to the Database Server with the authorised user and password. Eg $connect.
Advertisements

1Key – Report Creation with DB2. DB2 Databases Create Domain for DB2 Test Demo.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 14 Web Database Programming Using PHP.
Session 6 Server-side programming - ASP. An ASP page is an HTML page interspersed with server-side code. The.ASP extension instead of.HTM denotes server-side.
What is it? –Large Web sites that support commercial use cannot be written by hand What you’re going to learn –How a Web server and a database can be used.
Apache Tomcat Server – installation & use Server-side language-- use Java Server Pages Contrast Client-side languages HTML Forms Servers & Server-side.
Multiple Tiers in Action
Apache Tomcat Server Typical html Request/Response cycle
1 The World Wide Web Architectural Overview Static Web Documents Dynamic Web Documents HTTP – The HyperText Transfer Protocol Performance Enhancements.
Complaint Desk Team 8. Introduction A web based system that records grievances. A web based system that records grievances. Users can report their grievances.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
PHP and SQL Server: Queries IST2101. Three-Tier Architecture Three-tier architecture means that the Web server and the DBMS are on separate servers IST2102.
WHAT IS PHP PHP is an HTML-embedded scripting language primarily used for dynamic Web applications.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
The PHP Story. PHP Story PHP is a programming language. Incorporate(join) sophisticated business logic. Widely used general purpose scripting language.
1 Web Database Processing. Web Database Applications Static Report Publishing a report is prepared from a database application and exported to HTML DB.
Programming with php By: Seth Larson. A little bit about PHP  PHP stands for PHP:  Hypertext Preprocessor  PHP is a widely-used general-purpose server-side.
Application Development Description and exemplification of server-side scripting language for server connection, database selection, execution of SQL queries.
INFM 603: Information Technology and Organizational Context Jimmy Lin The iSchool University of Maryland Thursday, October 18, 2012 Session 7: PHP.
CSE3310: Web training A JumpStart for Project.
1 PHP and MySQL. 2 Topics  Querying Data with PHP  User-Driven Querying  Writing Data with PHP and MySQL PHP and MySQL.
NMED 3850 A Advanced Online Design January 26, 2010 V. Mahadevan.
Simple Database.
1 Accelerated Web Development Course JavaScript and Client side programming Day 2 Rich Roth On The Net
Web Design: Basic to Advanced Techniques Fall 2010 Mondays 7-9pm 200 Sutardja-Dai Hall Databases & SQL Lecture Code:
Class 1Intro to Databases Goals of this class Understand the architecture behind web database applications Gain a basic understanding of what relational.
Tutorial 10 by Sam ine1020 Introduction to Internet Engineering 1 Database & Server-side Scripting Tutorial 10.
JavaScript – Quiz #9 Lecture Code:
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
NMED 3850 A Advanced Online Design January 12, 2010 V. Mahadevan.
Accessing Your MySQL Database from the Web with PHP (Ch 11) 1.
Website Development with PHP and MySQL Saving Data.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
Mainframe (Host) - Communications - User Interface - Business Logic - DBMS - Operating System - Storage (DB Files) Terminal (Display/Keyboard) Terminal.
CHAPTER 7 Form & PHP. Introduction All of the following examples in this section will require two web pages. The first page retrieves information posted.
CS 4720 Dynamic Web Applications CS 4720 – Web & Mobile Systems.
Case Study Dynamic Website - Three Tier Architecture
CS779 Term Project Steve Shoyer Section 5 December 9, 2006 Week 6.
PHP getting data from a MySQL database. Replacing XML as data source with MySQL Previously we obtained the data about the training session from an XML.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
NMD202 Web Scripting Week5. What we will cover today PHP & MySQL Displaying Dynamic Pages Exercises Modifying Data PHP Exercises Assignment 1.
U:/msu/course/cse/103 Day 21, Slide 1 CSE 103 Makeups –If you didn’t take one over the weekend, take one TUESDAY or WEDNESDAY!
Digital Media Technology Databases / SQL 2 Fleur Praal 17 November 2015 Leiden University. The university to discover.
Class 1Intro to Databases Goals of this class Understand the architecture behind web database applications Gain a basic understanding of what relational.
Windows 7 WampServer 2.1 MySQL PHP 5.3 Script Apache Server User Record or Select Media Upload to Internet Return URL Forward URL Create.
How Web Database Architectures Work CPS181s April 8, 2003.
 Before you continue you should have a basic understanding of the following:  HTML  CSS  JavaScript.
Display Page (HTML/CSS)
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 14 Web Database Programming Using PHP.
NMD202 Web Scripting Week2. Web site
PHP AND SQL SERVER: QUERIES IST 210: Organization of Data IST210 1.
Generating XML Data from a Database Eugenia Fernandez IUPUI.
PHP and SQL Server: Connection IST 210: Organization of Data IST2101.
PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used, free, and efficient alternative.
PHP AND SQL SERVER: CONNECTION IST 210: Organization of Data IST210 1.
Web Programming Building Dynamic Web Pages Adrian Shaw (ais) – 80% Jonathan Roscoe (jjr6) - 20%
Web Database Programming Using PHP
Web Technologies Computing Science Thompson Rivers University
Introduction to Dynamic Web Programming
Web Database Programming Using PHP
Lecture 11. Web Standards Continued
PHP / MySQL Introduction
Web Browser server client 3-Tier Architecture Apache web server PHP
Web DB Programming: PHP
Tutorial 6 PHP & MySQL Li Xu
Web Technologies Computing Science Thompson Rivers University
Client-Server Model: Requesting a Web Page
Presentation transcript:

Courses NumNameDesc Record Field Table Credits

“PROJECT”“SELECT” Operators on Tables

Classes Tables: one entry per section of each course offered Courses Table: one entry per class that’s ever offered

Database Application logic (system programming language) SQL Record at a time processing

SQL Example select coursenumber, isIEMP from course where coursenumber = 603;

A Join Operation select coursenumber, coursename from course, class where course.courseid=class.xrefcourseid and class.yearoffered=1999 and class.termoffered='FALL';

The Web Interface

Websites that Serve Files Web browser Web serverFile system 2. filename 3. File contents 1. URL 4. HTML

Dynamically Generated Pages Web browser Web serverFile system Script interpreter 4. File contents 5. HTML 2. filename 3. File contents 1. URL 6. HTML

PHP Exercise <? echo " Your Query has returned 7 hits. "; echo " "; for ($i=0;$i<7;$i++) { echo " "; echo "column 1 row $i ", " "; echo "column 2 row $i", " "; } echo " "; ?> RUN

Database-Generated Pages Web browser Web server DBMS File system Script interpreter 5. SQL statement 6. Query result 4. File contents 7. HTML 2. filename 3. File contents 1. URL 8. HTML

<? mysql_connect("ebola.si.umich.edu:3306","webuser",""); $result = mysql("presnick", "SELECT coursenumber,coursename FROM course,class WHERE course.courseid=class.xrefcourseid AND class.yearoffered='1997' ORDER BY coursenumber"); $num = mysql_numrows($result); echo " Your Query has returned $num hits. "; echo " "; for ($i=0;$i<$num;$i++) { echo " "; echo mysql_result($result,$i,"coursenumber")." "; echo mysql_result($result,$i,"coursename")." "; } mysql_close(); echo " "; ?> RUN

PHP Exercise Class information of 1997 from presnick's database Your Query has returned 40 hits. 501 Use of Information 502 Choice and Learning 511 Technology in Design: Methods and Means...

COUNT Query select count(*) as total from course where coursenumber= 603;

GROUP By Query select isarm, count(*) from course group by isarm;

XML: Data + Structure 501 Use of Information 502 Choice and Learning 511 Technology in Design: Methods and Means

XSL: Presentation RUN

XML Processing Web browser Web server DBMS File system Script interpreter 5. SQL statement 6. Query result 4. File contents 7. XML 2. filename 3. File contents 1. URL 8. XML & XSL Preprocessor HTML Rendering Engine HTML

Generating XML … $num = mysql_numrows($result); for ($i=0;$i<$num;$i++) { echo " "; echo " ”. mysql_result($result,$i,"coursenumber")." "; echo " ". mysql_result($result,$i,"coursename")." "; echo " "; } … RUNRUN

Referral Today ACME AIDS Consortium Linda’s Meals DB

Referral Tomorrow ACME AIDS Consortium Linda’s Meals DB XML + formatting

Referral Eventually ACME AIDS Consortium Linda’s Meals DB XML DB

AIDS Consortium Form Client Name: D.O.B. Sex: Male Female

Linda’s Meals Form Client Name: SSN: