[sf-perl] Going from XML to SQL

Chris Mungall cjm at fruitfly.org
Thu Mar 24 07:43:16 PST 2005


Hi Joseph

I'm the author of this, and as it happens I'm an occasional lurker on
sfpm. Glad you found the module interesting. It is being actively used in
a number of bioinformatics projects at the moment.

Yes, lots of people find the stag concept a bit funny, I'm emphasising
that less these days, the module can be used as a general SQL<->XML
mapping tools.

The whole module is here:
http://search.cpan.org/~cmungall/DBIx-DBStag/

I haven't made it out to an sfpug event yet but I'm always happy to chat
about SQLy-XMLy-perly stuff.

Cheers
Chris

On Wed, 23 Mar 2005, Joseph Brenner wrote:

>
> Before the last meeting, Rich Morin and Josh Berkus were talking
> about the issues involved with translating data structures
> between XML to SQL. I just came across something on CPAN that
> looks relevent, DBIx::DBStag::Cookbook:
>
>     http://search.cpan.org/~cmungall/DBIx-DBStag-0.06/DBIx/DBStag/Cookbook.pm
>
>     This will give an outline of how to build a normalised
>     relational database from XML source data, set up SQL
>     templates, issue relational queries that return hierarchical
>     results (as XML or as perl objects), and autogenerate a web
>     query front end for this data.
>
>     Why would you want to do this? Well, it gives you the full
>     power of the relational model and SQL, combined with the
>     convenience of representations which allow for the nesting of
>     data entities (SQL query results are typically flat relations
>     which are inconvenient for complex hierarchical data).
>
> The "Stag" concept is funny... a generalization of XML and sexps:
>
>    http://stag.sourceforge.net/
>
>    Data::Stag
>
>    This perl module is for querying and manipulating complex data
>    as recursively nested tag/value pairs (Structured tags or
>    Simple Tree aggreggates). Procedural and object-oriented modes
>    are supported. Tags can be accessed by autogenerated accessor
>    methods.
>
>    XML is a hierarchical data format, so this module can be used
>    as an XML parser/writer. Other hierarchical formats are
>    supported, including lisp S-Expressions (i.e. SXML) and
>    indented-text.
>
> _______________________________________________
> SanFrancisco-pm mailing list
> SanFrancisco-pm at pm.org
> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm
>


More information about the SanFrancisco-pm mailing list