MySQL Forums
Forum List  »  Views

VIEW scope or context
Posted by: Bernard Alvarenga
Date: June 02, 2013 02:44PM

This may sound like a silly question. I am relatively new to php/mysql and I am building a somewhat complex site, which I probably shouldn't, but that's another issue.
I am heavily using VIEWs. Some of them are created and destroyed within a php page, some of them last a bit longer, while, for instance, filters are applied to the originally visited page. Such filters make use of another php page, through ajax, that uses the original VIEW to apply the filters on. So, the VIEW has a somewhat extended life. It actually lingers in the data bank until the next user comes and changes it.

It works just fine in the context of a single person visiting the website. But then it dawned on me that in the real world and, hopefully, with lots of people visiting the website, it will certainly happen that many people will visit one specific page and create the same VIEW at the same time.

I certainly hope that the gurus at MySQL have anticipated that and made it so that a VIEW is specific to the context of a session created by one user, ie, even though several VIEWs with the same name may be created and exist and one point in time, each visitor/session has his/hers 'own' VIEW that does not get mixed up with all the other users. Otherwise, I am in deep trouble...

So, the issue in the end is: are VIEWs the correct tool for organizing information from several tables in the data bank and showing it to the user in a dynamic way and is the issue I raised before a real one and if so, how to solve it.

Thanks for any assistance.

Options: ReplyQuote

Written By
VIEW scope or context
June 02, 2013 02:44PM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.