Databases on the web

Similar documents
What is PHP? [1] Figure 1 [1]

The PHP language. Teaching you everything about PHP? Not exactly Goal: teach you how to interact with a database via web

Review. Fundamentals of Website Development. Web Extensions Server side & Where is your JOB? The Department of Computer Science 11/30/2015

Web Engineering (Lecture 08) WAMP

Inf 202 Introduction to Data and Databases (Spring 2010)

INTERNET PROGRAMMING. Software Engineering Branch / 4 th Class Computer Engineering Department University of Technology

Princess Nourah bint Abdulrahman University. Computer Sciences Department

PHP 5 Introduction. What You Should Already Know. What is PHP? What is a PHP File? What Can PHP Do? Why PHP?

CSCB20 Week 8. Introduction to Database and Web Application Programming. Anna Bretscher* Winter 2017

PHP. Interactive Web Systems

PHP. MIT 6.470, IAP 2010 Yafim Landa

Relational Query Languages. Preliminaries. Formal Relational Query Languages. Example Schema, with table contents. Relational Algebra

Lecture 12. PHP. cp476 PHP

1) What is the first step of the system development life cycle (SDLC)? A) Design B) Analysis C) Problem and Opportunity Identification D) Development

Relational Algebra. Note: Slides are posted on the class website, protected by a password written on the board

Web Application Development (WAD) V th Sem BBAITM(Unit-1) By: Binit Patel

Database Applications (15-415)

Course Topics. The Three-Tier Architecture. Example 1: Airline reservations. IT360: Applied Database Systems. Introduction to PHP

PHP 1. Introduction Temasek Polytechnic

Let's Look Back. We talked about how to create a form in HTML. Forms are one way to interact with users

SQL Part 2. Kathleen Durant PhD Northeastern University CS3200 Lesson 6

Chapter 11 Program Development and Programming Languages

PHP Introduction. Some info on MySQL which we will cover in the next workshop...

welcome to BOILERCAMP HOW TO WEB DEV

Basic form of SQL Queries

Options. Real SQL Programming 1. Stored Procedures. Embedded SQL

Database Applications

// Introducing PHP. Overview of Dynamic Sites with PHP and Top 5 Best Practices. WebTechNY September 10 th, 2008

Introduction to Data Management. Lecture #14 (Relational Languages IV)

This lecture. Projection. Relational Algebra. Suppose we have a relation

Databases - Relational Algebra. (GF Royle, N Spadaccini ) Databases - Relational Algebra 1 / 24

Notes. Submit homework on Blackboard The first homework deadline is the end of Sunday, Feb 11 th. Final slides have 'Spring 2018' in chapter title

Using PHP with MYSQL

Course Topics. IT360: Applied Database Systems. Introduction to PHP

Important Points about PHP:

Part I. Web Technologies for Interactive Multimedia

Experimenting with bags (tables and query answers with duplicate rows):

Relational Calculus. Chapter Comp 521 Files and Databases Fall

Instructor s Notes Web Data Management Web Client/Server Concepts. Web Data Management Web Client/Server Concepts

How A Website Works. - Shobha

PHP for PL/SQL Developers. Lewis Cunningham JP Morgan Chase

Let's Play... Try to name the databases described on the following slides...

Chapter 7:- PHP. Compiled By:- Sanjay Patel Assistant Professor, SVBIT.

Introduction to Data Management. Lecture #13 (Relational Calculus, Continued) It s time for another installment of...

Web development using PHP & MySQL with HTML5, CSS, JavaScript

Relational Calculus. Chapter Comp 521 Files and Databases Fall

CERTIFICATE IN WEB PROGRAMMING

PHP Personal Home Page PHP: Hypertext Preprocessor (Lecture 35-37)

This lecture. Step 1

COSC344 Database Theory and Applications PHP & SQL. Lecture 14

B. V. Patel Institute of BMC & IT 2014

Upload to your web space (e.g., UCSC) Due this Thursday 4/8 in class Deliverable: Send me an with the URL Grading:

Static Webpage Development

Real Web Development. yeah, for real.

Overview of the Class and Introduction to DB schemas and queries. Lois Delcambre

CSCB20 Week 8. Introduction to Database and Web Application Programming. Anna Bretscher* Winter 2016

CSCI 201 Lab 1 Environment Setup

Ch04 JavaServer Pages (JSP)

Php And Mysql Manual Simple Yet Powerful Web Programming

Boldface numbers indicate illustrations, code listings, and tables.

Lecture 7 PHP Basics. Web Engineering CC 552

Programming the World Wide Web by Robert W. Sebesta

Full version is >>> HERE <<<

WEBSHELL TO PHISHING UDURRANI

Syllabus INFO-GB Design and Development of Web and Mobile Applications (Especially for Start Ups)

Database Applications (15-415)

Data Science 100. Databases Part 2 (The SQL) Slides by: Joseph E. Gonzalez & Joseph Hellerstein,

Hands-On Perl Scripting and CGI Programming

Global Servers. The new masters

If you re the administrator on any network,

CS 377 Database Systems. Li Xiong Department of Mathematics and Computer Science Emory University

Alan Forbes - The Joy of PHP 1

Data Science 100 Databases Part 2 (The SQL) Previously. How do you interact with a database? 2/22/18. Database Management Systems

AN INTRODUCTION TO PHP

PHP by Pearson Education, Inc. All Rights Reserved.

VALLIAMMAI ENGINEERING COLLEGE

Cleveland State University Department of Electrical and Computer Engineering. CIS 408: Internet Computing

Basic PHP. Lecture 19. Robb T. Koether. Hampden-Sydney College. Mon, Feb 26, 2108

A Web-Based Introduction

