Relational database and SQL MySQL LAMP SQL queries

Slides:



Advertisements
Similar presentations
What is MySQL? MySQL is a relational database management system (A relational database stores data in separate tables rather than putting all the data.
Advertisements

B.Sc. Multimedia ComputingMedia Technologies Database Technologies.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Server Side Web Technologies: Part 2.
Week 2 IBS 685. Static Page Architecture The user requests the page by typing a URL in a browser The Browser requests the page from the Web Server The.
Multiple Tiers in Action
1 CS428 Web Engineering Lecture 18 Introduction (PHP - I)
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.
PHP and MySQL Week#1  Course Plan.  Introduction to Dynamic Web Content.  Setting Up Development Server Eng. Mohamed Ahmed Black 1.
Phil Brewster  One of the first steps – identify the proper data types  Decide how data (in columns) should be stored and used.
Linux Operations and Administration
+ Connecting to the Web Week 7, Lecture A. + Midterm Basics Thursday February 28 during Class The lab Tuesday, February 26 is optional review Class on.
1 Web Database Processing. Web Database Applications Static Report Publishing a report is prepared from a database application and exported to HTML DB.
 2000 Deitel & Associates, Inc. All rights reserved. Chapter 24 – Web Servers (PWS, IIS, Apache, Jigsaw) Outline 24.1Introduction 24.2Microsoft Personal.
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.
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.
PHP Programming with MySQL Slide 8-1 CHAPTER 8 Working with Databases and MySQL.
About Dynamic Sites (Front End / Back End Implementations) by Janssen & Associates Affordable Website Solutions for Individuals and Small Businesses.
Internet Basics Dr. Norm Friesen June 22, Questions What is the Internet? What is the Web? How are they different? How do they work? How do they.
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
Chapter 7 Working with Databases and MySQL PHP Programming with MySQL 2 nd Edition.
Class 1Intro to Databases Goals of this class Understand the architecture behind web database applications Gain a basic understanding of what relational.
SQL Queries Relational database and SQL MySQL LAMP SQL queries A MySQL Tutorial and applications Database Building Assignment.
1 Working with MS SQL Server Textbook Chapter 14.
SQL Queries Relational database and SQL MySQL LAMP SQL queries A MySQL Tutorial and applications Database Building.
NMED 3850 A Advanced Online Design January 12, 2010 V. Mahadevan.
1 Welcome to CSC 301 Web Programming Charles Frank.
Case Study Dynamic Website - Three Tier Architecture
Web Server Administration Chapter 7 Installing and Testing a Programming Environment.
NMD202 Web Scripting Week5. What we will cover today PHP & MySQL Displaying Dynamic Pages Exercises Modifying Data PHP Exercises Assignment 1.
Class 1Intro to Databases Goals of this class Understand the architecture behind web database applications Gain a basic understanding of what relational.
Database Connectivity and Server-Side Scripting Chapter 12.
8 th Semester, Batch 2009 Department Of Computer Science SSUET.
Web Page Designing With Dreamweaver MX\Session 1\1 of 9 Session 1 Introduction to PHP Hypertext Preprocessor - PHP.
COM621: Advanced Interactive Web Development Lecture 10 PHP and MySQL.
Web Development. Agenda Web History Network Architecture Types of Server The languages of the web Protocols API 2.
PHP Basics and Syntax Lesson 3 ITBS2203 E-Commerce for IT.
2nd year Computer Science & Engineer
3-Tier Architectures (or 3-Tier Applications)
DBMS Programs MS SQL Server & MySQL
Introduction to Dynamic Web Programming
Client/Server Databases and the Oracle 10g Relational Database
PGT(CS) ,KV JHAGRAKHAND
Database System Concepts and Architecture
Introduction and Principles
Introduction to PHP FdSc Module 109 Server side scripting and
SQL Queries Relational database and SQL MySQL LAMP SQL queries
PHP / MySQL Introduction
BASIC PHP and MYSQL Edward S. Flores.
Database Driven Websites
CS 174: Server-Side Web Programming February 12 Class Meeting
System And Application Software
Chapter 8 Working with Databases and MySQL
Chapter 27 WWW and HTTP.
Chapter 6 System and Application Software
CS1222 Using Relational Databases and SQL
Lecture 1: Multi-tier Architecture Overview
Content of Presentation
IntroductionToPHP Static vs. Dynamic websites
Tutorial 6 PHP & MySQL Li Xu
Architecture of the web
Chapter 6 System and Application Software
Chapter 6 System and Application Software
UFCEUS-20-2 Web Programming
Web Servers (IIS and Apache)
Chapter 6 System and Application Software
Introduction of Week 5 Assignment Discussion
Web Application Development Using PHP
INTRODUCTION A Database system is basically a computer based record keeping system. The collection of data, usually referred to as the database, contains.
Presentation transcript:

Relational database and SQL MySQL LAMP SQL queries SQL and MySQL Relational database and SQL MySQL LAMP SQL queries

Assignment 2 SQL and a MySQL Tutorial Web database applications (Assignment 1, part II -- 5 reviews) Three-Tier Architectures Client tier: web browser software that interact with the applications Middle tier: application logic and communicate with db tier and client tier Database tier: database management system supports your data operation

Assignment 2: Using MySQL to issue SQL Queries Relational database SQL queries: language to communicate with DBMS A MySQL Tutorial create db and tables insert data delete data select data

Relational Database and SQL A particular kind of DBMS that is very good at relating information stored in one table to another –> to pull data from those tables and to join info from related tables to produce answers to the questions that can’t be answered from individual tables alone. SQL (Structured Query Language) standard database language.

MySQL Relational database system Client/server architecture (101 simultaneous connections) SQL (table size for Linux = 4GB) Programming languages: C, C++, Java, Perl, PHP, Python, and Tcl Platform independence, security, and speed

LAMP Linux (operating system) Apache (web server system) MySQL (database system) Perl/PHP (programming language – PHP for us) LAMP is an open source dream team LAMP is supported here by: athena

PHP Pure HTML  static web site PHP  enable you to build dynamic web site A server-side scripting language designed specifically for the web Conceived in 1994 by Rasmus Lerdorf as one-man project then adapted by many PHP (Personal Hypertext Preprocessor)

SQL Queries When you use MySQL, you are using 2 programs(client/server): Database server is a program located on the machine where your data are stored. It listens for client requests coming from network Clients are programs that connect to the database server and issue queries to tell it what info they want

Benefits of Client/Server The server provides concurrency control so that two users cannot modify the same record at the same time You don’t have to be logged in on the machine where your database is located

A MySQL Tutorial An excellent MySQL Tutorial in Chapter 1 of the following book: “MySQL™: The definitive guide to using, programming, and administering MySQL 4.1 and 5.0”, Third Edition by Paul DuBois (Safari Tech Books Online ) Establishing and terminating connection and issue SQL queries

Applications Examples of MySQL UCSC Human Genome Project Working Draft LOCal: A Flexible Web-Based Microscope Reservation System – Univ. of Wisconsin, Madison You are going to find out more fine examples ….

Assignment 2: change password for MySQL Following the instruction in Assignment 2, change your password in your MySQL account: The assigned Athena user name 122xxx is for both web server (Apatche) and database server (MySQL) The assigned password needs to be changed separately, once for web and once for db – you may use different passwords or keep them same Do it now …

Speedy MySQL Connection Create a option file named .my.cnf in your home directory with content – this will save your time to log into MySQL every time: [client] User = your-mysql-username Password = your-password After creating the above file, chmod 600 .my.cnf Familiar yourself with MySQL by using a tutorial and you are ready to go

Database Building Basics Create a table in MySQL: Method 1 – create it in MySQL – easy to make mistakes Method 2 – create/update in your favorite editor (linux or widow) first and then run mysql in Batch mode. Example: Edit mysql command to create a table “student” and save it as a file, “create_student.sql”. At linux prompt type the follow will create a table student in database webdb. mysql webdb < create_student.sql

Database Design Issues Understanding the process and relations Objectstables, attributes  columns, data types, relations index, primary keys Our database: 1 table student

The First Normal Form Columns with similar content must be eliminated A table must be created for each group of associated data Each data must be identifiable by means of a primary key (unique index)

Second Normal Form Whenever the contents of columns repeat themselves, this means that the table must be divided into several sub-tables These table must be linked by foreign keys (cross reference)

A good example of normalizing a database Third Normal Form Columns that are not directly related to the primary key must be eliminated A good example of normalizing a database