Usually, when I wrote SQL queries, they were pretty simple, very small scripts that would run for specific situations.
A long time ago, I tried to write a database application utilizing MySQL but that failed :( Mostly due my inability to configure MySQL at the time. I was eventually forced to use Access for that application.
I'm now trying again, this time with Perl. And I've got the MySQL server running quite nicely :)
The question I have at hand is what is the practice of seperating the MySQL statements from the Perl script itself. I remember, from an early SQL class that there is the practice of seperating such a program into three modules. DB Backend, UI Frontend, and... er... glue(?). Change the backend, and the frontend stays the same. And vice versa.
Searching around the web, I don't find very many examples of this practice, if any at all. Are there any examples showing the seperation between the three modules in a practical example
The book I have from the SQL class discusses it on an accademic level, which is rather useless. I understand where you draw the line. What I don't understand is the fine working details. For example. I have Table A. Do I create multiple functions to extract only the necessary information I want from Table A. Or is it easier to create one Universal function to pull the table rows, and use the, "glue," to extract the elements I want and take a performance hit?
Thanks for your patience.
In reply to Mixing Mysql and Perl by SavannahLion
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |