ITX2000 Remote hosts and web servers Prof. Xiaohong (Sharon) Gao Room: T125 Ext: 12252 Week 2 – MySQL – database.

Slides:



Advertisements
Similar presentations
IS 6116 Introduction – 10 Jan Lecturer Details Aonghus Sugrue Website: aonghussugrue.wordpress.com
Advertisements

Server-Side vs. Client-Side Scripting Languages
15 Chapter 15 Web Database Development Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel.
B.Sc. Multimedia ComputingMedia Technologies Database Technologies.
Introduction to Web Interface Technology (CSE2030)
The World Wide Web and the Internet Dr Jim Briggs 1WUCM1.
1 CS6320 – Why Servlets? L. Grewe 2 What is a Servlet? Servlets are Java programs that can be run dynamically from a Web Server Servlets are Java programs.
PHP Scripting Language. Introduction “PHP” is an acronym for “PHP: Hypertext Preprocessor.” It is an interpreted, server-side scripting language. Originally.
Mgt 240 Lecture Website Construction: Software and Language Alternatives March 29, 2005.
INTRO TO MAKING A WEBSITE Mark Zhang.  HTML  CSS  Javascript  PHP  MySQL  …That’s a lot of stuff!
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
ECA 228 Internet/Intranet Design I Intro to the Web.
Web Programming Language Dr. Ken Cosh Week 1 (Introduction)
WHAT IS PHP PHP is an HTML-embedded scripting language primarily used for dynamic Web applications.
PHP By Dr. Syed Noman Hasany. PHP PHP was originally created by Rasmus Lerdorf in PHP stands for PHP: Hypertext Preprocessor (a recursive acronym).
SYST Web Technologies SYST Web Technologies Installing a Web Server (XAMPP)
Web Page A page displayed by the browser. Website Collection of multiple web pages Web Browser: A software that displays web pages on client computer.
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.
CSC 318 WEB APPLICATION DEVELOPMENT.  Introduction to Server Scripting language  Client VS Server  Introduction to PHP  PHP Files and Syntax  Function.
Intro to PHP Introduction to server-side scripts (It’s all good :D) © TAFE NSW
INTRODUCTION TO WEB DATABASE PROGRAMMING
Copyright © cs-tutorial.com. Introduction to Web Development In 1990 and 1991,Tim Berners-Lee created the World Wide Web at the European Laboratory for.
Languages in WEB Presented by: Jenisha Kshatriya BCM SS09.
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Describe several.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
About Dynamic Sites (Front End / Back End Implementations) by Janssen & Associates Affordable Website Solutions for Individuals and Small Businesses.
Chapter 17 - Deploying Java Applications on the Web1 Chapter 17 Deploying Java Applications on the Web.
PHP With Oracle 11g XE By Shyam Gurram Eastern Illinois University.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
SQL Queries Relational database and SQL MySQL LAMP SQL queries A MySQL Tutorial and applications Database Building Assignment.
Introduction to PHP and MySQL Kirkwood Center for Continuing Education By Fred McClurg, © Copyright 2015, Fred McClurg, All Rights.
Lecture Note 1: Getting Started With ASP.  Introduction to ASP  Introduction to ASP An ASP file can contain text, HTML tags and scripts. Scripts in.
1 Welcome to CSC 301 Web Programming Charles Frank.
1Computer Sciences Department Princess Nourah bint Abdulrahman University.
Introduction to CS520/CS596_026 Lecture Two Gordon Tian Fall 2015.
Introduction to PHP Advanced Database System Lab no.1.
CS 4720 Dynamic Web Applications CS 4720 – Web & Mobile Systems.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
Web Technologies Lecture 8 Server side web. Client Side vs. Server Side Web Client-side code executes on the end-user's computer, usually within a web.
Introduction and Principles Web Server Scripting.
PHP Introduction PHP is a server-side scripting language.
ASP. ASP is a powerful tool for making dynamic and interactive Web pages An ASP file can contain text, HTML tags and scripts. Scripts in an ASP file are.
Unit 1 – Web Concepts Instructor: Brent Presley.
 Before you continue you should have a basic understanding of the following:  HTML  CSS  JavaScript.
