* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download tp2543 web programming goal so far…
Survey
Document related concepts
Relational algebra wikipedia , lookup
Serializability wikipedia , lookup
Microsoft Access wikipedia , lookup
Entity–attribute–value model wikipedia , lookup
Extensible Storage Engine wikipedia , lookup
Oracle Database wikipedia , lookup
Ingres (database) wikipedia , lookup
Concurrency control wikipedia , lookup
Functional Database Model wikipedia , lookup
Microsoft SQL Server wikipedia , lookup
Microsoft Jet Database Engine wikipedia , lookup
Open Database Connectivity wikipedia , lookup
ContactPoint wikipedia , lookup
Clusterpoint wikipedia , lookup
Transcript
PHP & Database TP2543 WEB PROGRAMMING GOAL Learn more programming with PHP Syntax, Control variable, arrays statements Learn about Database Basic concepts - RDBMS Access SQL MS Accessing database using PHP SO FAR… HTML/ XHTML PHP Database CSS JavaScript 1 DATABASE Database – an integrated collection of data DBMS – mechanism to store and organize data according to database format Relational databases – popular Uses MS SQL to perform queries, manipulate data Access, MySQL, MS SQL, Oracle, Sybase, DB2 DATABASE MODELS RDBMS Relational database model – logical presentation of data that allows focusing on relations among data items, rather than physical structure Composed of tables Rows and Columns key – unique ID Primary 2 MYSQL MySQL - "My Structured Query Language“ Created by Michael Widenius from TcX (Sweden) in 1994 Open-source, relational database management system MySQL is used in web applications and acts as the database component of the WAMP/LAMP Used in free software projects (e.g. WordPress, Joomla) MYSQL AND WAMP/LAMP Download at www.mysql.com MYSQL INTERFACES Many different interfaces to manage and browse database easily phpMyAdmin heidiSQL MySQL-Front SQLyog 3 PHPMYADMIN TABLE “JENISKUIH” id nama harga imej 1 Biskut almond london 25 almond.jpg 2 Biskut cornflake 18 cornflake.jpg 3 Kuih tat nenas 22 kuihtat.jpg 4 Biskut makmur 22 makmur.jpg SQL SQL – Structured Query Language SQL can be used to access and manipulate databases SELECT * FROM pelajar SELECT * FROM pelajar WHERE NoMatrik=‘A123456’ 4 SQL QUERIES Query database for specific information and have a recordset returned from table SELECT nama FROM jeniskuih nama Biskut… Biskut… Biskut… HTTP REQUESTS GET Gets/retrieves information from server (e.g retrieve an image, fetch search results) Sends information as part of URL (visible, 2048 chars limit) Cached, bookmark-able POST Posts/sends data (e.g login information, post form data) Submitted data is hidden (invisible) Non-cached, non-bookmark-able THANK YOU 5