|
ALEX::DB
========
This is an database abstraction layer for an integrated library
automation system.
Currently PostgreSQL is used as the back-end database,
but the module should be (fairly) easily extensible to
any database supported by DBI.
PRE-INSTALLATION
To properly test the module, you will need to create a
database called "calli_test", to which you have admin rights.
If this database is missing, most of the tests (like adding,
updating, deleting records) will be skipped.
You may safely remove this database after 'make test' finishes.
INSTALLATION
To install this module type the following:
perl Makefile.PL
make
make test
make install
DEPENDENCIES
This module requires these other modules and libraries:
MARC::Record
MARC::Descriptions
Test::More
This module also assumes that you have administrator access
to your database system.
TESTING SCHEME
The testing scheme might use a little clarification....
There will (eventually) be an large number of components to
this system (like ALEX::DB, ALEX::OPAC, ALEX::EDIT, ALEX::CIRC,
etc).
Each component may have multiple implementations (like
ALEX::DB::PostgreSQL, ALEX::DB::MySQL, etc).
Each component implementation may have multiple functional areas
(like ALEX::DB::PostgreSQL::Records, ALEX::DB::PostgreSQL::Patrons,
etc).
All of which must be tested. That's a lot of tests!
To keep some level of sanity, the tests are broken down into
one test file per component-implementation functional-area (e.g.
01-db-01-pg-01-record.t, 01-db-01-pg-02-patron.t, etc),
and then one test file per component implementation (e.g.
01-db-01-pg-99.t, 01-db-02-mysql-99.t, etc), and finally
one test file per component (e.g. 01-db.t, 02-opac.t, etc)
This numbering/naming scheme ensures that subcomponents are tested
before the component they belong to, and also makes it easy to
see which test tests what.
So, for example, you can tell at a glance that:
t/01-db-01-pg-01-record.t tests the record-handling functions
of the PostgreSQL implementation of
the Database layer.
and
t/01-db-99.t tests *all* of the database layer
(including all implementations that
are available, and all of the
functional areas that make up those
implementations).
The numbers in the test names exist only to ensure the order of
testing, which is based on the sort order of the file names.
DEFINITIONS
workfile - a separate, duplicate set of DB record and index
tables that operate exactly like the main DB record
and index tables, except that individual records can
be flagged as belonging to an 'owner'. This is
intended to allow cataloguing by multiple cataloguers
each in their own sandbox without affecting the
main data or each other.
COPYRIGHT AND LICENSE
Copyright (C) 2004 by David A. Christensen
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
|