COSC 2328 – Web Programming.  PHP is a server scripting language  It’s widely-used and free  It’s an alternative to Microsoft’s ASP and Ruby  PHP.
Web Page Designing With Dreamweaver MX\Session 1\1 of 9 Session 1 Introduction to PHP Hypertext Preprocessor - PHP.
CGS 3066: Web Programming and Design Spring 2016 Introduction to Server-Side Programming.
ITX2000 Remote hosts and web servers Prof. Xiaohong (Sharon) Gao Room: T125 Ext: Week 8 – Review Reference:
PHP stands for …….. “PHP Hypertext Pre-processor” and is a server-side scripting language like ASP. PHP scripts are executed on the server PHP supports.
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.
Presented By Sushil K. Chaturvedi Assistant Professor SRCEM,Banmore 1.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
PHP Basics and Syntax Lesson 3 ITBS2203 E-Commerce for IT.
PHP using MySQL Database for Web Development (part II)
Web Programming Language
Introduction to Dynamic Web Programming
Introduction and Principles
Introduction to PHP FdSc Module 109 Server side scripting and
Introduction to ASP By “FlyingBono” 2009_01 By FlyingBono 2009_01
Relational database and SQL MySQL LAMP SQL queries
Introduction to Web programming
PHP / MySQL Introduction
Database Driven Websites
IntroductionToPHP Static vs. Dynamic websites
Intro to PHP.
Tutorial 6 PHP & MySQL Li Xu
PHP By Prof. B.A.Khivsara Note: The material to prepare this presentation has been taken from internet and are generated only for students reference and.
Web Application Development Using PHP
Presentation transcript:

ITX2000 Remote hosts and web servers Prof. Xiaohong (Sharon) Gao Room: T125 Ext: Week 2 – MySQL – database -- PHP

What is MySQL MySQL is a database system used on the web MySQL is a database system that runs on a server MySQL is ideal for both small and large applications MySQL is very fast, reliable, and easy to use MySQL supports standard SQL MySQL compiles on a number of platforms MySQL is free to download and use MySQL is developed, distributed, and supported by Oracle Corporation MySQL is named after co-founder Monty Widenius's daughter: My

What is PhP PHP is an acronym for "PHP Hypertext Preprocessor" PHP is a widely-used, open source scripting language PHP scripts are executed on the server PHP costs nothing, it is free to download and use What is a PHP File? PHP files can contain text, HTML, CSS, JavaScript, and PHP code PHP code are executed on the server, and the result is returned to the browser as plain HTML PHP files have extension ".php” What Can PHP Do? PHP can generate dynamic page content PHP can create, open, read, write, delete, and close files on the server PHP can collect form data PHP can send and receive cookies PHP can add, delete, modify data in your database PHP can restrict users to access some pages on your website PHP can encrypt data

Introduction – Basic Architecture From Jay Greenspan and Brad Bulger “MySQL/PHP Database Applications”, M&T Books, New York, At the most basic level, the Web works off of a client/server architecture. That means that both a central server and a client application are responsible for some amount of processing. E.g.,

The client The applications you can develop with MySQL and PHP make use of a single client: the Web browser. This is not the only possibility for Internet-based applications. For very sophisticated applications that require more client- side processing or that need to maintain state a Java applet may be necessary. But unless you’re coding something like a real-time chat program, client-side Java is completely unnecessary.

Client – web browser languages Primary language –HTML (hypertext markup language). HTML provides a set of tags that describe how a Web page should look. Most browsers will accept more than HTML. There are all kinds of plug-ins, including RealPlayer, Flash, and Shockwave, JavaScript, XML. This module will take lowest-common-denominator approach.

The server Almost all of the work of Web applications takes place on the server. A specific application, called a Web server, will be responsible for communicating with the browser. A relational database server stores whatever information the application requires. Finally, you need a language to broker requests between the Web server and the database server. It will also be used to perform programmatic tasks on the information that comes to and from the Web server. Figure I-1 represents this system.

You are here! You can’t see!

Open source PHP and MySQL belong to a class of software known as open source. This means that the source code to the heart of their applications is available to anyone who wants to see it. In the case of PHP, coders all over the world participate in the development of the language. Almost all PHP/MySQL applications are running off of some version of Unix, whether it be Linux, BSD, Irix, Solaris, HP-UX, or one of the other flavors. For that reason, the applications in this book will work with Unix. PHP – Personal Home Page or Personal Hypertext Page.

Apache sever Works best on Unix systems but also runs on Windows. Fast and stable Less graphic tools

Middleware PHP belongs to a class of languages known as middleware. These languages work closely with the Web server to interpret the requests made from the WWW, process these requests, interact with other programs on the server to fulfil the requests, and then indicate to the Web server exactly what to serve to the client’s browser.

Relational databases Relational Database Management Systems (RDBMSs) provide a way to store and access complex information. They predate the Web, Linux, and Windows. All of the major databases make use of the Structured Query Language (SQL). Some of the more popular commercial RDBMSs are Oracle, Sybase, Informix, Microsoft’s SQL Server, and IBM’s db2. MySQL is open-source relational databases.

Why PHP (1) Fast – written in C but simpler. Easy – Syntax is believed to be superior to ASP and JSP. Easy to learn than Perl – a shell C-like language. Cross-platform Accesses everything – IMAP ( Internet Message Access Protocol ) Mail server, Oracle, Informix, DB2, XML parser, WDDX (Web Distributed Data eXchange ) function, etc.. Constantly being improved – part of open source development. Fully supported all over the world. FREE.

Why PHP (2) –other langugaes JSP – JavaServer Pages -- create dynamically generated web pages based on HTML, XML. JSP is similar to PHP, but it uses the Java programming language. In Windows environment (changeable whenever Windows OS are updated): ASP – Microsoft’s Active Server Pages IIS – Internet information Services

Why MySQL (1)? Not everyone’s choice – e.g., bank (savings + loan + …). But for most web applications. Cost-effective ( Oracle/Informix, $30,000-$100,000 ) Quick and powerful Improving constantly Fast, multi-threaded, multi-user, and robust SQL.

Why MySQL (2) – technical features Written in C and C++. Works on many different platforms. Uses GNU Automake, Autoconf, and Libtool for portability. APIs for C, C++, Eiffel, Java, Perl, PHP, Python, Ruby, and Tcl. Fully multi-threaded using kernel threads -- can easily use multiple CPUs if available. Transactional and non-transactional storage engines. Very fast B-tree disk tables (MyISAM) with index compression. Relatively easy to add another storage engine. A very fast thread-based memory allocation system. Available as client/server or embedded (linked) version. MySQL Version 3.22 had a 4 GB (4 gigabyte) limit on table size.

Brief history of MySQL A database management system. A relational db. Open source MySQL Database server – fast, reliable, easy to use.

Tools Text editor – Notepad, ConTEXT, Xampp – Apache, MySQL, PHP LAMP – Linux, Appache, MySQL, PHP Linux – Ubuntu (free + Windows)

Basic UNIX commands Start ‘Command Prompt’ – or type ‘cmd’ from ‘search window’ cd c:\xampp – change to directory ‘c:\xampp’ dir – list all the contents of current folder

Start Xampp 1) In the folder c:\xampp, double click ‘xampp- control.exe’ at 2) Click ‘Start’ for both ‘Apache’ and ‘MySQL’.

Start MySQL 1) Start ‘Command Prompt’ 2) cd c:\xampp\mysql\bin 3) mysql (or ‘mysql –u root’ (no password for now))

MySQL mysql> show databases; (list databases that have been in the system.)

MySQL (2) mysql> use test; (use database ‘test’) Query OK, 1 row affected (0.00 sec) mysql> show tables; mysql> mysql> CREATE TABLE y2k (date DATE, -> date_time DATETIME, -> time_stamp TIMESTAMP); Query OK, 0 rows affected (0.00 sec) mysql> INSERT INTO y2k VALUES -> (" "," :59:59", ), -> (" "," :00:00", ), -> (" "," :59:59", ); Query OK, 13 rows affected (0.01 sec) Records: 3 Duplicates: 0 Warnings: 0 mysql>

MySQL (3) mysql> SLECT * from y2k;

More information

Summary Apache MySQL PHP