Open Source and Informix Dynamic Server

Size: px
Start display at page:

Download "Open Source and Informix Dynamic Server"

Transcription

1 I07 Open Source and Informix Dynamic Server Jonathan Leffler IBM Information Management Tuesday 3 rd October :15 16:15 A brief discussion of how to use IDS with a wide variety of Open Source languages - Perl, Tcl/Tk, Python, PHP, etc. 1

2 Agenda Open Source Connecting to IDS Perl, DBI, and DBD::Informix Tcl/Tk and isqltcl PHP Aubit 4GL SQLCMD SQSL Python Ruby 2 2

3 Open Source What is Open Source? Which rock have you been hiding under? Software released under an Open Source license Conformant with the Open Source Definition Found at Free Redistribution Source Code Derived Works Permitted No Discrimination Against People or Groups No Discrimination Against Fields of Endeavour Distribution of License 3 3

4 Open Source Licenses There are many Open Source licenses GPL GNU General Public License LGPL GNU Lesser General Public License BSD Berkeley Systems Distribution MIT Massachusetts Institute of Technology MPL Mozilla Public License Academic Free License Open Software License Nearly 60 licenses at the Open Source Initiative! 4 4

5 Informix Database Connectivity ESQL/C The original connectivity. Standardized in SQL by ISO/IEC 9075:1992 ODBC Originally defined by Microsoft. Standardized (as CLI) by ISO/IEC :1996. JDBC Java analogue of ODBC. Standardized by Sun. All of these are proprietary. But can be used with Open Source software. 5 5

6 ESQL/C Preprocessor that converts extended C into pure C. Links with specific libraries. Separates static and dynamic SQL. Even though Informix does not really do so. int main(void) { EXEC SQL WHENEVER ERROR STOP; EXEC SQL DATABASE Stores; EXEC SQL BEGIN WORK; EXEC SQL DROP TABLE Customer; EXEC SQL ROLLBACK WORK; return(0); } 6 6

7 ODBC Database agnostic. Separates driver manager from drivers. Different drivers can be loaded at run time. You can avoid database-specific features. But sometimes you want to use them. All statements are dynamic. De-emphasized by Microsoft In favour of newer technologies ADO,.NET 7 7

8 JDBC Database agnostic. Drivers have different levels of Java-ness. Type 4: pure Java usually the best type to use. The other way to connect in Java is ESQL/J. Not widely accepted. JDBC is the lingua franca of the Java database world. 8 8

