You are here: Re: ORDER BY in VIEW not working « MsSQL Server « IT news, forums, messages
Re: ORDER BY in VIEW not working

Posted by Tony Rogerson on 02/02/06 10:47

Put embedded SQL into an application is dangerous, if the user has access,
word or any other modern day application they can connect to the database
and start writing their own queries!

It is a best practice to use stored procedures for access control, you can
permission on the stored procedure and do not need to give lower level
permissions to the views or base tabls, doing so increases your security
periminter that needs defending.

SQL Server has Indexed Views which I believe are better than the Oracle
materialised because once set up they are dynamically maintained so are
always up-to-date; before responding celko - make sure you read the product
spec aka books online.

--
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials


"--CELKO--" <jcelko212@earthlink.net> wrote in message
news:1138835222.845811.6020@g44g2000cwa.googlegroups.com...
>>> When do you prefer a VIEW? <<
>
> 1) For access control. A particular development team sees the schema
> thru VIEWs that make it look as if the database was built just for
> their project. This can mean some WITH CHECK OPTION clauses and
> INSTEAD OF triggers.
>
> 2) When the same query is used by multiple users at the same time. For
> example, Oracle will mateiralize and share a VIEW, so everyone can use
> the same "end of the month" summary results without re-computing them
> over and over.
>
> 3) When the same query is used in multiple places in a single query.
> Now that we have CTEs, this does not apply anymore.
>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация