mysql - Is putting logic in SQLprocedures/functions (as opposed to PHP/Perl) acceptable? -


I am projecting a university related database in which I was asked to design a database (Specifications clearly ask me to throw at least some SQL processes and trigger it in it) and remain a small web interface on it.

If it matters, then I'm a car rental modeling and I am using MySQL and PHP.

It is important to keep in mind that the complete point of the project is definitely the database it is a database project , the period

Now, I'm thinking: Should I argue as much as possible in SQL processes / tasks or not? Since this is very an database project and I'm already putting some arguments due to the requirements, my answer is "yes" because it decoupling (very Hypotetically, if a person decides to write, such as the desktop or the Android frontend, there will be very few possibilities of different behavior between client applications, so it looks like a good design for me).

But whoever is catching me is that I have never seen anyone with that IRL , I have always seen people write arguments in C / PHP, so I Wondering: Is Acceptable Use of SQL Processes for Business Logic ? Is this a good practice?

As an example: Do I call a SQL process called a record octaar (...) as a RITUURACCR or PHP function, alias marked its status as "rental" Doing, adding a timestamp, removing its collaboration with the garage in which it was parked etc? Or consider COMPUTE_TOTAL_COST versus computeTotalCost (), which charges the final value to the customer.

Thank you all!

ORMs and fancy stuff are not explicitly allowed , I is to plain PHP.

PPS: This question looks suspicious, but I think that I am working under very different obstacles:

But whoever is holding me is that I have never seen it while doing IRL, I have always seen people write arguments in C / PHP , So I wonder: Is the use of SQL processes acceptable for business logic? Is this a good practice?

Anything that should be applied to all clients, regardless of language, there is a possibility for databases include all command line and GUI interfaces in all clients Who ship with your DBMS.

The last Fortune 100 database on which I used to work has hundreds of applications that reach at least two dozen languages. I think the oldest applications were released for the first time in the 1970s.


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -