18 Mapping from a database Mapping in the Cloud Peterson.

Slides:



Advertisements
Similar presentations
Copyright © 2003 Pearson Education, Inc. Slide 8-1 The Web Wizards Guide to PHP by David Lash.
Advertisements

MySQL. To start go to Login details: login: labuser password:macimd15 – There.
Keys, Referential Integrity and PHP One to Many on the Web.
Murach's MySQL, C1 © 2012, Mike Murach & Associates, Inc. Slide 1.
Mapping from a database Peterson. Linux PHP and MySQL were largely developed under Linux – open source operating system based on UNIX Linus Torvalds –
Murali Mani SQL DDL and Oracle utilities. Murali Mani Datatypes in SQL INT (or) INTEGER FLOAT (or) REAL DECIMAL (n, m) CHAR (n) VARCHAR (n) DATE, TIME.
Databases, MySQL, and PHP Peterson. The Social Network The first thing we're gonna need is a lot of pictures. Unfortunately, Harvard doesn't keep a public.
Kirkwood Center for Continuing Education Introduction to PHP and MySQL By Fred McClurg, Copyright © 2010 All Rights Reserved. 1.
DAT702.  Standard Query Language  Ability to access and manipulate databases ◦ Retrieve data ◦ Insert, delete, update records ◦ Create and set permissions.
1 CS428 Web Engineering Lecture 23 MySQL Basics (PHP - VI)
Introduction To Databases IDIA 618 Fall 2014 Bridget M. Blodgett.
MySql In Action Step by step method to create your own database.
Lecture 3 – Data Storage with XML+AJAX and MySQL+socket.io
Slide 8-1 CHAPTER 8 Using Databases with PHP Scripts: Using MySQL Database with PHP.
MU Bulletin Board Member: Carol Lim Yi Wang Lei Wen Mentor: John Boyer Programmer/Analyst of MSA/ Student Life.
Copyright © 2003 Pearson Education, Inc. Slide 8-1 The Web Wizard’s Guide to PHP by David Lash.
Web Application Development. Define ER model in QSEE Generate SQL Create Database mySQL Write Script to use TableEditor class Process to create A simple.
 SQL stands for Structured Query Language.  SQL lets you access and manipulate databases.  SQL is an ANSI (American National Standards Institute) standard.
Web Application Development. Tools to create a simple web- editable database QSEE MySQL (or PHPMyAdmin) PHP TableEditor.
Databases in Visual Studio. Database in VisualStudio An MS SQL database are built in Visual studio The Name can be something like ”(localdb)\Projects”
PHP meets MySQL.
Constraints  Constraints are used to enforce rules at table level.  Constraints prevent the deletion of a table if there is dependencies.  The following.
MySQL. MySQL is a Relational Database Management System (RDBMS) that runs as a server providing multiuser access to a number of databases. A third party.
SQL pepper. Why SQL File I/O is a great deal of code Optimal file organization and indexing is critical and a great deal of code and theory implementation.
15/10/20151 PHP & MySQL 'Slide materials are based on W3Schools PHP tutorial, 'PHP website 'MySQL website.
Introduction to MySQL Lab no. 10 Advance Database Management System.
SQL pepper. Why SQL File I/O is a great deal of code Optimal file organization and indexing is critical and a great deal of code and theory implementation.
Introduction to Internet Databases MySQL Database System Database Systems.
Web Scripting [PHP] CIS166AE Wednesdays 6:00pm – 9:50pm Rob Loy.
MySQL Databases & PHP Integration Using PHP to write data to, and retrieve data from, a MySQL database.
Database Fred Durao What is a database? A database is any organized collection of data. Some examples of databases you may encounter in.
Kirkwood Center for Continuing Education Introduction to PHP and MySQL By Fred McClurg, Copyright © 2015, Fred McClurg, All Rights.
Advanced Database Management System
SQL Basics. 5/27/2016Chapter 32 of 19 Naming SQL commands are NOT case sensitive SQL commands are NOT case sensitive But user identifier names ARE case.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
1 DIG 3134 – Lecture 14 MySQL and PHP Play Together Michael Moshell University of Central Florida Media Software Design.
Module Review Basic SQL commands: Create Database, Create Table, Insert and Select 2. Connect an SQL Database to PHP 3. Execute SQL Commands in.
Creating a simple database This shows you how to set up a database using PHPMyAdmin (installed with WAMP)
An easy to use web-based tool for tracking members and jobs.
Creating and Populating a MS SQLServer Database Presented By: Dr. Adam P. Anthony.
Copyright 2007 Byrne Reese. Distributed under Creative Commons, share and share alike with attribution. Intermediate Perl Programming Class Three Instructor:
Design of a Relational Database Schema for Magnet Inventory Data Catherine Pao July 26, 2006.
Task #1 Create a relational database on computers in computer classroom 308, using MySQL server and any client. Create the same database, using MS Access.
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.
E-COMMERCE JOBS This project (Project number: HU/01/B/F/PP ) is carried out with the financial support of the Commssion of the European Communities.
Managing Database With Oracle Replacement for Ch10 COP 4708.
Class11 Introduction to relational databases and MySQL MIS 3501, Fall 2015 Brad Greenwood, PhD MBA Department of MIS Fox School of Business Temple University.
Ch 7. Working with relational data. Transactions Group of statements executed as a group. If all statements execute successfully, changes are committed.
SQL pepper. Why SQL File I/O is a great deal of code Optimal file organization and indexing is critical and a great deal of code and theory implementation.
Copyright © 2003 Pearson Education, Inc. Slide 8-1 The Web Wizard’s Guide to PHP by David Lash.
Lab 3.21 MySQL Database Lab Developing the Tools May 5 th, 2004 Montréal, Québec Dominik Gehl Hôpital Ste-Justine, Montréal.
Databases and SQL CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
Introduction to MySQL  Working with MySQL and MySQL Workbench.
Understand Data Definition Language (DDL) Database Administration Fundamentals LESSON 1.4.
SQL CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
Web Systems & Technologies
Introduction to Web programming
CS311 Database Management system
Database application MySQL Database and PhpMyAdmin
Principles of Software Development
Using SQL Server through Command Prompt
Paul Jacobs The iSchool University of Maryland Thursday, Oct. 6, 2016
Database Driven Websites
Introduction to relational databases and MySQL
SQL Code for Byrnetube video
Rob Gleasure robgleasure.com
Paul Jacobs The iSchool University of Maryland Thursday, Oct. 5, 2017
Programming with data Lab 8
MySQL Database System Installation Overview SQL summary
SQL (Structured Query Language)
Presentation transcript:

