Programming the Perl DBI: Database programming with Perl by Tim Bunce

By Tim Bunce

One of the best strengths of the Perl programming language is its skill to control quite a lot of information. Database programming is for this reason a common healthy for Perl, not just for enterprise functions but additionally for CGI-based internet and intranet applications.The fundamental interface for database programming in Perl is DBI. DBI is a database-independent package deal that offers a constant set of exercises despite what database product you use--Oracle, Sybase, Ingres, Informix, you identify it. The layout of DBI is to split the particular database drivers (DBDs) from the programmer's API, so any DBI software can paintings with any database, or perhaps with a number of databases via varied proprietors simultaneously.Programming the Perl DBI is coauthored by way of Alligator Descartes, one of the main lively participants of the DBI neighborhood, and via Tim Bunce, the inventor of DBI. For the uninitiated, the ebook explains the structure of DBI and exhibits you the way to write down DBI-based courses. For the skilled DBI dabbler, this e-book finds DBI's nuances and the peculiarities of every person DBD.The e-book includes:

  • An creation to DBI and its design
  • How to build queries and bind parameters
  • Working with database, motive force, and assertion handles
  • Debugging techniques
  • Coverage of every latest DBD
  • A entire connection with DBI

This is the definitive e-book for database programming in Perl.

Show description

Read Online or Download Programming the Perl DBI: Database programming with Perl PDF

Best organization and data processing books

Visual and Spatial Analysis - Advances in Data Mining, Reasoning, and Problem Solving Boris Kovalerchuk (Springer 2004 596s)

Complex visible research and challenge fixing has been carried out effectively for millennia. The Pythagorean Theorem was once confirmed utilizing visible capability greater than 2000 years in the past. within the nineteenth century, John Snow stopped a cholera epidemic in London via presenting particular water pump be close down. He found that pump by way of visually correlating info on a urban map.

Entertainment Computing – ICEC 2004: Third International Conference, Eindhoven, The Netherlands, September 1-3, 2004. Proceedings

The development of knowledge and conversation applied sciences (ICT) has enabled vast use of ICT and facilitated using ICT within the deepest and private area. ICT-related industries are directing their company ambitions to domestic functions. between those purposes, leisure will differentiate ICT purposes within the inner most and private industry from the of?

Theory of Relational Databases

The speculation of Relational Databases. David Maier. Copyright 1983, computing device technological know-how Press, Rockville. Hardcover in first-class situation. markings. NO airborne dirt and dust jacket. Shelved in know-how. The Bookman serving Colorado Springs considering 1990.

Additional info for Programming the Perl DBI: Database programming with Perl

Example text

Within the stones user's schema, the various tables that compose the megalithic database have been created. Data is stored within a table in the form of rows . That is, the data for one site is stored within one row that contains the appropriate values for each column. This sort of data layout corresponds exactly to the row-column metaphor used by spreadsheets, ledgers, or even plain old tabulated lists you might scribble in a notepad. '' To perform these queries, we simply specify the columns we wish to see and the conditions each column in each row must meet to be returned as a valid result.

That is, the example code listed above contains code that explicitly accesses member variables within the object: print "Megalith Name: $megalith->{name}\n"; This may cause problems if the internal structure of the Megalith object alters in some way. Also, if you write $megalith->{nme} by mistake, no errors or warnings will be generated. Defining an accessor method called getName( ), such as: ### Returns the name of the megalith sub getName { my ( $self ) = @_; return $self->{name}; } makes the code arguably more readable: print "Megalith Name: " .

We have correctly stored the three different records with the same key in the DBM file. The problem lies in the way we've tried to read these records back out of the DBM file. A basic dereference using the hash key obviously doesn't work, since Perl stores only a single value for each key, as we already know. To get around this limitation, we can use the seq( ) method declared within the DB_File module, which is used to traverse chained records stored within a single hash element. 2 illustrates the principle of chained record traversal within a hash element.

Download PDF sample

Rated 4.95 of 5 – based on 9 votes