9 Perl Practical Extraction and Report Language Originally written by Larry Wall Version 1.0 in 1987 Version 5.0 in 1994 Version 6 under development for a long time Apocalypse 1 posted April 2001 (at Current stable version: June February 2006 Obtain via CPAN Comprehensive Perl Archive Network 9 9

10 10

11 11

12 12

13 Danger Danger Danger! SQL Injection Danger Danger Danger! If the code did not use $dbh->quote and embedded $name instead of $xname is a security breach (SQL injection exploit) ready to happen. Consider what happens if user supplies a name value: X% OR fname!= X OR fname = The query is now: DELETE FROM Customer WHERE Lname LIKE %X% OR fname!= X OR fname = % AND ZipCode IS NULL This is going to delete most rows from the table most likely, all rows. Use $dbh->quote($name) 13

14 Danger SQL Injection What happens if the code is written as: $sth = $dbh->prepare(qq{ DELETE FROM Customer WHERE Lname LIKE %$name% AND ZipCode IS NULL }); This is a security breach ready to happen SQL injection exploit. What happens if the user enters this name: X% OR fname!= X OR fname = 14 14

15 Danger SQL Injection The query is now: DELETE FROM Customer WHERE Lname LIKE %X% OR fname!= X OR fname = % AND ZipCode IS NULL This deletes all (most) rows from the table! Use $dbh->quote($name) if you must. Better to use placeholders (?) in the SQL $sth = $dbh->prepare(qq{ DELETE FROM Customer WHERE Lname LIKE? AND ZipCode IS NULL }); 15 SQL Injection is a serious problem in many systems it is not peculiar to Perl or IDS. 15

16 16

17 17

18 18

19 Tcl/Tk and isqltcl Tcl Tool Control Language Invented by John Ousterhout Tk Tool Kit (GUI) Tcl/Tk at Current version April isqltcl Informix SQL access via Tcl. Available at Version 5.0 released February Builds into dynamically loadable shared library 19 19

20 Tcl/Tk Extensions Tcl/Tk is designed to be easily extended Many extensions available for all jobs For example Expect Designed to handle scripting of processes Used for automating testing ftp://expect.nist.gov/ And many more

21 Loading ISQLTCL Load the ISQLTCL extension load isql.so Adds the command sql to Tcl/Tk tclsh wish 21 21

22 ISQLTCL Connections Connect to a database sql connect dbase as conn1 user $username \ password $password Connect to given database sql disconnect [current default all conn1] Close database connection sql setconnection [default conn1] Sets the specified connection 22 22

23 ISQLTCL Statements Executable statements Statements that return no data sql run {delete from sometable where pkcol =?} $pkval Prepares and executes the statement Optionally takes a number of arguments for placeholders Returns zero on success; non-zero on failure 23 23

24 ISQLTCL Cursors SELECT, EXECUTE PROCEDURE set stmt [sql open {select * from sometable}] Does PREPARE, DECLARE, and OPEN Returns a statement number (id) or a negative error Optionally takes arguments for placeholders set row [sql fetch $stmt 1] Collects one row of data As a Tcl list in the variable row The 1 is optional and means strip trailing blanks The list is empty if there is no more data 24 24

25 ISQLTCL Cursors sql reopen $stmt?arg1??arg2? Reopens the statement, with new parameters sql close $stmt Indicates you have no further use for the statement It frees both the cursor and statement! 25 25

26 What is PHP? Hypertext Processor Was once Personal Home Page Version released January 2006 Version released September 2005 Version released 4 th May 2006 An HTML scripting language Server-side Cross-platform Embedded in HTML documents Extensible Web site:

27 What is PHP? Built into the Apache Web Server Using DSO (dynamic shared objects) mod_php Or as a CGI binary With any web server PHP has a reputation for being insecure. Largely a question of how it is used. See PHP Security Consortium Not clear how active this is 27 27

28 What is PHP? Built-in access to: XML HTTP (cookies, sessions) And databases: ODBC DB2, Adabas-D, Empress, Solid, Velocis msql, MySQL, PostgreSQL Sybase, Oracle Informix 28 28

29 What is PHP? IBM also provides modern PDO drivers PDO PHP Data Objects PHP analogue of Perl DBI Article on DeveloperWorks For DB2 Via PDO_ODBC For IDS (beta version 0.2.1)

30 Informative PHP Script <HTML> <HEAD> <TITLE> PHP Information </TITLE></HEAD> <BODY> <?php echo URL: <B> echo <BR>\n phpinfo()?> </BODY> </HTML> 30 30

31 Old Informix Driver Code provided as standard part of PHP. But not maintained for several years. Must be explicitly compiled into PHP. 30 core functions. 8 functions to manipulate SBLOBs

32 Old Informix Driver Connection management ifx_connect ifx_pconnect ifx_close Basic Operations ifx_prepare ifx_query ifx_fetch_row ifx_do ifx_free_result 32 32

33 Old Informix Driver Status and Error Handling ifx_getsqlca ifx_error ifx_errormsg ifx_affected_rows Attribute Queries Blob handling Utility functions ifx_htmltbl_result 33 33

34 New Informix Driver Accessed via PDO functions See: <?php try { $dbh = new PDO( informix:dbname=stores', $user, $pass); } catch (PDOException $e) { print "Error!: ". $e->getmessage(). "<br/>"; die(); }?> 34 34

35 Python and InformixDB Version March alpha testing May InformixDB under active development Maintainer: Carsten Haese Python DB-API 2.0 compliant Requires Python 2.2 or better Needs Informix ClientSDK 35 35

36 Python and InformixDB import informixdb conn = informixdb.connect( test, someone, somepw ) cur = conn.cursor() cur.execute( create table test1(a int, b int) ) for i in range(1,25): cur.execute("insert into test1 values(?,?)", (i, i**2)) cur.execute("select * from test1") for row in cur: print "The square of %d is %d." % (row[0], row[1]) 36 36

37 Aubit 4GL Open Source 4GL 99% Informix 4GL Compatible BODR=Business Oriented, Database Related Task-focussed language Embedded SQL for database access High productivity, easy to learn Licensed under GPL/LGPL Includes 4GL-based Open Source software For commercial and non-commercial applications 37 37

38 Aubit 4GL New to 4GL? MAIN MENU "Title for my test menu" COMMAND "Impress Me" "Do something to impress me HELP 126 CALL OpenMyWindow() COMMAND "Exit" "Exit this menu" HELP 127 EXIT MENU END MENU END MAIN FUNCTION OpenMyWindow() OPEN WINDOW MyTestWindow AT 2,3 WITH FORM "FormForMyTestWindow" ATTRIBUTE(BORDER, WHITE) END FUNCTION Think about amount of code to achieve same functionality in 3GL! 38 38

39 Aubit 4GL Features Database independent ODBC, native, ESQL/C Fully modular (plug-in) architecture User interface independent GUI and Curses modes Platform independent (POSIX, UNIX, Windows) Easy to embed 3GL in 4GL Embedded C code 39 39

40 Aubit 4GL Enhancements Logical Reports ASQL dbaccess/isql replacement Flexible key mapping Print Screen functions Fully integrated testing hooks (including key recording and replay for batch jobs) Dynamic function calls (like perl :: ) 40 40

41 Aubit 4GL Web Sites Web site Bug Tracker Bulletin board Commercial support Current version: dated Pushing towards a 1.00 release 41 41

42 SQLCMD Originally called RDSQL in Renamed SQLCMD in Intended as an alternative to isql. Before DB-Access was created. Designed for use in shell scripts. Exits with non-zero status on error. Careful use of standard input, output, error. Output layout independent of selected data. Designed for interactive use. Available from the IIUG Software Archive

43 SQSL Structured Query Scripting Language SQSL is a scripting language Created by Marco Greco Superset of SQL Features aimed at scripting, reporting, and simple ETL Lets a DBA perform daily activities as easily as possible 43 43

44 SQSL Structured Query Scripting Language It has a low learning curve: Language features should be familiar To anyone with experience of SQL, SPL, Informix 4GL or Bourne shell It includes flow-control operations It has a curses-based full-screen mode Like DB-Access

45 Ruby Version December NEW Informix support Registered February 2006 Version released April Produced by Gerardo Santana Gómez Garrido See also Ruby on Rails

46 IIUG Software Archive Many useful utilities Art Kagel s utils2_ak package Generate UPDATE STATISTICS statements DB-Copy Stored Procedure Libraries Example DataBlades 4GL Code Generators 46 46

47

48

49 Session I07 Open Source and Informix Dynamic Server Jonathan Leffler IBM Information Management 49 49

Connecting to IBM Informix Dynamic Server the Open Source Way

Connecting to IBM Informix Dynamic Server the Open Source Way Platform: IBM Informix Dynamic Server 10.00 Connecting to IBM Informix Dynamic Server the Open Source Way Jonathan Leffler STSM, IBM Informix Database Engineering Session: K12 2005-05-26 08:30 Agenda Open

More information

Developing Informix Applications in Python

Developing Informix Applications in Python Developing Informix Applications in Python Carsten Haese Unique Systems, Inc. Informix Forum 2006 Washington, DC December 8-9, 2006 Overview Python Features InformixDB Features Installing InformixDB Interactive

More information

What is Scripting? CSCI: 4500/6500 Programming Languages. Higher-level Programming. Origin of Scripting Languages. Contemporary Scripting Languages

What is Scripting? CSCI: 4500/6500 Programming Languages. Higher-level Programming. Origin of Scripting Languages. Contemporary Scripting Languages What is Scripting? CSCI: 4500/6500 Programming Languages! Yes! The name comes from written script such as screenplay, where dialog is repeated verbatim for every performance Scripting Languages Chapter

More information

PHP for PL/SQL Developers. Lewis Cunningham JP Morgan Chase

PHP for PL/SQL Developers. Lewis Cunningham JP Morgan Chase PHP for PL/SQL Developers Lewis Cunningham JP Morgan Chase 1 What is PHP? PHP is a HTML pre-processor PHP allows you to generate HTML dynamically PHP is a scripting language usable on the web, the server

More information

DATABASE SYSTEMS. Database programming in a web environment. Database System Course, 2016

DATABASE SYSTEMS. Database programming in a web environment. Database System Course, 2016 DATABASE SYSTEMS Database programming in a web environment Database System Course, 2016 AGENDA FOR TODAY Advanced Mysql More than just SELECT Creating tables MySQL optimizations: Storage engines, indexing.

More information

Database Applications

Database Applications Database Applications Database Programming Application Architecture Objects and Relational Databases John Edgar 2 Users do not usually interact directly with a database via the DBMS The DBMS provides

More information

SQL: Programming. Introduction to Databases CompSci 316 Fall 2017

SQL: Programming. Introduction to Databases CompSci 316 Fall 2017 SQL: Programming Introduction to Databases CompSci 316 Fall 2017 2 Announcements (Thu., Oct. 12) Project milestone #1 due tonight Only one member per team needs to submit Remember members.txt Midterm is

More information

A Crash Course in Perl5

A Crash Course in Perl5 z e e g e e s o f t w a r e A Crash Course in Perl5 Part 8: Database access in Perl Zeegee Software Inc. http://www.zeegee.com/ Terms and Conditions These slides are Copyright 2008 by Zeegee Software Inc.

More information

PHP Hypertext Preprocessor: Tools for Webpage Management. Michael Watson ICTN

PHP Hypertext Preprocessor: Tools for Webpage Management. Michael Watson ICTN PHP Hypertext Preprocessor: Tools for Webpage Management Michael Watson ICTN 4040-001 Michael Watson Page 1 4/17/2006 In today s use of the Internet, webpage design is an interest for both businesses and

More information

Extensions. Server-Side Web Languages. Uta Priss School of Computing Napier University, Edinburgh, UK. Libraries Databases Graphics

Extensions. Server-Side Web Languages. Uta Priss School of Computing Napier University, Edinburgh, UK. Libraries Databases Graphics Extensions Server-Side Web Languages Uta Priss School of Computing Napier University, Edinburgh, UK Copyright Napier University Extensions Slide 1/17 Outline Libraries Databases Graphics Copyright Napier

More information

Princess Nourah bint Abdulrahman University. Computer Sciences Department

Princess Nourah bint Abdulrahman University. Computer Sciences Department Princess Nourah bint Abdulrahman University Computer Sciences Department 1 And use http://www.w3schools.com/ PHP Part 1 Objectives Introduction to PHP Computer Sciences Department 4 Introduction HTML CSS

More information

General Coding Standards

General Coding Standards Rick Cox rick@rescomp.berkeley.edu A description of general standards for all code generated by ResComp employees (including non-programmers), intended to make maintaince, reuse, upgrades, and trainig

More information

Kaivos User Guide Getting a database account 2

Kaivos User Guide Getting a database account 2 Contents Kaivos User Guide 1 1. Getting a database account 2 2. MySQL client programs at CSC 2 2.1 Connecting your database..................................... 2 2.2 Setting default values for MySQL connection..........................

More information

Web Application Development (WAD) V th Sem BBAITM(Unit-1) By: Binit Patel

Web Application Development (WAD) V th Sem BBAITM(Unit-1) By: Binit Patel Web Application Development (WAD) V th Sem BBAITM(Unit-1) By: Binit Patel Introduction: PHP (Hypertext Preprocessor) was invented by Rasmus Lerdorf in 1994. First it was known as Personal Home Page. Later

More information

The PHP language. Teaching you everything about PHP? Not exactly Goal: teach you how to interact with a database via web

The PHP language. Teaching you everything about PHP? Not exactly Goal: teach you how to interact with a database via web Web programming The PHP language Our objective Teaching you everything about PHP? Not exactly Goal: teach you how to interact with a database via web Access data inserted by users into HTML forms Interact

More information

Architecture Proposal for an Internet Services Charging Platform

Architecture Proposal for an Internet Services Charging Platform Internal Working Paper Architecture Proposal for an Internet Services Charging Platform John Cushnie Distributed Multimedia Research Group, Lancaster University, UK. E-mail: j.cushnie@lancaster.ac.uk Abstract.

More information

The Web Application Developer s. Red Hat Database. View. October 30, Webcast. Patrick Macdonald, Fernando Nasser. Red Hat Database Engineering

The Web Application Developer s. Red Hat Database. View. October 30, Webcast. Patrick Macdonald, Fernando Nasser. Red Hat Database Engineering Red Hat Database The Web Application Developer s View Webcast October 30, 2001 Patrick Macdonald, Fernando Nasser Liam Stewart, Neil Padgett Red Hat Database Engineering Agenda Red Hat Database Web Interaction

More information

AN INTRODUCTION TO PHP

AN INTRODUCTION TO PHP 1. What Is PHP AN INTRODUCTION TO PHP 4LDQJ;X DQG

More information

Databases on the web

Databases on the web Databases on the web The Web Application Stack Network Server You The Web Application Stack Network Server You The Web Application Stack Web Browser Network Server You The Web Application Stack Web Browser

More information

Introduction to Java Development with IDS

Introduction to Java Development with IDS Introduction to Java Development with IDS Jean Georges Perrin IIUG GreenIvory.com Tuesday, October 3 rd 2006 09:00 10:00. JGP.net Platform: IDS, Java 1 Agenda Who am I? Architecture Requirements Your very

More information

Let's Play... Try to name the databases described on the following slides...

Let's Play... Try to name the databases described on the following slides... Database Software Let's Play... Try to name the databases described on the following slides... "World's most popular" Free relational database system (RDBMS) that... the "M" in "LAMP" and "XAMP" stacks

More information

Options. Real SQL Programming 1. Stored Procedures. Embedded SQL

Options. Real SQL Programming 1. Stored Procedures. Embedded SQL Real 1 Options We have seen only how SQL is used at the generic query interface an environment where we sit at a terminal and ask queries of a database. Reality is almost always different: conventional

More information

Database Access. Rick Cattell JavaSoft

Database Access. Rick Cattell JavaSoft Database Access Rick Cattell JavaSoft Database Access 1. Relational database connectivity: JDBC 2. Higher-level relational APIs and tools 3. Object-oriented databases 4. Partners and summary Overview Java

More information

Programming the World Wide Web by Robert W. Sebesta

Programming the World Wide Web by Robert W. Sebesta Programming the World Wide Web by Robert W. Sebesta Tired Of Rpg/400, Jcl And The Like? Heres A Ticket Out Programming the World Wide Web by Robert Sebesta provides students with a comprehensive introduction

More information

DATABASE SYSTEMS. Introduction to MySQL. Database System Course, 2016

DATABASE SYSTEMS. Introduction to MySQL. Database System Course, 2016 DATABASE SYSTEMS Introduction to MySQL Database System Course, 2016 AGENDA FOR TODAY Administration Database Architecture on the web Database history in a brief Databases today MySQL What is it How to

More information

Why use a database? You can query the data (run searches) You can integrate with other business systems that use the same database You can store huge

Why use a database? You can query the data (run searches) You can integrate with other business systems that use the same database You can store huge 175 Why use a database? You can query the data (run searches) You can integrate with other business systems that use the same database You can store huge numbers of records without the risk of corruption

More information

Introduction of PHP Created By: Umar Farooque Khan

Introduction of PHP Created By: Umar Farooque Khan 1 Introduction of PHP Created By: Umar Farooque Khan 2 What is PHP? PHP stand for hypertext pre-processor. PHP is a general purpose server side scripting language that is basically used for web development.

More information

DATABASE SYSTEMS. Introduction to MySQL. Database System Course, 2016

DATABASE SYSTEMS. Introduction to MySQL. Database System Course, 2016 DATABASE SYSTEMS Introduction to MySQL Database System Course, 2016 AGENDA FOR TODAY Administration Database Architecture on the web Database history in a brief Databases today MySQL What is it How to

More information

LABORATORY OF DATA SCIENCE. Data Access: Relational Data Bases. Data Science and Business Informatics Degree

LABORATORY OF DATA SCIENCE. Data Access: Relational Data Bases. Data Science and Business Informatics Degree LABORATORY OF DATA SCIENCE Data Access: Relational Data Bases Data Science and Business Informatics Degree RDBMS data access 2 Protocols and API ODBC, OLE DB, ADO, ADO.NET, JDBC Python DBAPI with ODBC

More information

PHP: Hypertext Preprocessor. A tutorial Introduction

PHP: Hypertext Preprocessor. A tutorial Introduction PHP: Hypertext Preprocessor A tutorial Introduction Introduction PHP is a server side scripting language Primarily used for generating dynamic web pages and providing rich web services PHP5 is also evolving

More information

JDBC. Sun Microsystems has included JDBC API as a part of J2SDK to develop Java applications that can communicate with databases.

JDBC. Sun Microsystems has included JDBC API as a part of J2SDK to develop Java applications that can communicate with databases. JDBC The JDBC TM API is the application programming interface that provides universal data access for the Java TM platform. In other words, the JDBC API is used to work with a relational database or other

More information

Chapter 7:- PHP. Compiled By:- Sanjay Patel Assistant Professor, SVBIT.

Chapter 7:- PHP. Compiled By:- Sanjay Patel Assistant Professor, SVBIT. Chapter 7:- PHP Compiled By:- Assistant Professor, SVBIT. Outline Starting to script on server side, Arrays, Function and forms, Advance PHP Databases:-Basic command with PHP examples, Connection to server,

More information

Getting Started with Ingres and PHP April 8 th 2008

Getting Started with Ingres and PHP April 8 th 2008 Getting Started with Ingres and PHP April 8 th 2008 grantc@php.net 1 Abstract From downloading the source code to building the Ingres PECL extension, this session covers what is needed to get started with

More information

CBRN Data Import/Export Tool (CDIET) Presented by: Darius Munshi

CBRN Data Import/Export Tool (CDIET) Presented by: Darius Munshi CBRN Data Import/Export Tool (CDIET) Presented by: Darius Munshi 1 Cubic Company Proprietary 2 Presentation Outline Introduction to CDIET Benefits provided to user Scope Statement Timeline for development

More information

SQL Studio (BC) HELP.BCDBADASQL_72. Release 4.6C

SQL Studio (BC) HELP.BCDBADASQL_72. Release 4.6C HELP.BCDBADASQL_72 Release 4.6C SAP AG Copyright Copyright 2001 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express

More information

How to Configure Informix Connect and ODBC

How to Configure Informix Connect and ODBC Platform: Informix How to Configure Informix Connect and ODBC James Edmiston Informix DBA Consultant Quest Information Systems, Inc. Session: L7 /3:30 Purpose Identify Informix connectivity products and

More information

Chapter 11 Program Development and Programming Languages

Chapter 11 Program Development and Programming Languages Chapter 11 Program Development and Programming Languages permitted in a license distributed with a certain product or service or otherwise on a password-protected website for classroom use. Programming

More information

Writing PostgreSQL Applications

Writing PostgreSQL Applications Writing PostgreSQL Applications Bruce Momjian 16th January 2003 POSTGRESQL is an object-relational database developed on the Internet by a group of developers spread across the globe. It is an open-source

More information

SAS ODBC Driver. Overview: SAS ODBC Driver. What Is ODBC? CHAPTER 1

SAS ODBC Driver. Overview: SAS ODBC Driver. What Is ODBC? CHAPTER 1 1 CHAPTER 1 SAS ODBC Driver Overview: SAS ODBC Driver 1 What Is ODBC? 1 What Is the SAS ODBC Driver? 2 Types of Data Accessed with the SAS ODBC Driver 3 Understanding SAS 4 SAS Data Sets 4 Unicode UTF-8

More information

Kyle Brown Knowledge Systems Corporation by Kyle Brown and Knowledge Systems Corporation

Kyle Brown Knowledge Systems Corporation by Kyle Brown and Knowledge Systems Corporation Kyle Brown Knowledge Systems Corporation 1 What is the JDBC? What other persistence mechanisms are available? What facilities does it offer? How is it used? 2 JDBC is the Java DataBase Connectivity specification

More information

4) PHP and MySQL. Emmanuel Benoist. Spring Term Berner Fachhochschule Haute cole spcialise bernoise Berne University of Applied Sciences 1

4) PHP and MySQL. Emmanuel Benoist. Spring Term Berner Fachhochschule Haute cole spcialise bernoise Berne University of Applied Sciences 1 4) PHP and MySQL Emmanuel Benoist Spring Term 2017 Berner Fachhochschule Haute cole spcialise bernoise Berne University of Applied Sciences 1 PHP and MySQL Introduction Basics of MySQL Create a Table See

