MYSQL DATABASE ACCESS WITH PHP
|
|
|
- Milton Stokes
- 10 years ago
- Views:
Transcription
1 MYSQL DATABASE ACCESS WITH PHP Fall 2009 CSCI 2910 Server Side Web Programming Typical web application interaction Database Server 3 tiered architecture Security in this interaction is critical Web Server User Web Browser Interface 1
2 MySQL Free, open source, high performance database engine. Most popular open source DB. / MySQL Enterprise available as paid annual subscription with additional tools, support, etc. Part of common open source LAMP Web deployment architecture Linux, Apache, MySQL, yq, PHP. Architecture Components MySQL Server Available for all modern server OS. (Requires C++ and support for multi threading.) th Working with server 3 methods: MySQL Monitor executed from terminal window on server (command line tool, part of server install) MySQLMonitor Monitor executed from different server, connecting to target server. (Target server account must permit remote log in.) MySQL GUI Tools MySQL Administrator, MySQL Query Browser, and MySQL Migration Toolkit. 2
3 Working with server security issues Many organizations (and Web hosting companies) disable remote access for security reasons. They only acceptlocalhost logins. Many Web hosts do not allow MySQL Monitor or other GUI tool access. Packages like phpmyadmin allow MySQL database management via a web based GUI. 3
4 Using MySQL monitor To connect: 1. Use PuTTY to connect to Einstein terminal window (SSH connection) 2. At Einstein prompt enter mysql u abc123 p substituting your account name for abc123 u indicates the field that follows is your username p indicates that you will supply a password 3. Enter your password when prompted. (Initial password is ) 4. An optional h parameter can be used to specify a remote host. 4
5 Working in MySQL monitor To change your MySQL password: set password = password("mynewpassword"); All statements end in a semicolon. If not supplied on enter, prompted to continue entering statement (or semicolon). Up arrow and down arrow permit scrolling through previous commands. If you've typed a portion of a command and wish to "abandon" it, type \c and press enter. More about the monitor You can enter individual queries/commands or create an SQL script in a text editor. (It must be plain text.) ) Save the file with an.sql extension. Use # at the beginning of the line for a comment. Upload the file to server via sftp. Place in same directory as where MySQL is launched, typically account root (not web site root). To execute the script, enter \. scriptname.sql (slash, period, space, scriptname). (Don't forget the space!) 5
6 Working in MySQL monitor See list of databases: show databases; Select a database to use: use databasename; Database for class is the same as your account name. See list of tables in database: show tables; Show columns in a table: show columns from tablename; or describe tablename; To exit the monitor: exit or \q Quick Database Review What is a database? Organized collection of related data. Requires data collection, maintenance, and ability to be used. Relational database: Divided into logical units called tables. Tables related to one another within the database. Allows data to be broken down into moremanageable manageable units, allowing easier maintenance and improved performance. Each table has a field (or set of fields) that provides a unique identifier in each record. 6
7 Terminology A single row in a table is called a record. A table column is called a field. Data is retrieved from a database by executing a query. Show the name of student_id By having common keys, data from multiple tables can be brought together into a result set. Show the names of all the students from Idaho. Example Relations 1:1 1:* *:1 7
8 Creating Tables Database design generally begins with tables. Every table is named and consists of entities called fields which h describe information i stored in a table. Fields can be optional or required. An optional value that is left empty is said to be null. Null is not blank or 0, it is null. Not an error, unless field is specifically designated as not null (meaning a value is required). Fields are of a designated type which defines permissible values and storage space allocation. Common MySQL Data Types Type CHAR[length] VARCHAR[length] TEXT MEDIUMTEXT LONGTEXT TINYINT SMALLINT MEDIUMINT INT BIGINT FLOAT DOUBLE DECIMAL[length, decimals] Description Fixed length character field, exactly size length. Max length 255 chars Variable length character field, up to size length. Max length 255 chars String, max length ~65k chars String, max length ~16 million chars String, max length ~4 billion chars 128 to 127 (0 to 255 if designated UNSIGNED) ~ 32k to ~32k (also available UNSIGNED) ~ 8 million to ~8 million (also available UNSIGNED) ~ 2 billion to 2 billion (also available UNSIGNED) ~ 9 quintillion to 9 quintillion (also available UNSIGNED) ~38 digit significant decimal number ~308 digit significant decimal number Double, stored to preserve precision with a fixed decimal point 8
9 Common MySQL Data Types, cont. Type DATE DATETIME TIMESTAMP TIME YEAR YYYY MM DD YYYY MM DD HH:MM:SS YYYYMMDDHHMMSS HH:MM:SS YYYY Description When defining fields, can specify UNSIGNED, ZEROFILL, and NOT NULL. cost DECIMAL(5,2) UNSIGNED NOT NULL Timestamp is special when insert or update occurs, this field automatically set. Design principle: Use the smallest appropriate data type. Full Example Table Definition Field Name user_id first_name last_name password registration_date last_login users Type MEDIUMINT UNSIGNED NOT NULL VARCHAR(26) NOT NULL VARCHAR(30) NOT NULL VARCHAR(60) CHAR(16) NOT NULL DATETIME NOT NULL DATETIME Full overview of MySQL data types: types.html 9
10 Table Creation Process What data will be entered into the table? What will be the table's name? What field(s) will compose the primary key? What names shall be given to the fields? What data type will be assigned to each field? What will be the allocated length for each field? Is the field optional or required (not null)? Table Creation Syntax CREATE TABLE table_name ( field_name data_type [NOT NULL], PRIMARY KEY (field_name)); CREATE TABLE EMPLOYEE_TBL_DEMO ( EMP_ID CHAR(9)NOT NULL, EMP_NAME VARCHAR(40)NOT NULL, EMP_ST_ADDR VARCHAR(20), PRIMARY KEY (EMP_ID) ); DESCRIBE EMPLOYEE_TBL_DEMO; 10
11 Copying/Deleting an existing table CREATE TABLE NEW_TABLE AS SELECT * FROM OLD_TABLE; CREATE TABLE EMPLOYEE_TBL_DEMO AS SELECT * FROM EMPLOYEE_TBL; CREATE TABLE EMPLOYEE_TBL_DEMO_2 AS SELECT EMP_ID, LAST_NAME, FIRST_NAME FROM EMPLOYEE_TBL; DROP TABLE EMPLOYEE_TBL_DEMO_2; Inserting new data into a table INSERT INTO TABLE_NAME VALUE ( VAL1, ); INSERT INTO EMPLOYEE_TBL_DEMO VALUE ('123','Phil'Phil Smith','123 '123 Elm St.'); Works if inserting all fields in the order they appear in the table. INSERT INTO TABLE (FIELD1, ) VALUE ( VAL1, ); INSERT INTO EMPLOYEE_ TBL_ DEMO (EMP_ST_ADDR, EMP_NAME, EMP_ID) VALUE ('22 Poplar', 'Jo Johnson', '555'); For null values, list the word NULL (without quotes). 11
12 Updating existing table information UPDATE TABLENAME SET FIELD = VALUE WHERE FIELD = VALUE; May update 1 or more records in one operation. UPDATE ORDERS_TBL SET QTY = 1 WHERE ORD_NUM = '23E934'; UPDATE ORDERS_TBL SET QTY = 1; UPDATE ORDERS_TBL SET QTY = 10, CUST_ID = '221' WHERE ORD_NUM = '23E934'; DELETE Delete removes 1 or more records in their entirety from the table. DELETE FROM ORDERS_TBL WHERE ORD_NUM = '23A16'; DELETE FROM ORDERS_TBL WHERE QTY = 1; To delete all the records in a table: DELETE FROM ORDERS_TBL; 12
13 Querying the database Select is used to extract information based on specified criteria. SELECT * FROM PRODUCTS_TBL; TBL; Select statements consist of 4 distinct clauses: SELECT FROM WHERE ORDER BY Typically, SQL commands/keywords not casesensitivity. Data elements, fields, table names, etc. are. SELECT FROM SELECT [DISTINCT] [* or FIELD or FIELD, FIELD] SELECT position FROM EMPLOYEE_PAY_TBL; SELECT DISTINCT position FROM EMPLOYEE_PAY_TBL; SELECT position, pay_rate FROM EMPLOYEE_PAY_TBL; SELECT DISTINCT position, pay_rate FROM EMPLOYEE_PAY_TBL; _ SELECT * FROM ORDERS_TBL, PRODUCTS_TBL; 13
14 SELECT FROM WHERE Limits results returned based on condition(s). SELECT * FROM PRODUCTS_TBL WHERE COST > 10; SELECT * FROM PRODUCTS_TBL WHERE COST > 5 AND COST < 10; SELECT PROD_DESC, COST FROM PRODUCTS_TBL WHERE PROD_ID=119; SELECT EMP_ID FROM EMPLOYEE_TBL WHERE last_name= glass ; SELECT FROM WHERE ORDER BY Can list field to sort by. Ascending is default, DESC can be specified. SELECT PROD_DESC, DESC COST FROM PRODUCTS_TBL TBL WHERE COST<20 ORDER BY COST; SELECT PROD_DESC, COST FROM PRODUCTS_TBL WHERE COST<20 ORDER BY COST DESC; Shortcut can use integer to list column number to sort by in result set. SELECT PROD_DESC, COST FROM PRODUCTS_TBL WHERE COST<20 ORDER BY 1; 14
15 IS NULL The following is valid syntax, but likely incorrect: SELECT LAST_NAME FROM EMPLOYEE_TBL WHERE PAGER=NULL; The above looks for someone whose pager is the word NULL. SELECT LAST_NAME FROM EMPLOYEE_TBL WHERE PAGER IS NULL; BETWEEN Searches for a range of values within the range specified, including values on the boundary. SELECT * FROM PRODUCTS_TBL WHERE COST BETWEEN 5.95 AND 14.5; Could also state using >= and <= SELECT * FROM PRODUCTS_TBL WHERE COST >= 5.95 AND COST <= 14.5; 15
16 IN Allows listing of literal values to match. SELECT * FROM PRODUCTS_TBL WHERE PROD_ID IN ('13','9','87','119'); Like Allows value selection using wildcards: % represents 0 or more occurrences of any character _ (underscore) represents exactly 1 occurrence of any character SELECT * FROM EMPLOYEE_PAY_TBL WHERE EMP_ID LIKE '2%'; SELECT * FROM EMPLOYEE_PAY_TBL WHERE POSITION LIKE 'S%'; SELECT * FROM EMPLOYEE_PAY_TBL WHERE POSITION LIKE '_a%'; SELECT * FROM EMPLOYEE_PAY_TBL WHERE DATE_HIRE LIKE '%-06-%'; 16
17 AND, OR AND: Allows specifying multiple criteria all of which must be true for a match to occur. OR: Allows specifying multiple criteria any of which must be true for a match to occur. SELECT * FROM PRODUCTS_TBL WHERE PROD_ID = 9 OR PROD_ID=6; SELECT * FROM PRODUCTS_TBL WHERE PROD_ID = 9 OR 6; SELECT * FROM PRODUCTS_TBL WHERE PROD_ID = 9 AND PROD_ID=6; SELECT * FROM PRODUCTS_TBL WHERE PROD_ID = 9 OR COST < 8; NOT Reverses the meaning of the logical operator with which it is used. NOT EQUAL NOT BETWEEN NOT IN NOT LIKE IS NOT NULL 17
18 NOT Examples SELECT * FROM PRODUCTS_TBL WHERE COST NOT BETWEEN 5.95 AND 14.5; SELECT * FROM PRODUCTS_TBL WHERE PROD_ID NOT IN ('13','9','87','119'); SELECT PROD_DESC FROM PRODUCTS_TBL WHERE PROD_DESC NOT LIKE 'L%'; SELECT EMP_ID, LAST_NAME, FIRST_NAME, PAGER FROM EMPLOYEE_TBL WHERE PAGER IS NOT NULL; Functions Use COUNT function to count items in result set. Element in parenthesis is what will be counted. SELECT COUNT(*) FROM PRODUCTS_TBL; TBL Other functions: op summary ref.html 18
19 Joining Tables Joining tables brings together information from more than one table in a single query. Both tables are listed in the FROM clause. Join condition listed in the WHERE clause. Use tablename.field for clarity in overlapping field names. SELECT LAST_NAME, FIRST_NAME, PAY_RATE, SALARY FROM EMPLOYEE_TBL, EMPLOYEE_PAY_TBL WHERE EMPLOYEE_TBL.EMP_ID = EMPLOYEE_PAY_TBL.EMP_ID; The above is typically called an equijoin because the join is based on equality of the same field in different tables. Equijoin Structure SELECT TABLE1.COLUMN1, TABLE2.COLUMN2 FROM TABLE1, TABLE2 [, TABLE3 ] WHERE TABLE1.COLUMN_NAME= TABLE2.COLUMN_NAME [ AND TABLE1.COLUMN_NAME = TABLE3.COLUMN_NAME] 19
20 Examples SELECT EMPLOYEE_TBL.EMP_ID, EMPLOYEE_PAY_TBL.DATE_HIRE FROM EMPLOYEE_TBL,EMPLOYEE_PAY_TBL PAY WHERE EMPLOYEE_TBL.EMP_ID = EMPLOYEE_PAY_TBL.EMP_ID; SELECT EMPLOYEE_TBL.EMP_ID, EMPLOYEE_ TBL.LAST_ NAME, EMPLOYEE_PAY_TBL.POSITION FROM EMPLOYEE_TBL, EMPLOYEE_PAY_TBL WHERE EMPLOYEE_TBL.EMP_ID = EMPLOYEE_PAY_TBL.EMP_ID; Connecting to MySQL from PHP Typical steps in database transactions with PHP: 1.Connect to the RDBMS (Relational Database Management System). 2.Select a database to use. 3.Execute query. 4.Receive resultset from RDBMS. 5.Process the resultset. t 6.Close the RDBMS connection. Iterate as needed. 20
21 1. Connect to the RDBMS $conn = mysql_connect(host, username, password); If DB on same server as web server, can use "localhost" as the host name. $conn is set to a resource handle for accessing the connection or FALSE on failure. We can test $conn for connection will suppress errors from being written to the user display. If more than 1 connection needed to same host with same username/password, add TRUE as a 4 th parameter. Example = mysql_connect("localhost","demo", "demo"); if (!$db) echo "Cannot connect to MySQL"; else echo "Connection to MySQL successful";?> 1.php 21
22 die() or exit() die($string) or exit($string) terminate script execution writing $string as error message. = mysql_connect("localhost","demo", "demo"); if (!$db) die("cannot connect to MySQL"); echo "Connection to MySQL successful";?> "or" based construction can be used based on PHP's short circuit evaluation of logical operators. 2.php 2. Select a database to use If only one database to be opened: mysql_select_db('dbname'); If more than one database to be opened, list the connection to be used with a particular database. mysql_select_db('dbone', $db1); mysql_select_db('dbtwo', $db2); Most functions follow the pattern of having you specify the connection as the last parameter if more than 1 connection open. Returns FALSE if unable to select DB. 3.php 22
23 3. Execute Queries $output = mysql_query($query); $output = mysql_query($query,$db1); The above allows the execution of any raw SQL (Select, Insert, Delete, Update, etc.) Query string ($query) cannot end in a semicolon. $output is a "complex" data type a resource handle to the resultset for Select, etc., boolean for Insert, Update, etc. 6. Close the database connection If only one (unnamed) connection open mysql_close(); If more than one connection open mysql_close($db1); PHP documentation claims close is unnecessary but some report it does affect performance. 23
24 Processing Select Resultset mysql_num_rows($resultset)returns number of lines returned by a select statement. 4.php t i t /~ itt /CSCI2910/ /5 h Although this could be used to process resultset using a for loop, this is not typical. Recordset visualization Recordset returned as a complex data type. To display to user or otherwise incorporate into program logic, must parse out into elements. mysql_fetch_assoc(recordset) "pops" row off of recordset into an associative array and advanced internal pointer to next row. Returns false if there are no more rows to process key bday class name 24
25 Processing as an associative array $line = mysql_fetch_assoc($answer); The above retrieves the next line of the result set into an associative i array. 5.php To handle individual fields: echo $line['fieldname']; 6.php p// / p / / p / p p Loop through all lines in resultset using while loop. 7.php 8.php Fetch ing a line of the resultset mysql_fetch_assoc($resultset) returns next line of resultset as an associative array. while ($line = mysql_fetch_assoc($results)) lt echo $line['title']; mysql_fetch_row($resultset) returns next line of resultset as a numeric (0 based) array. while ($line = mysql_fetch_row($results)) echo $line[0]; //first field in results mysql_fetch_array($resultset) returns next line of resultset as both an associative and numeric array. 25
26 Taking apart a single row of a resultset A foreach loop can be used to process a single line of a resultset (just like a normal associative array). 9.php t i t /~ itt /CSCI2910/ /5 9 h Technique can be used to build output in table format php Table can be output with headers using mysql_data_seek($resultset, $row_to_seek); 11.php Building a table from query results 1. Verify query returned results. 2. Output a table open tag. 3. Read first row of output into associative array. 4. Use a loop to output table header row containing field names. 5. Reset resultset pointer to row Use a loop to process all rows in resultset. t Use a nested foreach loop to process individual table cells. 7. Close the table 26
27 Freeing Resources Record sets returned from queries can be large. Use mysql_free_result($resultset) to conserve memory. (Automatically done at end of script.) Other Database Interaction Insert, Update, Delete, etc. feature similar code, but less involved processing of results htm t i t /~ itt /CSCI2910/ /
28 Other MySQL Operations Select, Show, Explain, and Describe return a record set or FALSE. Other operations (Insert, Update, etc.) return TRUE orfalse. mysql_list_dbs() returns, as a record set, the list of databases. mysql_list_tables($dbname) returns, as a recordset, the list of tables in a database. mysql_affected_rows() returns as an integer the number of rows affected by the last insert, update, etc. 28
A table is a collection of related data entries and it consists of columns and rows.
CST 250 MySQL Notes (Source: www.w3schools.com) MySQL is the most popular open-source database system. What is MySQL? MySQL is a database. The data in MySQL is stored in database objects called tables.
A Brief Introduction to MySQL
A Brief Introduction to MySQL by Derek Schuurman Introduction to Databases A database is a structured collection of logically related data. One common type of database is the relational database, a term
SQL. Short introduction
SQL Short introduction 1 Overview SQL, which stands for Structured Query Language, is used to communicate with a database. Through SQL one can create, manipulate, query and delete tables and contents.
Financial Data Access with SQL, Excel & VBA
Computational Finance and Risk Management Financial Data Access with SQL, Excel & VBA Guy Yollin Instructor, Applied Mathematics University of Washington Guy Yollin (Copyright 2012) Data Access with SQL,
MySQL 5.1 INTRODUCTION 5.2 TUTORIAL
5 MySQL 5.1 INTRODUCTION Many of the applications that a Web developer wants to use can be made easier by the use of a standardized database to store, organize, and access information. MySQL is an Open
MS ACCESS DATABASE DATA TYPES
MS ACCESS DATABASE DATA TYPES Data Type Use For Size Text Memo Number Text or combinations of text and numbers, such as addresses. Also numbers that do not require calculations, such as phone numbers,
Database Administration with MySQL
Database Administration with MySQL Suitable For: Database administrators and system administrators who need to manage MySQL based services. Prerequisites: Practical knowledge of SQL Some knowledge of relational
G563 Quantitative Paleontology. SQL databases. An introduction. Department of Geological Sciences Indiana University. (c) 2012, P.
SQL databases An introduction AMP: Apache, mysql, PHP This installations installs the Apache webserver, the PHP scripting language, and the mysql database on your computer: Apache: runs in the background
Connecting to a Database Using PHP. Prof. Jim Whitehead CMPS 183, Spring 2006 May 15, 2006
Connecting to a Database Using PHP Prof. Jim Whitehead CMPS 183, Spring 2006 May 15, 2006 Rationale Most Web applications: Retrieve information from a database to alter their on-screen display Store user
2874CD1EssentialSQL.qxd 6/25/01 3:06 PM Page 1 Essential SQL Copyright 2001 SYBEX, Inc., Alameda, CA www.sybex.com
Essential SQL 2 Essential SQL This bonus chapter is provided with Mastering Delphi 6. It is a basic introduction to SQL to accompany Chapter 14, Client/Server Programming. RDBMS packages are generally
Using SQL Server Management Studio
Using SQL Server Management Studio Microsoft SQL Server Management Studio 2005 is a graphical tool for database designer or programmer. With SQL Server Management Studio 2005 you can: Create databases
INSTALLING, CONFIGURING, AND DEVELOPING WITH XAMPP
INSTALLING, CONFIGURING, AND DEVELOPING WITH XAMPP by Dalibor D. Dvorski, March 2007 Skills Canada Ontario DISCLAIMER: A lot of care has been taken in the accuracy of information provided in this article,
Facebook Twitter YouTube Google Plus Website Email
PHP MySQL COURSE WITH OOP COURSE COVERS: PHP MySQL OBJECT ORIENTED PROGRAMMING WITH PHP SYLLABUS PHP 1. Writing PHP scripts- Writing PHP scripts, learn about PHP code structure, how to write and execute
Microsoft SQL connection to Sysmac NJ Quick Start Guide
Microsoft SQL connection to Sysmac NJ Quick Start Guide This Quick Start will show you how to connect to a Microsoft SQL database it will not show you how to set up the database. Watch the corresponding
ODBC Client Driver Help. 2015 Kepware, Inc.
2015 Kepware, Inc. 2 Table of Contents Table of Contents 2 4 Overview 4 External Dependencies 4 Driver Setup 5 Data Source Settings 5 Data Source Setup 6 Data Source Access Methods 13 Fixed Table 14 Table
Database Query 1: SQL Basics
Database Query 1: SQL Basics CIS 3730 Designing and Managing Data J.G. Zheng Fall 2010 1 Overview Using Structured Query Language (SQL) to get the data you want from relational databases Learning basic
Retrieving Data Using the SQL SELECT Statement. Copyright 2006, Oracle. All rights reserved.
Retrieving Data Using the SQL SELECT Statement Objectives After completing this lesson, you should be able to do the following: List the capabilities of SQL SELECT statements Execute a basic SELECT statement
Application note: SQL@CHIP Connecting the IPC@CHIP to a Database
Application note: SQL@CHIP Connecting the IPC@CHIP to a Database 1. Introduction This application note describes how to connect an IPC@CHIP to a database and exchange data between those. As there are no
How To Create A Table In Sql 2.5.2.2 (Ahem)
Database Systems Unit 5 Database Implementation: SQL Data Definition Language Learning Goals In this unit you will learn how to transfer a logical data model into a physical database, how to extend or
Server side scripting and databases
Three components used in typical web application Server side scripting and databases How Web Applications interact with server side databases Browser Web server Database server Web server Web server Apache
PHP Authentication Schemes
7 PHP Authentication Schemes IN THIS CHAPTER Overview Generating Passwords Authenticating User Against Text Files Authenticating Users by IP Address Authenticating Users Using HTTP Authentication Authenticating
Oracle Database 10g Express
Oracle Database 10g Express This tutorial prepares the Oracle Database 10g Express Edition Developer to perform common development and administrative tasks of Oracle Database 10g Express Edition. Objectives
The release notes provide details of enhancements and features in Cloudera ODBC Driver for Impala 2.5.30, as well as the version history.
Cloudera ODBC Driver for Impala 2.5.30 The release notes provide details of enhancements and features in Cloudera ODBC Driver for Impala 2.5.30, as well as the version history. The following are highlights
sqlite driver manual
sqlite driver manual A libdbi driver using the SQLite embedded database engine Markus Hoenicka [email protected] sqlite driver manual: A libdbi driver using the SQLite embedded database engine
Information and Computer Science Department ICS 324 Database Systems Lab#11 SQL-Basic Query
Information and Computer Science Department ICS 324 Database Systems Lab#11 SQL-Basic Query Objectives The objective of this lab is to learn the query language of SQL. Outcomes After completing this Lab,
A list of data types appears at the bottom of this document. String datetimestamp = new java.sql.timestamp(system.currenttimemillis()).
Data Types Introduction A data type is category of data in computer programming. There are many types so are clustered into four broad categories (numeric, alphanumeric (characters and strings), dates,
INFORMATION BROCHURE Certificate Course in Web Design Using PHP/MySQL
INFORMATION BROCHURE OF Certificate Course in Web Design Using PHP/MySQL National Institute of Electronics & Information Technology (An Autonomous Scientific Society of Department of Information Technology,
Services. Relational. Databases & JDBC. Today. Relational. Databases SQL JDBC. Next Time. Services. Relational. Databases & JDBC. Today.
& & 1 & 2 Lecture #7 2008 3 Terminology Structure & & Database server software referred to as Database Management Systems (DBMS) Database schemas describe database structure Data ordered in tables, rows
SQL Server An Overview
SQL Server An Overview SQL Server Microsoft SQL Server is designed to work effectively in a number of environments: As a two-tier or multi-tier client/server database system As a desktop database system
SQL - QUICK GUIDE. Allows users to access data in relational database management systems.
http://www.tutorialspoint.com/sql/sql-quick-guide.htm SQL - QUICK GUIDE Copyright tutorialspoint.com What is SQL? SQL is Structured Query Language, which is a computer language for storing, manipulating
Other Language Types CMSC 330: Organization of Programming Languages
Other Language Types CMSC 330: Organization of Programming Languages Markup and Query Languages Markup languages Set of annotations to text Query languages Make queries to databases & information systems
Structured Query Language. Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics
Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics Structured Query Language HANS- PETTER HALVORSEN, 2014.03.03 Faculty of Technology, Postboks 203,
3.GETTING STARTED WITH ORACLE8i
Oracle For Beginners Page : 1 3.GETTING STARTED WITH ORACLE8i Creating a table Datatypes Displaying table definition using DESCRIBE Inserting rows into a table Selecting rows from a table Editing SQL buffer
A basic create statement for a simple student table would look like the following.
Creating Tables A basic create statement for a simple student table would look like the following. create table Student (SID varchar(10), FirstName varchar(30), LastName varchar(30), EmailAddress varchar(30));
Spring,2015. Apache Hive BY NATIA MAMAIASHVILI, LASHA AMASHUKELI & ALEKO CHAKHVASHVILI SUPERVAIZOR: PROF. NODAR MOMTSELIDZE
Spring,2015 Apache Hive BY NATIA MAMAIASHVILI, LASHA AMASHUKELI & ALEKO CHAKHVASHVILI SUPERVAIZOR: PROF. NODAR MOMTSELIDZE Contents: Briefly About Big Data Management What is hive? Hive Architecture Working
CPE111 COMPUTER EXPLORATION
CPE111 COMPUTER EXPLORATION BUILDING A WEB SERVER ASSIGNMENT You will create your own web application on your local web server in your newly installed Ubuntu Desktop on Oracle VM VirtualBox. This is a
not at all a manual simply a quick how-to-do guide
not at all a manual simply a quick how-to-do guide As a general rule, the GUI implemented by spatialite-gis is closely related to the one implemented by the companion app spatialite-gui So, if you are
Webapps Vulnerability Report
Tuesday, May 1, 2012 Webapps Vulnerability Report Introduction This report provides detailed information of every vulnerability that was found and successfully exploited by CORE Impact Professional during
Information Systems SQL. Nikolaj Popov
Information Systems SQL Nikolaj Popov Research Institute for Symbolic Computation Johannes Kepler University of Linz, Austria [email protected] Outline SQL Table Creation Populating and Modifying
Database Migration from MySQL to RDM Server
MIGRATION GUIDE Database Migration from MySQL to RDM Server A Birdstep Technology, Inc. Raima Embedded Database Division Migration Guide Published: May, 2009 Author: Daigoro F. Toyama Senior Software Engineer
Concepts Design Basics Command-line MySQL Security Loophole
Part 2 Concepts Design Basics Command-line MySQL Security Loophole Databases Flat-file Database stores information in a single table usually adequate for simple collections of information Relational Database
Intro to Embedded SQL Programming for ILE RPG Developers
Intro to Embedded SQL Programming for ILE RPG Developers Dan Cruikshank DB2 for i Center of Excellence 1 Agenda Reasons for using Embedded SQL Getting started with Embedded SQL Using Host Variables Using
CSCI110 Exercise 4: Database - MySQL
CSCI110 Exercise 4: Database - MySQL The exercise This exercise is to be completed in the laboratory and your completed work is to be shown to the laboratory tutor. The work should be done in week-8 but
MyOra 3.0. User Guide. SQL Tool for Oracle. Jayam Systems, LLC
MyOra 3.0 SQL Tool for Oracle User Guide Jayam Systems, LLC Contents Features... 4 Connecting to the Database... 5 Login... 5 Login History... 6 Connection Indicator... 6 Closing the Connection... 7 SQL
Access Queries (Office 2003)
Access Queries (Office 2003) Technical Support Services Office of Information Technology, West Virginia University OIT Help Desk 293-4444 x 1 oit.wvu.edu/support/training/classmat/db/ Instructor: Kathy
Web Development using PHP (WD_PHP) Duration 1.5 months
Duration 1.5 months Our program is a practical knowledge oriented program aimed at learning the techniques of web development using PHP, HTML, CSS & JavaScript. It has some unique features which are as
UQC103S1 UFCE47-20-1. Systems Development. uqc103s/ufce47-20-1 PHP-mySQL 1
UQC103S1 UFCE47-20-1 Systems Development uqc103s/ufce47-20-1 PHP-mySQL 1 Who? Email: [email protected] Web Site www.cems.uwe.ac.uk/~jedawson www.cems.uwe.ac.uk/~jtwebb/uqc103s1/ uqc103s/ufce47-20-1 PHP-mySQL
PHP Tutorial From beginner to master
PHP Tutorial From beginner to master PHP is a powerful tool for making dynamic and interactive Web pages. PHP is the widely-used, free, and efficient alternative to competitors such as Microsoft's ASP.
Creating Database Tables in Microsoft SQL Server
Creating Database Tables in Microsoft SQL Server Microsoft SQL Server is a relational database server that stores and retrieves data for multi-user network-based applications. SQL Server databases are
DIPLOMA IN WEBDEVELOPMENT
DIPLOMA IN WEBDEVELOPMENT Prerequisite skills Basic programming knowledge on C Language or Core Java is must. # Module 1 Basics and introduction to HTML Basic HTML training. Different HTML elements, tags
Zend Framework Database Access
Zend Framework Database Access Bill Karwin Copyright 2007, Zend Technologies Inc. Introduction What s in the Zend_Db component? Examples of using each class Using Zend_Db in MVC applications Zend Framework
VBScript Database Tutorial Part 1
VBScript Part 1 Probably the most popular use for ASP scripting is connections to databases. It's incredibly useful and surprisingly easy to do. The first thing you need is the database, of course. A variety
Build it with Drupal 8
Build it with Drupal 8 Comprehensive guide for building common websites in Drupal 8. No programming knowledge required! Antonio Torres This book is for sale at http://leanpub.com/drupal-8-book This version
Advanced SQL. Jim Mason. www.ebt-now.com Web solutions for iseries engineer, build, deploy, support, train 508-728-4353. jemason@ebt-now.
Advanced SQL Jim Mason [email protected] www.ebt-now.com Web solutions for iseries engineer, build, deploy, support, train 508-728-4353 What We ll Cover SQL and Database environments Managing Database
DataLogger. 2015 Kepware, Inc.
2015 Kepware, Inc. 2 DataLogger Table of Contents Table of Contents 2 DataLogger Help 4 Overview 4 Initial Setup Considerations 5 System Requirements 5 External Dependencies 5 SQL Authentication 6 Windows
!"# $ %& '( ! %& $ ' &)* + ! * $, $ (, ( '! -,) (# www.mysql.org!./0 *&23. mysql> select * from from clienti;
! "# $ %& '(! %& $ ' &)* +! * $, $ (, ( '! -,) (# www.mysql.org!./0 *&23 mysql> select * from from clienti; " "!"# $!" 1 1 5#',! INTEGER [(N)] [UNSIGNED] $ - 6$ 17 8 17 79 $ - 6: 1 79 $.;0'
TZWorks Windows Event Log Viewer (evtx_view) Users Guide
TZWorks Windows Event Log Viewer (evtx_view) Users Guide Abstract evtx_view is a standalone, GUI tool used to extract and parse Event Logs and display their internals. The tool allows one to export all
Advanced PostgreSQL SQL Injection and Filter Bypass Techniques
Advanced PostgreSQL SQL Injection and Filter Bypass Techniques INFIGO-TD TD-200 2009-04 2009-06 06-17 Leon Juranić [email protected] INFIGO IS. All rights reserved. This document contains information
Darshan Institute of Engineering & Technology PL_SQL
Explain the advantages of PL/SQL. Advantages of PL/SQL Block structure: PL/SQL consist of block of code, which can be nested within each other. Each block forms a unit of a task or a logical module. PL/SQL
CSC 443 Data Base Management Systems. Basic SQL
CSC 443 Data Base Management Systems Lecture 6 SQL As A Data Definition Language Basic SQL SQL language Considered one of the major reasons for the commercial success of relational databases SQL Structured
MySQL Quick Start Guide
Quick Start Guide MySQL Quick Start Guide SQL databases provide many benefits to the web designer, allowing you to dynamically update your web pages, collect and maintain customer data and allowing customers
Information Technology NVEQ Level 2 Class X IT207-NQ2012-Database Development (Basic) Student s Handbook
Students Handbook ... Accenture India s Corporate Citizenship Progra as well as access to their implementing partners (Dr. Reddy s Foundation supplement CBSE/ PSSCIVE s content. ren s life at Database
Version of this tutorial: 1.06a (this tutorial will going to evolve with versions of NWNX4)
Version of this tutorial: 1.06a (this tutorial will going to evolve with versions of NWNX4) The purpose of this document is to help a beginner to install all the elements necessary to use NWNX4. Throughout
Web Programming Step by Step
Web Programming Step by Step Chapter 11 Relational Databases and SQL References: SQL syntax reference, w3schools tutorial Except where otherwise noted, the contents of this presentation are Copyright 2009
Linas Virbalas Continuent, Inc.
Linas Virbalas Continuent, Inc. Heterogeneous Replication Replication between different types of DBMS / Introductions / What is Tungsten (the whole stack)? / A Word About MySQL Replication / Tungsten Replicator:
Firebird. Embedded SQL Guide for RM/Cobol
Firebird Embedded SQL Guide for RM/Cobol Embedded SQL Guide for RM/Cobol 3 Table of Contents 1. Program Structure...6 1.1. General...6 1.2. Reading this Guide...6 1.3. Definition of Terms...6 1.4. Declaring
MySQL Quick Start Guide
Fasthosts Customer Support MySQL Quick Start Guide This guide will help you: Add a MySQL database to your account. Find your database. Add additional users. Use the MySQL command-line tools through ssh.
MyOra 3.5. User Guide. SQL Tool for Oracle. Kris Murthy
MyOra 3.5 SQL Tool for Oracle User Guide Kris Murthy Contents Features... 4 Connecting to the Database... 5 Login... 5 Login History... 6 Connection Indicator... 6 Closing the Connection... 7 SQL Editor...
Results CRM 2012 User Manual
Results CRM 2012 User Manual A Guide to Using Results CRM Standard, Results CRM Plus, & Results CRM Business Suite Table of Contents Installation Instructions... 1 Single User & Evaluation Installation
B.1 Database Design and Definition
Appendix B Database Design B.1 Database Design and Definition Throughout the SQL chapter we connected to and queried the IMDB database. This database was set up by IMDB and available for us to use. But
A SQL Injection : Internal Investigation of Injection, Detection and Prevention of SQL Injection Attacks
A SQL Injection : Internal Investigation of Injection, Detection and Prevention of SQL Injection Attacks Abhay K. Kolhe Faculty, Dept. Of Computer Engineering MPSTME, NMIMS Mumbai, India Pratik Adhikari
SQL Injection January 23, 2013
Web-based Attack: SQL Injection SQL Injection January 23, 2013 Authored By: Stephanie Reetz, SOC Analyst Contents Introduction Introduction...1 Web applications are everywhere on the Internet. Almost Overview...2
Lab 2: PostgreSQL Tutorial II: Command Line
Lab 2: PostgreSQL Tutorial II: Command Line In the lab 1, we learned how to use PostgreSQL through the graphic interface, pgadmin. However, PostgreSQL may not be used through a graphical interface. This
Certified PHP/MySQL Web Developer Course
Course Duration : 3 Months (120 Hours) Day 1 Introduction to PHP 1.PHP web architecture 2.PHP wamp server installation 3.First PHP program 4.HTML with php 5.Comments and PHP manual usage Day 2 Variables,
Oracle 10g PL/SQL Training
Oracle 10g PL/SQL Training Course Number: ORCL PS01 Length: 3 Day(s) Certification Exam This course will help you prepare for the following exams: 1Z0 042 1Z0 043 Course Overview PL/SQL is Oracle's Procedural
P_Id LastName FirstName Address City 1 Kumari Mounitha VPura Bangalore 2 Kumar Pranav Yelhanka Bangalore 3 Gubbi Sharan Hebbal Tumkur
SQL is a standard language for accessing and manipulating databases. What is SQL? SQL stands for Structured Query Language SQL lets you access and manipulate databases SQL is an ANSI (American National
XEP-0043: Jabber Database Access
XEP-0043: Jabber Database Access Justin Kirby mailto:[email protected] xmpp:[email protected] 2003-10-20 Version 0.2 Status Type Short Name Retracted Standards Track Expose RDBM systems directly
SQL Server Table Design - Best Practices
CwJ Consulting Ltd SQL Server Table Design - Best Practices Author: Andy Hogg Date: 20 th February 2015 Version: 1.11 SQL Server Table Design Best Practices 1 Contents 1. Introduction... 3 What is a table?...
Title. Syntax. stata.com. odbc Load, write, or view data from ODBC sources. List ODBC sources to which Stata can connect odbc list
Title stata.com odbc Load, write, or view data from ODBC sources Syntax Menu Description Options Remarks and examples Also see Syntax List ODBC sources to which Stata can connect odbc list Retrieve available
Introduction to Microsoft Jet SQL
Introduction to Microsoft Jet SQL Microsoft Jet SQL is a relational database language based on the SQL 1989 standard of the American Standards Institute (ANSI). Microsoft Jet SQL contains two kinds of
SECURING APACHE : THE BASICS - III
SECURING APACHE : THE BASICS - III Securing your applications learn how break-ins occur Shown in Figure 2 is a typical client-server Web architecture, which also indicates various attack vectors, or ways
IRF2000 IWL3000 SRC1000 Application Note - Apps with OSGi - Condition Monitoring with WWH push
Version 2.0 Original-Application Note ads-tec GmbH IRF2000 IWL3000 SRC1000 Application Note - Apps with OSGi - Condition Monitoring with WWH push Stand: 28.10.2014 ads-tec GmbH 2014 IRF2000 IWL3000 SRC1000
White Paper. Blindfolded SQL Injection
White Paper In the past few years, SQL Injection attacks have been on the rise. The increase in the number of Database based applications, combined with various publications that explain the problem and
Package sjdbc. R topics documented: February 20, 2015
Package sjdbc February 20, 2015 Version 1.5.0-71 Title JDBC Driver Interface Author TIBCO Software Inc. Maintainer Stephen Kaluzny Provides a database-independent JDBC interface. License
Accessing External Databases from Mobile Applications
CENTER FOR CONVERGENCE AND EMERGING NETWORK TECHNOLOGIES CCENT Syracuse University TECHNICAL REPORT: T.R. 2014-003 Accessing External Databases from Mobile Applications Version 2.0 Authored by: Anirudh
Table of Contents. Introduction: 2. Settings: 6. Archive Email: 9. Search Email: 12. Browse Email: 16. Schedule Archiving: 18
MailSteward Manual Page 1 Table of Contents Introduction: 2 Settings: 6 Archive Email: 9 Search Email: 12 Browse Email: 16 Schedule Archiving: 18 Add, Search, & View Tags: 20 Set Rules for Tagging or Excluding:
Smart Web. User Guide. Amcom Software, Inc.
Smart Web User Guide Amcom Software, Inc. Copyright Version 4.0 Copyright 2003-2005 Amcom Software, Inc. All Rights Reserved. Information in this document is subject to change without notice. The software
Data Tool Platform SQL Development Tools
Data Tool Platform SQL Development Tools ekapner Contents Setting SQL Development Preferences...5 Execution Plan View Options Preferences...5 General Preferences...5 Label Decorations Preferences...6
Embedded SQL programming
Embedded SQL programming http://www-136.ibm.com/developerworks/db2 Table of contents If you're viewing this document online, you can click any of the topics below to link directly to that section. 1. Before
Web Intelligence User Guide
Web Intelligence User Guide Office of Financial Management - Enterprise Reporting Services 4/11/2011 Table of Contents Chapter 1 - Overview... 1 Purpose... 1 Chapter 2 Logon Procedure... 3 Web Intelligence
Microsoft Access 3: Understanding and Creating Queries
Microsoft Access 3: Understanding and Creating Queries In Access Level 2, we learned how to perform basic data retrievals by using Search & Replace functions and Sort & Filter functions. For more complex
Connecting to your Database!... 3
Connecting to your Database!... 3 Connecting to Access Databases!... 3 Connecting to SQL Server!... 8 Connecting to Oracle!... 10 Connecting to MySQL!... 11 Connecting to Sybase!... 12 Connecting to IBM
Teach Yourself InterBase
Teach Yourself InterBase This tutorial takes you step-by-step through the process of creating and using a database using the InterBase Windows ISQL dialog. You learn to create data structures that enforce
Oracle Database: SQL and PL/SQL Fundamentals
Oracle University Contact Us: 1.800.529.0165 Oracle Database: SQL and PL/SQL Fundamentals Duration: 5 Days What you will learn This course is designed to deliver the fundamentals of SQL and PL/SQL along
Online shopping store
Online shopping store 1. Research projects: A physical shop can only serves the people locally. An online shopping store can resolve the geometrical boundary faced by the physical shop. It has other advantages,
2/3/04 Doc 7 SQL Part 1 slide # 1
2/3/04 Doc 7 SQL Part 1 slide # 1 CS 580 Client-Server Programming Spring Semester, 2004 Doc 7 SQL Part 1 Contents Database... 2 Types of Databases... 6 Relational, Object-Oriented Databases and SQL...
RDBMS Using Oracle. Lecture Week 7 Introduction to Oracle 9i SQL Last Lecture. [email protected]. Joining Tables
RDBMS Using Oracle Lecture Week 7 Introduction to Oracle 9i SQL Last Lecture Joining Tables Multiple Table Queries Simple Joins Complex Joins Cartesian Joins Outer Joins Multi table Joins Other Multiple
