Why are MySQL Routines and Views not used with PHP?

Why are MySQL Routines and Views not used with PHP?

I've been looking at a number of web sites, frameworks, and scripts written in PHP and noticed NONE of them make use of MySQL Views or Routines. Alarmingly very very few even use indices. I'm wondering if anyone else has noticed this and can shed some light on this phenomenon. To me it seems that with PHP there has been a great deal of dumbing down when it comes to "proper" database usage.

View Answers

November 14, 2013 at 4:25 PM

Hi,

View is stored as just a simple SQL in the database. When user calls a view from the program it reads the sql of the view and then executes the query. So, there is no performance gain in the application. It is similar to executing the query from your program.

If you use the view then you may have to write extra code and logic to pass the parameters to the view.

So, its better to just use SQL and execute from your program itself.

Thanks


November 28, 2013 at 3:01 AM

Thank you for your thoughts, I agree in using views it's more of a do what makes sense for your application. Personally I prefer them for reporting more then anything else.

Have you any input on why indices and routines aren't used?









Related Tutorials/Questions & Answers:
Why are MySQL Routines and Views not used with PHP?
What is the difference between PHP4 and PHP5?
Advertisements
why get method is used?
Why bufferedreader is used in java?
Why hibernate is used?
Why XML?, Why XML is used for?
Why C++ is not used in machine learning?
why php and mysql - PHP
ModuleNotFoundError: No module named 'phpy'
New features in PHP5?
ModuleNotFoundError: No module named 'routines'
ModuleNotFoundError: No module named 'csound-routines'
ModuleNotFoundError: No module named 'csound-routines'
ModuleNotFoundError: No module named 'print-fortran-routines'
Why NSMutableDictionary
Why request.getParameter(
Creating Views
Why spring?
Import MYSQL file in PHP - PHP
ModuleNotFoundError: No module named 'views'
ModuleNotFoundError: No module named 'views'
MySQL Not Records
Mysql Check
Mysql As
why this can't
Why Objective C?
Mysql Insert
MySQL
What is MySQL
Mysql PHP Select
Mysql Last
Why this is not working...?
MySQL Alter Tutorial, Database MySQL MySQL Crash Tutorial Tutorial
why jre in jdk
Mysql Decimal Datatype
Version of com.alexvasilkov>gesture-views dependency
Version of com.androidhuman>fixedratio-views dependency
Why application server is important?
ModuleNotFoundError: No module named 'ajax-views'
ModuleNotFoundError: No module named 'paqmind.flask-views'
ModuleNotFoundError: No module named 'pyramid-views'
ModuleNotFoundError: No module named 'shinkenplugins.plugins.drupal_views'
ModuleNotFoundError: No module named 'sqlalchemy-views'
ModuleNotFoundError: No module named 'sqla-views'
ModuleNotFoundError: No module named 'ajax-views'
ModuleNotFoundError: No module named 'canonicalwebteam.django-views'
ModuleNotFoundError: No module named 'django-views'
ModuleNotFoundError: No module named 'Flask-Views'
PHP MySQL Introduction
Mysql Alter Table Syntax

Ads