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: 141
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

C Programming Notes for Professionals

Haskell Tutorial for C Programmers

Java-Based Real-Time Programming

Principles of Programming Languages

Programming from the Ground Up: An Introduction to Programming using Linux Assembly Language

Others related eBooks about Defensive Database Programming with SQL Server

Learning C#

Download a complete tutorial on C # entitled "Learn C #", PDF document on 1027 pages created by StackOverFlow....

Microservices Best Practices for Java

Download free course Microservices Best Practices for Java, pdf file on 134 pages by Michael Hofmann, Erin Schnabel, Katherine Stanley....

Programming Fundamentals

This programming fundamentals tutorial in PDF format covers the key concepts and principles that are essential for anyone looking to become a proficient coder. The tutorial begins with an introduction to programming, explaining the basic concepts and terminologies that underlie all programming langu...

Essential Java

This book written to provide clear and concise explanation of topics for programmers both starting to learn the Java programming language as well as those diving in more complex topics. Most examples are linked to online playground that allows you to change the code and re-run it....

Python Datetime free PDF

Download free course Python Datetime free PDF, pdf file on 3 pages by tutorialkart.com....

Android Application Development for the Intel Platform

The number of Android devices running on Intel processors has increased since Intel and Google announced, in late 2011, that they would be working together to optimize future versions of Android for Intel Atom processors. Today, Intel processors can be found in Android smartphones and tablets made b...

Assembly language tutorial in PDF

Download free Assembly language tutorial course in PDF, training file in 6 chapters and 29 pages. Free unaffiliated ebook created from Stack OverFlow contributor....

PC Assembly Language

This book has extensive coverage of interfacing assembly and C code and so might be of int..., download free Assembly tutorial in PDF (190 pages) created by Paul Carter ....

Introduction to JPA

Download free Introduction to JPA for Beginners, course tutorial, a PDF file created by Bruce Campbell....

Network Programming with Go

Dive into key topics in network architecture and Go, such as data serialization, application level protocols, character sets and encodings. This book covers network architecture and gives an overview of the Go language as a primer, covering the latest Go release....