More information

Development Technologies. Agenda: phpmyadmin 2/20/2016. phpmyadmin MySQLi. Before you can put your data into a table, that table should exist.

Development Technologies. Agenda: phpmyadmin 2/20/2016. phpmyadmin MySQLi. Before you can put your data into a table, that table should exist. CIT 736: Internet and Web Development Technologies Lecture 10 Dr. Lupiana, DM FCIM, Institute of Finance Management Semester 1, 2016 Agenda: phpmyadmin MySQLi phpmyadmin Before you can put your data into

More information

SQL: Programming. Announcements (September 25) Motivation. CPS 116 Introduction to Database Systems. Pros and cons of SQL.

SQL: Programming. Announcements (September 25) Motivation. CPS 116 Introduction to Database Systems. Pros and cons of SQL. SQL: Programming CPS 116 Introduction to Database Systems Announcements (September 25) 2 Homework #2 due this Thursday Submit to Yi not through Jun s office door Solution available this weekend No class

More information

SQL: Programming. Introduction to Databases CompSci 316 Fall 2018

SQL: Programming. Introduction to Databases CompSci 316 Fall 2018 SQL: Programming Introduction to Databases CompSci 316 Fall 2018 2 Announcements (Thu., Oct. 11) Dean Khary McGhee, Office of Student Conduct, speaks about the Duke Community Standard Project milestone

