Defensive Database Programming with SQL Server



Download free course Defensive Database Programming with SQL Server, pdf file on 389 pages by Alex Kuznetsov.
Resilient T-SQL code is code that is designed to last, and to be safely reused by others. The goal of defensive database programming, the goal of this book, is to help you to produce resilient T-SQL code that robustly and gracefully handles cases of unintended use, and is resilient to common changes to the database environment.

Too often as developers, we stop work as soon as our code passes a few basic tests to confirm that it produces the 'right result' in a given use case. We do not stop to consider what other possible ways in which the code might be used in the future, or how our code will respond to common changes to the database environment, such as a change in the database language setting, or a change to the nullability of a table column, and so on.

In the short-term, this approach is attractive; we get things done faster. However, if our code is designed to be used for more than just a few months, then it is very likely that such changes can and will occur, and the inevitable result is broken code or, even worse, code that silently starts to behave differently, or produce different results. When this happens, the integrity of our data is threatened, as is the validity of the reports on which critical business decisions are often based. At this point, months or years later, and long after the original developer has left, begins the painstaking process of troubleshooting and fixing the problem.

Would it not be easier to prevent all this troubleshooting from happening? Would it not be better to spend a little more time and effort during original development, to save considerably more time on troubleshooting, bug fixing, retesting, and redeploying?

This is what defensive programming is all about: we learn what can go wrong with our code, and we proactively apply this knowledge during development. This book is filled with practical, realistic examples of the sorts of problems that beset database programs, including:
- Changes in database objects, such as tables, constraints, columns, and stored procedures
- Changes to concurrency and isolation levels
- Upgrades to new versions of SQL Server
- Changes in requirements
- Code reuse
- Problems causing loss of data integrity
- Problems with error handling in T-SQL

In each case, it demonstrates approaches that will help you understand and enforce (or eliminate) the assumptions on which your solution is based, and to improve its robustness. Ultimately, the book teaches you how to think and develop defensively, and how to proactively identify and eliminate potential vulnerabilities in T-SQL code.

Table of contents

  • Basic Defensive Database Programming Techniques
  • Code Vulnerabilities Due to SQL Server Misconceptions
  • Surviving Changes to Database Objects
  • When Upgrading Breaks Code
  • Reusing T-SQL Code
  • Common Problems with Data Integrity
  • Advanced Use of Constraints
  • Defensive Error Handling
  • Concurrent Queries and Transaction Isolation Levels
  • Developing Modifications that Survive Concurrency
Pages : 389
Size : 8.6 MB
File type : PDF
Downloads: 151
Created: 2022-02-02
License: For personal or educational use
Author(s): Alex Kuznetsov
Defensive Database Programming with SQL Server

Warning: Trying to access array offset on false in /home/tutovnfz/public_html/article.php on line 233

Others programming Tutorials

Programming Computer Vision with Python

An Introduction to C & GUI Programming

Introduction to Programming with Fortran

Programming for Computations - Python

Is Parallel Programming Hard, And, If So, What Can You Do About It?

Others related eBooks about Defensive Database Programming with SQL Server

Problem Solving with Algorithms and Data Structures

Download free course Problem Solving with Algorithms and Data Structures, pdf file on 240 pages by Brad Miller, David Ranum....

Getting started with React

This tutorial teaches you how to program with React, a complete PDF document on 139 pages created by StackOverFlow. This course aims to give a solid foundation to React.js by exploring all of its concepts and possibilities, to then facilitate the exploration of the vast ecosystem that revolves arou...

Android Concepts and Programming

Download Android tutorial in PDF ,free training course document under 40 pages By Kartik Sankaran....

Cobol programmer's guide

Download a complet PDF tutorial about Cobol for programmers ,it shows you how to develop COBOL programs that use the database languages SQL and PL/SQL....

Hands-on Python Tutorial

Python is a widely used general-purpose, high-level programming language. Its design philosophy emphasizes code readability, and its syntax allows programmers to express concepts in fewer lines of code than would be possible in languages such as C. The language provides constructs intended to enable...

Julia language tutorial

Download free Julia tutorial course in PDF, training file in 37 chapters and 187 pages. Free unaffiliated ebook created from Stack OverFlow contributor....

GANs in Action: Deep Learning with Generative Adversarial Networks

Generative Adversarial Networks (GANs) are an incredible AI technology capable of creating images, sound, and videos that are indistinguishable from the real thing. By pitting two neural networks against each other, one to generate fakes and one to spot them, GANs rapidly learn to produce photo-real...

C++ Programming Language

This PDF course explains the features, technical details and syntaxes of the C++ programming language. To be a proficient programmer, you need to master two things: the syntax of the programming language, and the core libraries (i.e., API) associated with the language....

VB.NET a complet tutorial for beginners

The purpose of this course is to provide a basic guide for student or people interested in Visual Basic dot net programming,it's a free training document for beginners....

Ruby on Rails Notes for Professionals

Download free course Ruby on Rails Notes for Professionals, pdf file on 230 pages by Stack Overflow Community....