From the course: Complete Guide to Advanced SQL Server
Program databases with SQL Server - SQL Server Tutorial
From the course: Complete Guide to Advanced SQL Server
Program databases with SQL Server
The SQL Server Programmability folder contains a number of useful database objects that can automate systems and enforce a database's integrity. In this first section of the Complete Guide to Advanced SQL Server, you're going to learn how to include these objects in your databases design. Early on in the development process of a SQL Server database, it becomes clear that manually typing in commands and sending them to the server one at a time is not going to be a good long-term, sustainable practice. By leveraging programmability, objects and techniques, you can improve the reusability of your code and the consistency of the actions that you want the server to perform. We'll start by learning about view objects, which standardize the way that we look at data across multiple related tables. Next, we'll dive into the programmability folder in Management Studio and take a look at creating custom user-defined functions. Functions can standardize the way that data interactions and manipulations are performed to ensure that everyone across the organization is performing exact same tasks in the exact same way. When it comes time to retrieve or save data to the database, stored procedures will help ensure that those tasks are performed consistently as well. We'll wrap up this section with a look at transactions and error handling. Transactions bundle a number of database read and write operations together so that they can all be rolled back and undone should something unexpected occur during the process. This maintains the consistency of the data across records. You're probably detecting a theme here. Each of these database objects add repeatable structures to the operations that are performed on your valuable data. In their own way, each of these techniques will make the database easier to interact with, reduce the possibility of encountering user errors, and make the processes that you execute more predictable. So let's dive right into Section 1 and explore views, functions, stored procedures, transactions, and more.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.