Are using views in sql no longer necessary?
I just got floored by a command from my manager, saying that in our newest version of our coldfusion 8 powered site, we would not be using any views.
He believes that what our contractor said with Coldfusion 8, that the performance benefit is minimal, and that it is very inconvenient to have to lookup the code for a view.
We do have a development server, with coldfusion, iis, and sql server 2005 on it, but the other programmer and my manager either refuse to use it or don't care. I don't think they really understand the importance of a dev server and source control but that's not my main question.
We do have a lot of custom reports, and having worked only a year here, and only part-time, it has been very hard to get a handle on their database, so using views for reporting in our new version would make it much easier to grab certain sets of data, rather than have all the complex joins in the coldfusion code.
I will respect his wishes, of course, I am just totally floored by the lack of evidence backing up this decision.
On our production server we have Coldfusion 8 Standard, IIS7, SQL Server 2008.
I can understand the ease of seeing all the sql, but I use ssms every day, looking at tables, views and stored procedures, so I don't claim to be an expert, but I am reasonably familiar with sql server.
And I guess that's what I really expect from them, to have some solid reasons for not using views.
Am I being irrational?
I don't want to get into arguments, that's pointless, but it's so hard when they don't even have a开发者_如何学运维 solid development life cycle, or use source control.
I don't want to be the anal sob, being rude or making them feel uncomfortable, but I just dont' get it why they aren't adopting to what I consider basic must have, in any kind of solid web programming company or department.
Sorry for long post, just this bothers me, I want to make sure this decision makes sense for performance reasons, or maybe I just have too few clout to ever make them see why this decision is wrong, and i will have to accept it.
But is there any clear provable evidence, that we don't need to use views with coldfusion/sql server anymore?
I think the short of it is NO.
Views arent dead, they havent even staggered yet, instead I think it has a lot more uses than most think.
In a situation like this, I would rather have an informative discussion with the others. Preprare yourself, get some documentation, and put together a little presentation. Show the pros and cons of your ways, and be open to discussion. But always remember, as the Client is always right, so the Manager/Boss thinks they are...
Views are a SQL construct that have their place. I prefer stored procs usually but do use views when they are the ideal for the task in hand.
Views, used properly, have no performance overhead.
I wonder why noone mentioned this, but one of the huge benefits is their ability to restrict access to underlying tables. You can deny direct access to tables, create views as you see fit (restricting columns/rows) and grant privileges as your app/project dictates. There is never enough protection. And as others said, with no performance degradation whatsoever.
Short answer: You never needed to use views. Some people feel views are akin to database triggers, and that a database should be treated as simply a stack of data, not its own specialized data processing system.
Performance impact? There should be done.
Who is right? Either/neither. Its just a different philosophy. I see no reason to abandon views.
I love using Views - particularly for data that crosses more than one database. It provides a way to pull such data into a single data construct and obscure the somewhat verbose query. However, they have to be used judiciously and carefully to avoid performance bottlenecks. There's not usually a gain in performance.
Still - to exclude them out of hand seems unduly draconian. They have their place. In the end it is probably not a battle worth fighting. To borrow from Kung Fu Panda - "view, don't view..... noodle, don't noodle..."
that the performance benefit is minimal
So basically he thought before that there is a significant performance benefit. And noone ever told him to read the manual.
Views NEVER (!) had a performnce benefit. They always have been about easy of use. Like code snippets. MATERIALIZED views are another thing, but they are pretty new and not what was meant here.
Views always were about maing SQL programming easier. They always got evaluated at runtime.
So, basically, you have a notcompetent manager with delusions and not someone cracked them and he overreacts by not seeing the advantages.
精彩评论