Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Terminology: Is DBIx::Class an ORM?

by haj (Vicar)
on Jun 02, 2021 at 17:00 UTC ( [id://11133433]=note: print w/replies, xml ) Need Help??


in reply to Re: Terminology: Is DBIx::Class an ORM?
in thread Terminology: Is DBIx::Class an ORM?

I've always thought that since DBIx::Class Maps an Object-oritented data structure to a Relational database, it's an ORM :-)

Uh-oh... I always found it easy to map an existing relational database to DBIx::Class objects using the DBIx::Class::Schema::Loader and, also often cumbersome to map my object structures to a RDBMS if it wasn't designed for a relational database in the first place.

Replies are listed 'Best First'.
Re^3: Terminology: Is DBIx::Class an ORM?
by haukex (Archbishop) on Jun 02, 2021 at 17:20 UTC
    often cumbersome to map my object structures to a RDBMS if it wasn't designed for a relational database in the first place

    Yes, I probably should have been more clear on this: The optimal situation is of course desinging both the DB and the OO system at the same time. If one or the other already exist, it can indeed be problematic: When adding an ORM layer to an existing database, the issue is often that not all code accessing the database is going to be replaced at once, so for example a common situation is someone deciding to implement some validation logic in the OO system, which is bypassed by all the other legacy code going directly to the DB - some will argue that the logic belongs in the DB instead, others will argue that the legacy code will get replaced anyway. On the other hand, I can imagine the situation you mention (having an existing OO API that now needs to be mapped to a DB) might be tricky as well, though I personally haven't been in this situation so I'm having trouble imagining how it might occur - perhaps if the objects were previously serialized in some other way...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11133433]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (6)
As of 2024-03-28 21:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found