More information

Perl Dbi Insert Hash Into Table >>>CLICK HERE<<<

Perl Dbi Insert Hash Into Table >>>CLICK HERE<<< Perl Dbi Insert Hash Into Table How to insert values in PostgreSQL faster than insert() value() functions? At the moment I am using DBI in Perl to connect to IQ(Sybase) then load the values into a hash,

More information

Using PHP with MYSQL

Using PHP with MYSQL Using PHP with MYSQL PHP & MYSQL So far you've learned the theory behind relational databases and worked directly with MySQL through the mysql command-line tool. Now it's time to get your PHP scripts talking

More information

Transbase R PHP Module

Transbase R PHP Module Transbase R PHP Module Transaction Software GmbH Willy-Brandt-Allee 2 D-81829 München Germany Phone: +49-89-62709-0 Fax: +49-89-62709-11 Email: info@transaction.de http://www.transaction.de Version 7.1.2.30

More information

Everyone who has been involved with IT for more than a few

Everyone who has been involved with IT for more than a few Introduction to MySQL Everyone who has been involved with IT for more than a few months has at least heard of MySQL. The acquisition of MySQL AB by Sun Microsystems brought a great deal of additional attention

More information

COMP284 Scripting Languages Lecture 13: PHP (Part 5) Handouts