PHP: The Basics CISC 282. October 18, Approach Thus Far

How To Redirect A Webpage Cheat Sheet

PHP. M hiwa ahamad aziz Raparin univercity. 1 Web Design: Lecturer ( m hiwa ahmad aziz)

Project Plan Distributed Network Traffic Controller

Time: 3 hours. Full Marks: 70. The figures in the margin indicate full marks. Answer from all the Groups as directed. Group A.

CPET 581 E-Commerce & Business Technologies. Topics

Ampliación de Bases de Datos

Database Systems Fundamentals

The Database Language SQL (i)

PHP INTERVIEW QUESTION-ANSWERS

Using the Computer Programming Environment

Chapter 3. Technology Adopted. 3.1 Introduction

Guide for Building Web Application Using PHP and Mysql

3. WWW and HTTP. Fig.3.1 Architecture of WWW

Bruce Moore Fall 99 Internship September 23, 1999 Supervised by Dr. John P.

Networking & The Web. HCID 520 User Interface Software & Technology

Course Syllabus. Course Title. Who should attend? Course Description. PHP ( Level 1 (

Open Source and Informix Dynamic Server

PHP Reference. To access MySQL manually, run the following command on the machine, called Sources, where MySQL and PhP have been installed:

CS 410/510: Web Basics

Main Frame Dial Up (1960 s)

Transcription:

Databases on the web

The Web Application Stack Network Server You

The Web Application Stack Network Server You

The Web Application Stack Web Browser Network Server You

The Web Application Stack Web Browser Network Server You

The Web Application Stack Web Server Web Browser Network Server You

Let s make a webpage to advertise sailors and boats http://web.cecs.pdx.edu/~britell/cs386/boats_sailors.html <html> <body> <h1>sailors and Boats</h1> <ul> <h3>sailors: id name rank</h3> <li>64 Horatio 7</li> <li>74 Horatio 9</li> <li>22 Dustin 1</li> <li>31 Lubber 8</li> </ul> <ul> <h3>boats: id name color</h3> <li>102 Interlake red</li> <li>103 Clipper green</li> <li>104 Marine red</li> </ul> </body> </html>

Let s make a webpage to advertise sailors and boats <html> <body> <h1>sailors and Boats</h1> <ul> <h3>sailors: id name rank</h3> <li>64 Horatio 7</li> <li>74 Horatio 9</li> <li>22 Dustin 1</li> <li>31 Lubber 8</li> </ul> <ul> <h3>boats: id name color</h3> <li>102 Interlake red</li> <li>103 Clipper green</li> <li>104 Marine red</li> </ul> </body> </html> It would be nice if we could use our sailors database to do this.

The Web Application Stack Persistent Data Storage Web Server Web Browser Network Server You

The Web Application Stack Application Persistent Data Storage Web Server Web Browser Network Server You

The Web Application Stack Application Persistent Data Storage Web Server PHP Postgres Network Web Browser Server You

PHP PHP Hypertext Preprocessor Syntax is similar to C Object Oriented Extensions Scripting language Interpreted, not compiled Executed on the webserver Script written inside <?php?> tags

PHP continued Variables Prefixed by a $ Do not have to be declared with a data type Can change type

PHP continued Functions function myfunction($param) { } Useful built-in print_r, var_dump(), var_export() print, echo, printf

PHP continued Operators =,+=,-=,/=,*=,%=,++,-- +,-,/,*,%.=. ==,!=, <>, <, <=, >=,> === true if arguments are equal and the same data type!== true if arguments are not equal or they are not of the same data type

PHP continued Arrays Can be any size and any/mixed type Are not defined with their size $array = array(1,2,3); $array[0] = foo ; $array[] = 12; May be multidimensional $md_array[0] = $array; $md_array[1] = array(1, foo,34);

PHP continued Arrays continued PHP arrays are associative Instead of using numbered indexes we can have named keys $array[ fname ] = alice ; $array[ lname ] = smith ; $array[ age ] = 48; $array = array ( $key => $value, ); $array = array ( fname => alice, lname => smith, age => 48, );

PHP continued Control Structures if/elseif/else if, else switch while, do{}while, for foreach foreach ($array as $value){} foreach ($array as $key => $value) {}

PHP continued Connecting to a database Can do low-level like embedded sql in C Drivers for Mysql Postgres Mssql Odbc Sqlite Or we can use an abstraction layer A consitent interface across multiple databases Abstracts away many of the details A couple of different choices DBA dbx ODBC PDO

PDO Compare PDO and embedded C http://web.cecs.pdx.edu/~britell/cs386/embedded.php A little bit about password security Permissions CGI CGI example» http://web.cecs.pdx.edu/~britell/cs386/boats.html.cgi A little bit about errors On MCECS systems look at /www/log/users-error.log

PDO Now lets make our sailors and boats page dynamic http://web.cecs.pdx.edu/~britell/cs386/boats_sailors.php

PDO Now lets make a reservation system Html forms Global arrays $_GET $_POST http://web.cecs.pdx.edu/~britell/cs386/reserves.php http://web.cecs.pdx.edu/~britell/cs386/reservations.php

The Web Application Stack Application Persistent Data Storage Web Server Php, perl, python Mysql Apache Linux Server LAMP

The Web Application Stack Application Persistent Data Storage Web Server Asp Sql Server IIS Windows Server WISA

The Web Application Stack Application Persistent Data Storage Web Server Java * Tomcat * Server

The Web Application Stack Application Persistent Data Storage Web Server java,php,perl,python,ruby,erlang, haskell, Mysql,sql server,postgres,oracle, sqlite, NoSQL, Apache, IIS, lighttpd, tomcat, rails, nodejs, Linux,windows,solaris,freebsd, apple, Server