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.

Slides:



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

PHP SQL. Connection code:- mysql_connect("server", "username", "password"); Connect to the Database Server with the authorised user and password. Eg $connect.
Let’s try Oracle. Accessing Oracle The Oracle system, like the SQL Server system, is client / server. For SQL Server, –the client is the Query Analyser.
A Guide to MySQL 3. 2 Objectives Start MySQL and learn how to use the MySQL Reference Manual Create a database Change (activate) a database Create tables.
Kirkwood Center for Continuing Education Introduction to PHP and MySQL By Fred McClurg, Copyright © 2010 All Rights Reserved. 1.
Structured Query Language SQL: An Introduction. SQL (Pronounced S.Q.L) The standard user and application program interface to a relational database is.
DAT702.  Standard Query Language  Ability to access and manipulate databases ◦ Retrieve data ◦ Insert, delete, update records ◦ Create and set permissions.
Phil Brewster  One of the first steps – identify the proper data types  Decide how data (in columns) should be stored and used.
Introduction To Databases IDIA 618 Fall 2014 Bridget M. Blodgett.
MySQL Dr. Hsiang-Fu Yu National Taipei University of Education
PHP1-1 PHP & SQL Xingquan (Hill) Zhu
CSCI 6962: Server-side Design and Programming
Session 5: Working with MySQL iNET Academy Open Source Web Development.
Chapter 9 SQL and RDBMS Part C. SQL Copyright 2005 Radian Publishing Co.
INTERNET APPLICATION DEVELOPMENT For More visit:
Copyright © 2003 Pearson Education, Inc. Slide 8-1 The Web Wizard’s Guide to PHP by David Lash.
PHP Programming with MySQL Slide 8-1 CHAPTER 8 Working with Databases and MySQL.
 SQL stands for Structured Query Language.  SQL lets you access and manipulate databases.  SQL is an ANSI (American National Standards Institute) standard.
1 Overview of Databases. 2 Content Databases Example: Access Structure Query language (SQL)
Databases in Visual Studio. Database in VisualStudio An MS SQL database are built in Visual studio The Name can be something like ”(localdb)\Projects”
Mr. Justin “JET” Turner CSCI 3000 – Fall 2015 CRN Section A – TR 9:30-10:45 CRN – Section B – TR 5:30-6:45.
Information Systems Today (©2006 Prentice Hall) MySQL 1CS3754 Class Note #8, Is an open-source relational database management system 2.Is fast and.
Chapter 7 Working with Databases and MySQL PHP Programming with MySQL 2 nd Edition.
CHAPTER:14 Simple Queries in SQL Prepared By Prepared By : VINAY ALEXANDER ( विनय अलेक्सजेंड़र ) PGT(CS),KV JHAGRAKHAND.
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.
Database and mySQL Week 07 Dynamic Web TCNJ Jean Chu.
Database Fred Durao What is a database? A database is any organized collection of data. Some examples of databases you may encounter in.
CPS120: Introduction to Computer Science Lecture 19 Introduction to SQL.
Relational Databases Database Driven Applications Retrieving Data Changing Data Analysing Data What is a DBMS An application that holds the data manages.
Kirkwood Center for Continuing Education Introduction to PHP and MySQL By Fred McClurg, Copyright © 2015, Fred McClurg, All Rights.
Chapter 10: The Data Tier We discuss back-end data storage for Web applications, relational data, and using the MySQL database server for back-end storage.
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.
Chapter 5 MYSQL Database. Introduction to MYSQL MySQL is the world's most popular open-source database. Open source means that the source code, the programming.
Open Source Server Side Scripting ECA 236 Open Source Server Side Scripting MySQL – Inserting Data.
What’s a database? Data stored in a structured format that lends itself to easy manipulation and recall.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
Visual Programing SQL Overview Section 1.
Module Review Basic SQL commands: Create Database, Create Table, Insert and Select 2. Connect an SQL Database to PHP 3. Execute SQL Commands in.
CS453: Databases and State in Web Applications (Part 2) Prof. Tom Horton.
Chapter 8 Manipulating MySQL Databases with PHP PHP Programming with MySQL 2 nd Edition.
>> Introduction to MySQL. Introduction Structured Query Language (SQL) – Standard Database Language – Manage Data in a DBMS (Database Management System)
CP476 Internet Computing Perl CGI and MySql 1 Relational Databases –A database is a collection of data organized to allow relatively easy access for retrievals,
ECMM6018 Enterprise Networking For Electronic Commerce Tutorial 6 CGI/Perl and databases.
Distribution of Marks For Second Semester Internal Sessional Evaluation External Evaluation Assignment /Project QuizzesClass Attendance Mid-Term Test Total.
Starting with Oracle SQL Plus. Today in the lab… Connect to SQL Plus – your schema. Set up two tables. Find the tables in the catalog. Insert four rows.
Working with MySQL A290/A590, Fall /07/2014.
1 CPE 332 Introduction DBMS: Relational Database Managment Systems Instructor:Suthep Madarasmi, Ph.D. ดร. สุเทพ มาดารัศมี
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.
Databases and SQL CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
CS320 Web and Internet Programming SQL and MySQL Chengyu Sun California State University, Los Angeles.
SQL CSCI 201L Jeffrey Miller, Ph.D. HTTP :// WWW - SCF. USC. EDU /~ CSCI 201 USC CSCI 201L.
Lec-7. The IN Operator The IN operator allows you to specify multiple values in a WHERE clause. SQL IN Syntax SELECT column_name(s) FROM table_name WHERE.
 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.