COMP284 Scripting Languages Lecture 13: PHP (Part 5) Handouts COMP284 Scripting Languages Lecture 13: PHP (Part 5) Handouts Ullrich Hustadt Department of Computer Science School of Electrical Engineering, Electronics, and Computer Science University of Liverpool

More information

COMP102: Introduction to Databases, 23

COMP102: Introduction to Databases, 23 COMP102: Introduction to Databases, 23 Dr Muhammad Sulaiman Khan Department of Computer Science University of Liverpool U.K. 04 April, 2011 Programming with SQL Specific topics for today: Client/Server

More information

DATABASE SYSTEMS. Introduction to MySQL. Database System Course, 2018

DATABASE SYSTEMS. Introduction to MySQL. Database System Course, 2018 DATABASE SYSTEMS Introduction to MySQL Database System Course, 2018 CAUTION! *This class is NOT a recitation* We will NOT discuss the course material relevant to the exam and homework assignment We have

More information

IBM Informix DataBlade Module Development Overview

IBM Informix DataBlade Module Development Overview Informix Product Family Informix DataBlade Developers Kit Version 4.20 IBM Informix DataBlade Module Development Overview GC27-5555-00 Informix Product Family Informix DataBlade Developers Kit Version

More information

Overview. SQL from Applications. Accesing data from an application. Embedded SQL JDBC Stored Procedures. UVic C SC 370, Fall 2002

