Bulk Loading of Isozyme data using Perl-DBI

From ICISWiki

Jump to: navigation, search

Introduction

Perl Uses a standard database interface (DBI) to interact with different databases. This module can work in almost any type of Database (Access, MySQL,PostgreSQL, etc). Each database has it's own perl database driver (DBD). DBI uses these driver to interact with a specific database.

Database Connection

To connect to a database using DBI, the Data Source must first be specified. The following are sample database connections to MysQL, PostgreSQL and Microsoft Acess.

Connecting to MySQL Database

$Databasehandle = DBI->connect("DBI:mysql:database=icislocal", "username", "password")  

Connecting to PostgreSQL Database

$Databasehandle = DBI->connect("DBI:Pg:database=icislocal", "username", "password")  

Connecting to Microsoft Access Database

$Databasehandle = DBI->connect("DBI:ODBC:icislocal", "username", "password")

Perl-DBI script for Loading the Allele Data

Personal tools