Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

new module pl2sql

by tqisjim (Beadle)
on Sep 19, 2012 at 03:31 UTC ( #994401=perlquestion: print w/replies, xml ) Need Help??
tqisjim has asked for the wisdom of the Perl Monks concerning the following question:

Hello, I recently completed a module that I've been noodling over for several years: A very simple interface for marshalling Perl objects (eg Storable::store) into a relational database such as mysql. I'm actually quite enthusiastic about the results.

The idea seems pretty obvious to me, and I have a nagging feeling that there's a good reason why a module like this isn't commonly used. On the other hand, if it is a good idea, I could use some help getting this module ready for prime time.

The information on the website is pretty complete and includes source code. I would appreciate if people took a look.


Replies are listed 'Best First'.
Re: new module pl2sql
by Corion (Pope) on Sep 19, 2012 at 07:34 UTC

    I briefly looked at the linked documentation, and couldn't find a section on how it compares to Class::DBI, DBIx::Class and other Object-Relational Mappers. If your module is not an ORM, maybe it is something more along the lines of a Triplestore (RDF::Trine)? I didn't find any explanation, but I only looked for a short time.

    PS: The site is unreadable with Javascript disabled.

      I would describe pl2sql as an ORM, as the name implies. However, I would describe Class::DBI and the others as an ROM, since it maps database functions (normally implemented in SQL) to class methods. Hence, Class::DBI defines numerous methods to correspond to their database equivalents. For nomenclature, this ORM designation seems somewhat Orwellian- its name has an opposite meaning. In fact, a Class::DBI object is exactly an RDB table represented as a Perl object.

      PL2SQL takes the opposite approach. It provides automatic persistence (in an RDB table) of any arbitrary complex object. PL2SQL has two methods: The first assigns the object to a designated table via a unique ID. The second retrieves the object. It also uses a "Universal table definition" which provides reusability. Finally, a single table can be applied to numerous object types, instead of the one-to-one correspondence required of Class::DBI.

      In fact, the "Universal table definition" is based on an XML representation of an arbitrary object. I lack the expertise to precisely place this module in the Universal jingo taxonomy, but based on Wikipedia, I would describe it as an XML-enabled XML database.

      I took the liberty of posting your response on my website and my response there is structured a little differently. You should have better luck reading the description, but you'll need to enable javascript in order to read the comments. That feature is uses AJAX.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://994401]
Approved by Jim
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2018-06-22 23:27 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (124 votes). Check out past polls.