Overview. SQL from Applications. Accesing data from an application. Embedded SQL JDBC Stored Procedures. UVic C SC 370, Fall 2002 SQL from Applications UVic C SC 370, Fall 2002 Embedded SQL JDBC Stored Procedures Overview Daniel M. German Department of Computer Science University of Victoria October 15, 2002 Version: 1.00 6 1 SQL

More information

SQL from Applications

SQL from Applications SQL from Applications UVic C SC 370 Dr. Daniel M. German Department of Computer Science June 4, 2003 Version: 1.1.0 6 1 SQL from Applications (1.1.0) CSC 370 dmgerman@uvic.ca Overview Embedded SQL JDBC

More information

Jarvis Web Gateway. Installation Instructions. Jonathan Couper-Smartt

Jarvis Web Gateway. Installation Instructions. Jonathan Couper-Smartt Jarvis Web Gateway Installation Instructions Jonathan Couper-Smartt jarvis@nsquared.co.nz Abstract: The Jarvis Web Gateway is a lightweight web-service designed to give Rich Internet Applications a rapid,

More information

2017 Politecnico di Torino 1

2017 Politecnico di Torino 1 SQL for the applications Call Level Interface Requests are sent to the DBMS through functions of the host language solution based on predefined interfaces API, Application Programming Interface SQL instructions

More information

CS 377 Database Systems. Li Xiong Department of Mathematics and Computer Science Emory University

CS 377 Database Systems. Li Xiong Department of Mathematics and Computer Science Emory University CS 377 Database Systems Database Programming in PHP Li Xiong Department of Mathematics and Computer Science Emory University Outline A Simple PHP Example Overview of Basic Features of PHP Overview of PHP

More information

Enterprise Java Unit 1- Chapter 6 Prof. Sujata Rizal

Enterprise Java Unit 1- Chapter 6 Prof. Sujata Rizal Introduction JDBC is a Java standard that provides the interface for connecting from Java to relational databases. The JDBC standard is defined by Sun Microsystems and implemented through the standard

More information

2017 Politecnico di Torino 1

2017 Politecnico di Torino 1 SQL for the applications Call Level Interface Requests are sent to the DBMS through functions of the host language solution based on predefined interfaces API, Application Programming Interface SQL instructions

More information

Advanced Functions with DB2 and PHP for IBM i

Advanced Functions with DB2 and PHP for IBM i Advanced Functions with DB2 and PHP for IBM i Mike Pavlak Solution Consultant Agenda DB2 features in i6.1 and i7.1 Review DB2 functions in PHP Explore the possibilities Q&A 2 Three primary ingredients

More information

SQL-PL Interface. Murali Mani. Perl /CGI with Oracle/mySQL Install your own web server and use servlets with JDBC and Oracle/mySQL

SQL-PL Interface. Murali Mani. Perl /CGI with Oracle/mySQL Install your own web server and use servlets with JDBC and Oracle/mySQL SQL-PL Interface Some Possible Options Web Interface Perl /CGI with Oracle/mySQL Install your own web server and use servlets with JDBC and Oracle/mySQL Non-Web Interface JDBC with Oracle/mySQL Also other

More information

Programming in Python

Programming in Python COURSE DESCRIPTION This course presents both the programming interface and the techniques that can be used to write procedures in Python on Unix / Linux systems. COURSE OBJECTIVES Each participant will

More information

CPSC 421 Database Management Systems. Lecture 10: Embedded SQL

CPSC 421 Database Management Systems. Lecture 10: Embedded SQL CPSC 421 Database Management Systems Lecture 10: Embedded SQL * Some material adapted from R. Ramakrishnan, L. Delcambre, and B. Ludaescher Today s Agenda Quiz Project Part 2 Embedded SQL DDL and DML Notes:

More information

Programming in Java

Programming in Java 320341 Programming in Java Fall Semester 2014 Lecture 16: Introduction to Database Programming Instructor: Slides: Jürgen Schönwälder Bendick Mahleko Objectives This lecture introduces the following -

More information

Utilizing Databases in Grid Engine 6.0

Utilizing Databases in Grid Engine 6.0 Utilizing Databases in Grid Engine 6.0 Joachim Gabler Software Engineer Sun Microsystems http://sun.com/grid Current status flat file spooling binary format for jobs ASCII format for other objects accounting

More information

Web development with PHP. Kore Nordmann, Tobias Schlitt, Jakob Westhoff Dortmund

Web development with PHP. Kore Nordmann, Tobias Schlitt, Jakob Westhoff Dortmund Web development with PHP Kore Nordmann, Tobias Schlitt, Jakob Westhoff Dortmund 29.06.09 Speaker Jakob Westhoff Kore Nordmann Tobias Schlitt Active in various

More information

Perl Dbi Last Insert Id Example >>>CLICK HERE<<<

Perl Dbi Last Insert Id Example >>>CLICK HERE<<< Perl Dbi Last Insert Id Example Last updated on June 4, 2015 Authored by Dan Nanni 2 Comments I am going to use SQLite DBI Perl driver to connect to SQLite3. Here is the full-blown Perl code example of

More information

SQL: Programming Midterm in class next Thursday (October 5)