18 Mapping from a database Mapping in the Cloud Peterson

Linux PHP and MySQL were largely developed under Linux – open source operating system based on UNIX Linus Torvalds – – “Hello everybody out there! I'm doing a (free) operating system … (just a hobby, won't be big and professional) for 386(486) AT clones. This has been brewing since april, and is starting to get ready.I'd like any feedback.”

PHP and MySQL Most Linux installation procedures include the option of installing PHP and MySQL. Administration of online databases is done through phpMyAdmin – Available through the cPanel Purpose of exercises: – Develop familiarity with PHP – Input and query MySQL tables

PHP example 1 Result: HTML written by PHP This was written in HTML from a PHP script

PHP example 2 Result: The square of 16 is 256.

PHP example 3 Result: A screen with a 1024 x 768 resolution has pixels. A screen with a 1024 x 768 resolution has 786,432 pixels.

PHP example 4 Result: The value of j is: 20 The value of j is: 40 The value of j is: 80 The value of j is: 160 The value of j is: 320

PHP example 5 Result: The value of myCount is: 0 The value of myCount is: 10 The value of myCount is: 20 The value of myCount is: 30 The value of myCount is: 40

PHP example 6 Result: 20 is bigger than 10

PHP Example 6

PHP Example 7

cPanel

MySQL is used to define new tables

SQL

Browse

Structure

SQL

Search

mysql_connect.php

All Capitals

North of Omaha / less than 500,000

Select within box

DROP TABLE IF EXISTS cities; create table cities ( city VARCHAR(30), location GEOMETRY NOT NULL, SPATIAL INDEX(location), PRIMARY KEY (city) ); INSERT INTO cities (city, location) VALUES ("Omaha", GeomFromText('POINT( )')); INSERT INTO cities (city, location) VALUES ("Atlanta", GeomFromText('POINT( )')); INSERT INTO cities (city, location) VALUES ("Lincoln", GeomFromText('POINT( )')); DROP TABLE IF EXISTS dl_airports; create table dl_airports ( city VARCHAR(30), airport VARCHAR(30), code VARCHAR(3), FOREIGN KEY (city) REFERENCES cities(city), PRIMARY KEY (code) ); INSERT INTO dl_airports (city, airport, code) VALUES ("Omaha","Omaha Eppley Airfield", "OMA"); INSERT INTO dl_airports (city, airport, code) VALUES ("Atlanta","Hartsfield-Jackson International Airport", "ATL"); INSERT INTO dl_airports (city, airport, code) VALUES ("Lincoln","Municipal Airport", "LNK"); DROP TABLE IF EXISTS dl_routes; create table dl_routes ( airportCode VARCHAR(3), destinationCode VARCHAR(3), FOREIGN KEY (airportCode) references dl_airports(code), FOREIGN KEY (destinationCode) references dl_airports(code) ); INSERT INTO dl_routes (airportCode, destinationCode) VALUES ("OMA","ATL"); INSERT INTO dl_routes (airportCode, destinationCode) VALUES ("OMA","DET"); INSERT INTO dl_routes (airportCode, destinationCode) VALUES ("OMA","MEM"); Part of the SQL code for entering three tables that provide city location, airport information, and airline connections.

Flight Routes

Selected routes

create table ne_counties ( strokecolor VARCHAR(7), strokewidth INT(5), strokeopacity FLOAT(5), fillcolor VARCHAR(7), fillopacity FLOAT(5), popdata INT(15), name VARCHAR(30), geom GEOMETRY NOT NULL, SPATIAL INDEX(geom) ); INSERT INTO ne_counties (strokecolor, strokewidth, strokeopacity, fillcolor, fillopacity, popdata, name, geom) VALUES ("#008800",1,1.0,"#FFCC00", ,33185,"county", GeomFromText('POLYGON(( , , , , , , , , , , , , ))')); INSERT INTO ne_counties (strokecolor, strokewidth, strokeopacity, fillcolor, fillopacity, popdata, name, geom) VALUES ("#008800",1,1.0,"#FFCC00", ,6931,"county", GeomFromText('POLYGON(( , , , , , , , , , , , , ))')); MySQL commands, attributes, and coordinates for placing two county polygons for Nebraska into a MySQL database.

Nebraska county polygons

Nebraska county population

Counties with less than 50,000

Selection of counties by points