.NET news » Database 
Common Table Expressions (CTE) in SQL Server 2005
Products, Customers, Orders, OrderDetails, and so on - but we may need to
run reports on a particular subset of the data or against aggregate data across these tables. Or the reporting queries we need
might need to group or filter by results returned by scalar subqueries. Typically, views are used to break down complex queries into digestible chunks or to provide scalar subquery results that can be grouped and filtered.
Views, however, are sometimes overkill, as they are permanent objects at the system-level. If we only need to reference
this complex query in a single stored procedure or UDF, another option is to use a derived
table. Unfortunately, derived tables muddle the readability of the query and must be repeated for each use in a statement..
SQL Server 2005 Query Notifications Tell .NET 2.0 Apps When Critical Data Changes
Database Concurrency Conflicts in the Real World
A lot of articles have been written about database concurrency conflict detection and the various ways of handling them.Unfortunately most of these articles, and accompanying solutions, have one major flaw in that they focus on the technical issues and database implementation instead of real-world data and how people use the data. In this article, I will try to show the difference between focusing on the database implementation and on the real-world data. I will show some possible approaches on how to solve these concurrency issues.
Dissecting and Putting the Visual Studio 2005 Generated Data Access Layer Into Perspective
Do more with less code is the slogan of Visual Studio 2005.When it comes to reducing the amount of written code, wizards are definitely a viable option. Visual Studio 2005 has a lot of wizardry in it, especially to generate data access code. Any code that gets silently injected in your project follows a strict logic and a well-known design pattern. A full understanding how Visual Studio 2005 does it puts you on the right track to modify and extend the code to build your made-to-measure data access layer. This article dissects the code behind table adapters and binding source components to unveil patterns and best practices.
Making Sense of the XML DataType in SQL Server 2005
System.Transactions and ADO.NET 2.0
Security in the CLR World Inside SQL Server
User Tip: Receiving an Email When Database Data is Changed
For low-volume databases, those that are predominantly read and not written to, or database tables that are designed to not
be updated or only updated under rare circumstances, a DBA or developer may be interested
in being notified whenever the data in a particular table is modified. Or you may have certain records in a table that
are assigned to a particular user and, upon that record being updated, that user should be notified of the change.
While this sort of logic can be implemented at the code level, Microsoft SQL Server has all of the technologies needed to
achieve this aim built directly into it. Triggers
can be used to perform some action when data is inserted, updated, or deleted from a table, and Microsoft SQL Server's
xp_sendmail
extended stored procedure can be invoked to send an email to one or more recipients. Combining triggers with
xp_sendmail provides a means for
alerting specified users via email when the data in a particular table is modified...