Chapter 12 Introducing Databases. Objectives What a database is and which databases are typically used with ASP.NET pages What SQL is, how it looks, and.
SQL Introduction SQL stands for “Structured Query Language” and can be pronounced as “SQL” or “sequel – (Structured English.
Databases.
CS320 Web and Internet Programming SQL and MySQL
CS311 Database Management system
Principles of Software Development
ISC440: Web Programming 2 Server-side Scripting PHP 3
Chapter 8 Working with Databases and MySQL
SQL pepper.
CS3220 Web and Internet Programming SQL and MySQL
MySQL Database System Installation Overview SQL summary
CS3220 Web and Internet Programming SQL and MySQL
MySQL Database System Installation Overview SQL summary
CS4540 Special Topics in Web Development SQL and MS SQL
Presentation transcript:

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 File locking Security concerns Much more

Different SQL Servers Mysql (open source – no cost to use though may cost to embed and resell outside gpl) Ms sql (microsoft ) Oracle Sybase Access Older AS/400 – SQL machine

Structure SQL Server runs a service accepts sql commands using their version of the standard query language Allows access to the data inside the SQL server Organized into databases Tables (like spreadsheets) inside databases Gui management interface – Access / mysql workbench / mssql studio mgr

Your databases Connect with : mysql -u yourdbuser -p yourdatabase – The –p means the password will be entered later. You can also put the password right after the p as in pmypassword. No spaces and no quotes – Your database name is your db user and is usually your ecampus logon name – You should also be able to connect to pepperdb See your tables show tables See information inside your table select * from tablename

Create a table CREATE TABLE table_name (column_name column_type ); Plus insert PRIMARY KEY ( tutorial_id ) at end Ex: create table tutorials_tbl( tutorial_id INT NOT NULL AUTO_INCREMENT, tutorial_title VARCHAR(100) NOT NULL, tutorial_type VARCHAR(40) NOT NULL, submission_date DATE, PRIMARY KEY ( tutorial_id ) ); Credit to :

Create a related table Create table tutorials_types ( type VARCHAR(40) NOT NULL, type_name VARCHAR(100) NOT NULL, type_manager int not null, PRIMARY KEY ( type) ); Table picture from wikipedia

Insert a row INSERT INTO table_name ( field1, field2,...fieldN ) VALUES ( value1, value2,...valueN ); Examples: INSERT INTO tutorials_tbl (tutorial_title, tutorial_type, submission_date) VALUES ("Learn PHP", "php",NOW()); INSERT INTO tutorials_tbl (tutorial_title, tutorial_type, submission_date) VALUES ("Learn MySQL", "db",NOW()); INSERT INTO tutorials_tbl (tutorial_title, tutorial_type, submission_date) VALUES ("Learn Oracle", "db",NOW()); Credit:

Insert rows into another table INSERT INTO tutorials_types values ("php", "php tutorials",10); INSERT INTO tutorials_types values ("db", "database tutorials",20);

Query your tables select * from tutorials_tbl; select * from tutorials_types; select * from tutorials_types inner join tutorials_tbl on tutorials_tbl.tutorial_type = tutorials_types.type;

Select statement Select – keyword indicating just looking List all columns (* for all; table.column) From – keyword indicating table names follow Table name Join type + next table + on + matching fields Where – keyword indicating row selection Column = something

Switch to another database Show databases Use

Summary What is SQL How to open a database How to create tables How to query tables – very, very basic How to switch database context