DBI is a software that allows Perl objects to be stored persistently in an RDBMS. This enables quick retrieval and manipulation of Perl objects at any time. The software has many utility functions and features such as caching, indexing and efficient querying.
To use ObjectDBI, you must create a table for storage. The SQL code for creating the table is provided, and it works for PostgreSQL or Oracle. However, your particular type of RDBMS may vary with respect to this SQL code, and you may not have primary or foreign keys. You may not have indexes or sequences, and you may even have an easier way to store infinite strings.
ObjectDBI allows for flexibility based on your cleverness and needs. For instance, if you plan to store perlhashes with keys of more than 255 character length, you can make 'obj_name' a bit longer. If you plan to store values with characters outside of the 32-126 range, and you're using Postgres, then you might want to change the data type of 'obj_value' from 'varchar' to 'bytea'.
Using ObjectDBI with MySQL can be tricky because you'll have problems without a sequence. However, a special piece of code is added to withdraw the id of an object after the fact of its insertion. If your RDBMS doesn't do sequences OR auto-incrementing, then IDs are generated out of thin air. Be prepared to work with large numbers, though, and provide a 'sequencefnc' to the constructor.
In summary, ObjectDBI is an excellent software solution for those looking to use RDBMS-es as Perl object storage, even with very primitive RDBMS-es. The module helps make things easy with flexible configurations, allowing users to tailor their storage needs to their preferences. However, users should note that there may be some variations in the SQL code depending on your RDBMS.
Version 0.12: N/A