<?xml version="1.0" encoding="windows-1252"?>
<node id="183012" title="How to structure applications using a RDBMS" created="2002-07-18 15:47:07" updated="2005-07-03 14:01:48">
<type id="115">
perlquestion</type>
<author id="85580">
dragonchild</author>
<data>
<field name="doctext">
&lt;i&gt;(This is more of a general design question vs. a specifically Perl question.)&lt;/i&gt;
&lt;p&gt;I'm trying to work on decoupling the application I'm working on from its database. The goals here are:
&lt;ul&gt;
&lt;li&gt;Minimize the impact of schema changes on the business logic as well as the control structure
&lt;li&gt;Bring together all SQL so that the business and controller logic aren't dealing with the underlying implementation of how the data is stored.
&lt;/ul&gt;
&lt;p&gt;My problems are thus:
&lt;ol&gt;
&lt;li&gt;I know that I want to bring all the SQL together, so having every SQL call wrapped in a function is easy enough.
&lt;li&gt;But, I know I'll end up with a ton of individual SQL_ functions with very little way to navigate through them.
&lt;li&gt;At first glance, every single SQL call will be in some SQL_ wrapper, even if there's a minor change (such as sorting and the like)
&lt;/ol&gt;
&lt;p&gt;Have people worked out some idea of data structures to pass back and forth? I'm not so worried about memory or CPU as I am in cohesion and coupling.
&lt;p&gt;------&lt;br&gt;&lt;i&gt;We are the carpenters and bricklayers of the Information Age.&lt;/i&gt;&lt;p&gt;Don't go borrowing trouble. For programmers, this means &lt;i&gt;Worry only about what you need to implement.&lt;/i&gt;</field>
</data>
</node>
