Help - Search - Members - Calendar
Full Version: Mysql Views And Functions
Zymic Webmaster Forums > Zymic Free Web Hosting > Databases & MySQL
leegaz
I designed my mysql database with views and stored functions (CREATE VIEW... and CREATE FUNCTION...) and the database works perfectly in my local environment using php. But I get errors in my import script when I import it to my database on zymic. The errors refer to permissions for the mysql Functions I created. How can I change the permissions to allow mysql stored functions and views?
Jacob
Unfortunately, they are disabled. Unless you have a really good reason for using them, they will not work because we have it disabled.
leegaz
QUOTE(NaRzY @ Dec 12 2009, 02:23 AM) *
Unfortunately, they are disabled. Unless you have a really good reason for using them, they will not work because we have it disabled.


The reason for using them is that (1) it makes the code much more efficient and (2) improves the response seen by the user (read: more enjoyable browsing expeience). With version 5 released in 2005, mysql finally joined the ranks of high-level, professional databases (such as Oracle) by adding views, stored procedures and stored functions. (I'm not saying that mysql is as good as Oracle, I'm saying that it now has most of the key features of professional databases which for a free, open source database is saying a lot.) Views present little or no additional load on the server, no security issues, and in return make the code much more efficient. There's absolutely no reason why Views should not be enabled and available to database/web designers. Store procedures and stored functions do add some load to the server but that's the whole point: let the server do the work (servers are more powerful than the user's computer). Security is also not an issue; in fact, using functions and procedures provide various protections to the database against external corruption.

So I guess I don't understand why you'd have them disabled, when there are so many advantages to database/web designers (read: more customers/accounts at zymic.com) and few disadvantages to web hosts (except of course that the servers may not be robust enough to handle them).

No, I'm not in any way affiliated with mysql or any database company. I'm just trying to put up a web site for my hobby that uses efficient database code. Looks like I have two choices: rewrite the code to avoid mysql views and functions (and significantly slow the response seen by the user), or move to a paid web host that offers this functionality.
Ed
Views is already an allowed privilege, functions / sub routines are something we need to discuss as it some what obscures what's is really being executed and does introduce overhead not normally present within a standard query.

If you drop by live chat, we can discuss this further.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.