Using the Perl DBI module

1 Day Course
Hands On
Code QAPERLDBI

Book Now - 1 Delivery Method Available:

Scheduled Online Onsite

Overview

The popular Perl programming language is incredibly versatile. One of its niche uses is in interfacing with databases. Interfaces are available for all the popular Relational Database Management Systems, like Oracle, Sybase, DB2, SQL Server, MySQL, and so on. These are controlled through a common Perl interface, the DBI module. This course shows how to use the module effectively from Perl.

The course uses Linux with MySQL for practical exercises, but is applicable to other operating systems and databases.

Objectives

On completing this course, you will be able to:

  •  Use non-DBI databases
  •  Create databases and tables using Perl DBI
  •  Use SQL statements effectively from Perl
  •  Understand and use the different techniques for fetching data
  •  Write dynamic SQL queries and updates
  •  Handle errors and perform diagnostics
  •  Use the DBI Shell.

Training Partners

We work with the following best of breed training partners using our bulk buying power to bring you a wider range of dates, locations and prices.

Modules

Hide all

Perl Reminder (7 topics)

  • Perl documentation
  • Perl variables
  • Context
  • References
  • Subroutines
  • Modules
  • Perl OO

Perl and databases (6 topics)

  • Introduction
  • DBI and DBD
  • Drivers and data source names
  • The DBI shell
  • A test database
  • dbi:DBM: and dbish

Using database handles (9 topics)

  • Database handles
  • Connect and disconnect
  • Attributes for connect
  • Manual error checking
  • Atomic fetching
  • Batch fetching
  • Statement shortcut - do
  • Other database handle methods
  • Pitfalls

Using statement handles (6 topics)

  • Life cycle of a statement
  • Fetching rows
  • Retrieving result sets
  • Fetching metadata
  • Calling a stored procedure
  • Other statement handle methods

Placeholders (7 topics)

  • Placeholder syntax
  • Repeated statement execution
  • Dynamic SQL
  • Bulk substitution
  • Placeholders with $dbh->do
  • Data typing with bindparam
  • Binding output to variables

Transactions (4 topics)

  • Principles of transaction handling
  • Database capabilities
  • Manual transaction control
  • Error handling

Prerequisites

Experienced Perl 5 developers and support staff who wish to use and support Perl interfaces with database systems. Delegates must have recent experience of Perl, and some knowledge of SQL.

or call:408-759-5074

Course PDF

Print

Share this Course

+1
Share

Recommend this Course

Sections