SQL: Programming Midterm in class next Thursday (October 5) Announcements (September 28) 2 Homework #1 graded Homework #2 due today Solution available this weekend SQL: Programming Midterm in class next Thursday (October 5) Open book, open notes Format similar

More information

Chapter 2: Operating-System Structures

Chapter 2: Operating-System Structures Chapter 2: Operating-System Structures Chapter 2: Operating-System Structures Operating System Services User Operating System Interface System Calls Types of System Calls System Programs Operating System

More information

Introducing the SAS ODBC Driver

Introducing the SAS ODBC Driver 1 CHAPTER 1 Introducing the SAS ODBC Driver Overview: The SAS ODBC Driver 1 What Is ODBC? 2 What Is the SAS ODBC Driver? 2 Types of Data Accessed with the SAS ODBC Driver 3 Understanding SAS 5 SAS Data

More information

DATABASE SYSTEMS. Database programming in a web environment. Database System Course,

DATABASE SYSTEMS. Database programming in a web environment. Database System Course, DATABASE SYSTEMS Database programming in a web environment Database System Course, 2016-2017 AGENDA FOR TODAY The final project Advanced Mysql Database programming Recap: DB servers in the web Web programming

More information

Database-Enabled Web Applications.! Introduction to PHP! Connecting to IBM DB2 with PHP

Database-Enabled Web Applications.! Introduction to PHP! Connecting to IBM DB2 with PHP Database-Enabled Web Applications! Introduction to PHP! Connecting to IBM DB2 with PHP Interfacing a Database to the Web! Classical client/server architecture: " server program waits for requests " clients

More information

Injection. CSC 482/582: Computer Security Slide #1

Injection. CSC 482/582: Computer Security Slide #1 Injection Slide #1 Topics 1. Injection Attacks 2. SQL Injection 3. Mitigating SQL Injection 4. XML Injection Slide #2 Injection Injection attacks trick an application into including unintended commands

More information

Schema Validate With Oracle 10g Database Status

Schema Validate With Oracle 10g Database Status Schema Validate With Oracle 10g Database Status This exam has been validated against Oracle Database 10g, Oracle Database 11g, Oracle Database 11g Release 2, and Oracle Database 12c Release 1. Copy whole

More information

Perl Mysql Dbi Insert Last Id >>>CLICK HERE<<<

Perl Mysql Dbi Insert Last Id >>>CLICK HERE<<< Perl Mysql Dbi Insert Last Id i am not able to get value in last_insert_id() after insert operation in sybase database. Taken from MySQL Perl DBI last_insert_id. +e(),'fix2mq')") or $DBI::err and die($dbi::errstr),

More information

Zend Core TM. Installation and Maintenance Guide. Zend Core for Oracle. By Zend Technologies, Inc. w w w. z e n d. c o m

Zend Core TM. Installation and Maintenance Guide. Zend Core for Oracle. By Zend Technologies, Inc. w w w. z e n d. c o m Zend Core TM Installation and Maintenance Guide Zend Core for Oracle By Zend Technologies, Inc. w w w. z e n d. c o m Disclaimer The information in this document is subject to change without notice and

More information

CMPT 354 Database Systems I

CMPT 354 Database Systems I CMPT 354 Database Systems I Chapter 8 Database Application Programming Introduction Executing SQL queries: Interactive SQL interface uncommon. Application written in a host language with SQL abstraction

More information

Introduction to MySQL. Database Systems

Introduction to MySQL. Database Systems Introduction to MySQL Database Systems 1 Agenda Bureaucracy Database architecture overview Buzzwords SSH Tunneling Intro to MySQL Comments on homework 2 Homework #1 Submission date is on the website..

More information

Lecture 13: MySQL and PHP. Monday, March 26, 2018

Lecture 13: MySQL and PHP. Monday, March 26, 2018 Lecture 13: MySQL and PHP Monday, March 26, 2018 MySQL The Old Way In older versions of PHP, we typically used functions that started with mysql_ that did not belong to a class For example: o o o o mysql_connect()

More information

Get Table Schema In Sql Server 2008 To Add Column If Not Exists >>>CLICK HERE<<<

