Robert Fashion design splendor

Fashion design is a relatively new category, marking the shift from the dominance of French haute couture in the 1950s to new fashion centers in the United States, Europe, and Japan. Youth, street styles, and pop culture have become increasingly central to fashion design.

Popularity: unranked [?]


Lines about basics in databases
comment 1 Comment Written by Robert on May 12, 2008 – 11:17 am

Those who have learned to use JDBC with Java will find Perl’s database components quite familiar. Perl’s DBI module provides a high-level, uniform mechanism for submitting SQL queries to any database system; the API offered by the DBI module is really very similar to that of JDBC. There is a second lower-level DBD component in Perl; the DBD modules are database-specific drivers. These DBD modules accept requests from the higher level DBI component and translate them and submit them to the actual database system. The code that you write, using DBI, is essentially database-independent. If you need to change the database employed, you simply use a different DBD driver module. (The DBD modules correspond to the drivers installed in a Java system.)

There are DBD modules for most database systems. You can get DBD-Adabas, DBDIngres, DBD-Informix, DB-Interbase, DBD-ODBC, DBD-Oracle and so forth. A Unix system will typically have a database installed, and the required DBD module is likely to be in the Perl directories. Linux users may have to install a database likeMySQL and then download and install the appropriate DBD module. Windows users often have Microsoft Access installed – this is quite adequate for simple learning examples; if you have Access, you should download and install the DBD ODBC driver. Of course, Windows users can instead install MySQL and its DBD module. (If you are working with ActivePerl, use its PPM tool to fetch and install the required drivers; these are available at the ActivePerl site.)

Fortunately, the average Perl programmer does not have to bother much about the DBD level. There are only two DBD-related programs that you are ever likely to run; both use DBI calls to find information about the DBD drivers and available databases.

This may list many sources. For example, on a Windows machine you use the Control Panel tool ODBC Data Sources to create an ODBC name for each different Access database (or other ODBC-compatible database) that you have created. The source listing will report the names of all these ODBC entries.

Those DBI statements illustrated use of Perl objects. The DBI module defines a DBI object, storing a reference in the module variable DBI. The DBI-> constructs invoke methods of this object. When working with databases, you typically use just this DBI object, ‘database handle’ objects and ‘statement objects’. In all cases, usage is simple; the method invocation operator is applied to the object and the method name.

Typically, you will know the name of the datasource that your program is to use. This name gets coded as a constant string in your program. You use the datasource name when connecting; a successful connect operation returns a database handle (this is similar to Java’s java.sql.Connection object). You then use the database handle to prepare an SQL statement for execution and run your query. A query returns an ‘object’ that can be used to access each row of a response.

Popularity: 36% [?]

If you enjoyed the article, why not subscribe?

Browse Timeline

Related Post

  1. 1 Trackback(s)

  2. May 12, 2008: Windows » Lines about basics in databases

Post a Comment

About The Author: Robert



Want to subscribe?

 Subscribe in a reader Or, subscribe via email:
Enter your email address:  
Find entries :