Alzabo::FAQ - Frequently Asked Questions


Alzabo::FAQ - Frequently Asked Questions


How can I generate the SQL to turn one schema into another?

Assuming you have schema objects representing these already created (through reverse engineering for example) and both schemas are for the same RDBMS, you can simply do this:

 my @sql = $schema1->rules->schema_diff( old => $schema1, new => $schema2 );

The @sql array will contain all the SQL statements necessary to transform the schema in $schema1 into the schema in $schema2.

How can I make Alzabo's RDBMS-OO mapping functionality run faster?

You may choose to set the environment variable NO_VALIDATE to a true value before starting your app. This will turn off parameter validation. This can lead to a 10-20% speedup in my experience. Of course, this may also hide bugs in your application. This is best only used for a well tested application that is being used in production.

If your application does not consist almost exclusively of inserts, updates, or deletes, then it would probably benefit from caching, but only with certain syncing modules. If you are in a single process environment, then use the Alzabo::ObjectCache::Store::Memory and Alzabo::ObjectCache::Sync::Null modules. If you are in a multi-process environment, use the Alzabo::ObjectCache::Store::Memory and Alzabo::ObjectCache::Sync::BerkeleyDB modules. If installing a newer version of the Berkeley DB library is too much of a hassle, use the Alzabo::ObjectCache::Sync::SDBM_File module.

As a corollary, both the Alzabo::ObjectCache::Sync::DB_File and Alzabo::ObjectCache::Sync::IPC will actually slow down your application, even though they are using caching. The only reason to use them is if you need the additional cross-process data integrity provided by the syncing mechanism. If you need this, using either the Alzabo::ObjectCache::Sync::BerkeleyDB or Alzabo::ObjectCache::Sync::SDBM_File module is strongly reocmmended.

How can I make a local copy of the documentation as HTML?

Alzabo comes with a script called It takes three arguments. The first is the source file directory root. The second is the target directory. The last is the absolute URL path that this target directory represents. If you have perl 5.6.0 or greated installed, it is recommended that you use it to run this script as the Pod::Html module included with more recent Perls does a much better job of making HTML.

If you were in the root of the source directory you might run this as:

 perl ./ ./lib /usr/local/apache/htdocs/Alzabo_docs /Alzabo_docs

The script will create an index.html file as well as turning the documentation into HTML.

Does Alzabo support large objects with Postgres?

No, it does not. The large object system in Postgres is a godawful piece of crap. Fortunately, you can now upgrade to Postgres 7.1 and your rows can be as big as you want.

 Alzabo::FAQ - Frequently Asked Questions