Get Table Schema In Sql Server 2008 To Add Column If Not Exists >>>CLICK HERE<<< Get Table Schema In Sql Server 2008 To Add Column If Not Exists IF NOT EXISTS ( SELECT * FROM sys.columns WHERE object_id = OBJECT_ID(N'(dbo). Also try catch is easily possible to use in sql serverand

More information

PHP 5 and Databases. Marcus Börger Sterling Hughes. International PHP2003 conference

PHP 5 and Databases. Marcus Börger Sterling Hughes. International PHP2003 conference PHP 5 and Databases Marcus Börger Sterling Hughes International PHP2003 conference Marcus Börger PHP5 and Databases 2 Intro Review of PHP 4 Situation PHP 5 News PHP 5 Situation Marcus Börger PHP5 and Databases

More information

CSC System Development with Java. Database Connection. Department of Statistics and Computer Science. Budditha Hettige

CSC System Development with Java. Database Connection. Department of Statistics and Computer Science. Budditha Hettige CSC 308 2.0 System Development with Java Database Connection Budditha Hettige Department of Statistics and Computer Science Budditha Hettige 1 From database to Java There are many brands of database: Microsoft

More information

ICOM 5016 Database Systems. Database Users. User Interfaces and Tools. Chapter 8: Application Design and Development.

ICOM 5016 Database Systems. Database Users. User Interfaces and Tools. Chapter 8: Application Design and Development. Chapter 8: Application Design and Development ICOM 5016 Database Systems Web Application Amir H. Chinaei Department of Electrical and Computer Engineering University of Puerto Rico, Mayagüez User Interfaces

More information

PHP: Cookies, Sessions, Databases. CS174. Chris Pollett. Sep 24, 2008.

PHP: Cookies, Sessions, Databases. CS174. Chris Pollett. Sep 24, 2008. PHP: Cookies, Sessions, Databases. CS174. Chris Pollett. Sep 24, 2008. Outline. How cookies work. Cookies in PHP. Sessions. Databases. Cookies. Sometimes it is useful to remember a client when it comes

More information

Chapter 2: Operating-System Structures. Operating System Concepts 9 th Edition

Chapter 2: Operating-System Structures. Operating System Concepts 9 th Edition Chapter 2: Operating-System Structures Silberschatz, Galvin and Gagne 2013 Chapter 2: Operating-System Structures Operating System Services User Operating System Interface System Calls Types of System

More information

Tcl/Tk for XSPECT a Michael Flynn

Tcl/Tk for XSPECT a Michael Flynn Tcl/Tk for XSPECT a Michael Flynn Tcl: Tcl (i.e. Tool Command Language) is an open source scripting language similar to other modern script languages such as Perl or Python. It is substantially more powerful

More information

Databases CSCI 201 Principles of Software Development

Databases CSCI 201 Principles of Software Development Databases CSCI 201 Principles of Software Development Jeffrey Miller, Ph.D. jeffrey.miller@usc.edu Outline Databases SQL Try It! USC CSCI 201L Databases Database systems store data and provide a means

More information

A D V I S O R Y S E R V I C E S. Web Application Assessment

A D V I S O R Y S E R V I C E S. Web Application Assessment A D V I S O R Y S E R V I C E S Web Application Assessment March 2009 Agenda Definitions Landscape of current web applications Required skills Attack surface Scope Methodology Soft skills 2 Definitions

More information

Programming the Web 06CS73 INTRODUCTION AND OVERVIEW. Dr. Kavi Mahesh, PESIT, Bangalore. Textbook: Programming the World Wide Web

Programming the Web 06CS73 INTRODUCTION AND OVERVIEW. Dr. Kavi Mahesh, PESIT, Bangalore. Textbook: Programming the World Wide Web Programming the Web 06CS73 INTRODUCTION AND OVERVIEW Dr. Kavi Mahesh, PESIT, Bangalore Textbook: Programming the World Wide Web Introduction: Internet and World-Wide Web Internet History Internet Protocols

More information

How To Create Complex Stored Procedures In Sql Server 2008 With Examples

How To Create Complex Stored Procedures In Sql Server 2008 With Examples How To Create Complex Stored Procedures In Sql Server 2008 With Examples CLR Stored Procedures are managed codes so it ensures type safety, memory management, etc. It is very useful while executing complex

More information

JDBC Drivers Type. JDBC drivers implement the defined interfaces in the JDBC API for interacting with your database server.

JDBC Drivers Type. JDBC drivers implement the defined interfaces in the JDBC API for interacting with your database server. JDBC Drivers Type 1 What is JDBC Driver? JDBC drivers implement the defined interfaces in the JDBC API for interacting with your database server. For example, using JDBC drivers enable you to open database

More information

SQL Injection Attack Lab

SQL Injection Attack Lab SEED Labs SQL Injection Attack Lab 1 SQL Injection Attack Lab Copyright 2006-2016 Wenliang Du, Syracuse University. The development of this document was partially funded by the National Science Foundation

More information

Funny Oracle Error Code Table Not Found

Funny Oracle Error Code Table Not Found Funny Oracle Error Code Table Not Found In JDBC, the native error code and message can be retrieved as shown in this End-checkpoint log record not found Key not found in table or index Not only can I remember

More information

IBM DB2 JSON An overview of DB capabilities as a JSON document store

IBM DB2 JSON An overview of DB capabilities as a JSON document store IBM DB2 JSON An overview of DB2 10.5 capabilities as a JSON document store Olivier Bernin IBM Session Code: 4 April 16 th, 14:45 Platform: DB2 LUW Agenda Introduction what's JSON, requirements, setting

More information

A Quick Database Comparison of Db4o and SQL Databases through Cayenne

A Quick Database Comparison of Db4o and SQL Databases through Cayenne A Quick Database Comparison of Db4o and SQL Databases through Cayenne Peter Karich August 11, 2007, Bayreuth 1 Contents 1 Design 3 1.1 Pros....................................... 3 1.2 Cons.......................................

More information

Embedded SQL. csc343, Introduction to Databases Diane Horton with examples from Ullman and Widom Fall 2014

Embedded SQL. csc343, Introduction to Databases Diane Horton with examples from Ullman and Widom Fall 2014 Embedded SQL csc343, Introduction to Databases Diane Horton with examples from Ullman and Widom Fall 2014 Problems with using interactive SQL Standard SQL is not Turing-complete. E.g., Two profs are colleagues

More information

Embedded SQL. csc343, Introduction to Databases Renée J. Miller and Fatemeh Nargesian and Sina Meraji Winter 2018

Embedded SQL. csc343, Introduction to Databases Renée J. Miller and Fatemeh Nargesian and Sina Meraji Winter 2018 Embedded SQL csc343, Introduction to Databases Renée J. Miller and Fatemeh Nargesian and Sina Meraji Winter 2018 Problems with using interactive SQL Standard SQL is not Turing-complete. E.g., Two profs

More information

Chapters 10 & 11 PHP AND MYSQL

Chapters 10 & 11 PHP AND MYSQL Chapters 10 & 11 PHP AND MYSQL Getting Started The database for a Web app would be created before accessing it from the web. Complete the design and create the tables independently. Use phpmyadmin, for

More information

What is PHP? [1] Figure 1 [1]

What is PHP? [1] Figure 1 [1] PHP What is PHP? [1] PHP is an acronym for "PHP: Hypertext Preprocessor" PHP is a widely-used, open source scripting language PHP scripts are executed on the server PHP is free to download and use Figure

More information