Welcome Guest, Not a member yet? Register   Sign In
Does DMZ model represent mysql views like tables?
#1

[eluser]rum1man001[/eluser]
Every model is actually a table behind the scene. What if? I want to work with views instead of a table to get rid of too many queries. Is thr any kinda support dat might com
handy whether in CI or DMZ.

Any suggestions in case of too many queries in CI/DMZ.

For large scale database what should be the benchmark value

Thanks in Advance.
#2

[eluser]BrianDHall[/eluser]
I am not aware of anything in the specification of MySQL views that makes them different to DMZ than a regular table. You could, theoretically, create a DMZ model that pertains to a MySQL View instead of a Table. I'm not really sure its a good idea to build an application in this way, but pick your poison.

So, feel free to give it a try. DMZ nor CI has any special support for Views, as they are very platform specific in behavior and the only thing really different about them is how they are defined at the database administrative level - and CI/DMZ, other than the Database Forge functions provided in CI, doesn't really get into this realm very much.

Thinking more about it, I don't see why you couldn't, but you should be real sure its necessary and you couldn't just as easily (or more easily) utilize an Advanced Get function available in DMZ and get a perfectly good efficient single query.

And you have to be sure it is sufficiently useful that you aren't just creating a database structure to save a few lines of code here and there. You'll be adding a degree of difficulty to maintenance, it may be less clear to others how the program is really working, and there may be caching conflict issues (as PHP and Apache-based caching solutions and query caching through CI/DMZ will not understand that a given View is just a JOIN on other tables, etc).




Theme © iAndrew 2016 - Forum software by © MyBB