DBIx::DataModel
Classes and UML-style associations on top of DBI (just an appetizer...)
laurent.dami@justice.ge.ch
DBIx::DataModel Classes and UML-style associations on top of DBI - - PowerPoint PPT Presentation
DBIx::DataModel Classes and UML-style associations on top of DBI (just an appetizer...) laurent.dami@justice.ge.ch LD, PJ-GE, july 2006 2 Agenda Introduction ORMs Design issues Unified Modelling Language (UML) Tables
laurent.dami@justice.ge.ch
LD, PJ-GE, july 2006 2
Introduction
Unified Modelling Language (UML) Tables
Associations
LD, PJ-GE, july 2006 4
LD, PJ-GE, july 2006 5
Not intending to start any sort of rancorous discussion, but I was wondering whether someone could illuminate me a little? I'm comfortable with SQL, and with DBI. I write basic SQL that runs just fine on all databases, or more complex SQL when I want to target a single database (ususally postgresql). What value does an ORM add for a user like me?
LD, PJ-GE, july 2006 6
navigation between tables data conversions generate complex SQL queries from Perl
expansion of tree data structures coded in
transaction encapsulation data validation auto-filling some columns at update
LD, PJ-GE, july 2006 7
LD, PJ-GE, july 2006 8
LD, PJ-GE, july 2006 10
LD, PJ-GE, july 2006 11
LD, PJ-GE, july 2006 12
author_id author_name e_mail
distrib_id module_id
distrib_id distrib_name d_release
module_id module_name
LD, PJ-GE, july 2006 14
LD, PJ-GE, july 2006 15
LD, PJ-GE, july 2006 16
LD, PJ-GE, july 2006 17
LD, PJ-GE, july 2006 18
LD, PJ-GE, july 2006 19
LD, PJ-GE, july 2006 20
LD, PJ-GE, july 2006 22
LD, PJ-GE, july 2006 23
will generate LEFT OUTER JOINS
creates method Distrib::author which returns a single object creates method Author::distribs which returns an arrayref creates method Author::insert_into_distribs
LD, PJ-GE, july 2006 24
LD, PJ-GE, july 2006 25
LD, PJ-GE, july 2006 26
LD, PJ-GE, july 2006 27
LD, PJ-GE, july 2006 28
updates and transactions tree expansions and exports (XML, Json) column handlers for
adding ad hoc methods criteria combinations : preselectWhere Views ...