Last time out we looked at how data can be persisted even with a ROLLBACK being executed. Here we’re going to take that and look at an example of using it in action. We’ll generate some data – which may be good or bad – and try to add it to a table. If there’s any bad data […]
Category: SQL
Last week we started to at the use of constraints to support with data integrity in our databases. As a refresher on our introduction from last time: Data integrity helps give us assurance that our data is accurate, complete, and free from errors or inconsistencies. Some of this comes from making sure that data is correct […]
Data integrity helps give us assurance that our data is accurate, complete, and free from errors or inconsistencies. Some of this comes from making sure that data is correct before it enters are databases, but there are some tools we have in our databases which can help with this too – Constraints! Before we jump […]
Naming Scope in SQL Server
When creating items in SQL Server we aren’t able to create multiple with the same name, for example two tables named dbo.Sales. Similarly we couldn’t create a table and view with the same name. However it isn’t the case that everything we create within a database has to be named uniquely. It can depend on […]
We’ve previously looked at how to implement vertical partitioning and the benefits it can bring within our data. Here I’d like to dive a little further into improving the performance even further with a couple of modifications to our schema. We’ll use the same setup as we had previously to create the table, populate it and partition it. This results in […]
Benefits of Vertical Partitioning
We recently looked at implementing vertical partitioning on a set of data. In an earlier introduction post we also mentioned the benefits which can be seen as a result of the partitioning in both our maintenance and querying of the data. Here we’ll take a look at those benefits with a little more evidence. We’ll be using the data […]
Implementing Vertical Partitioning
We previously looked at an introduction to Vertical Partitioning where we covered what it is and the potential benefits and drawbacks of using it. Here I wanted to build up some data and show how we may vertically partition it to help make it more manageable for us. So that we’ve got some relevant data to use […]
When executing stored procedures it may appear simple enough to infer the data types which are being returned. However if those data types aren’t what you’d expect this could have downstream implications for the apps which are consuming the data. If we want to look at data in a table or view we can use […]
Introduction to Vertical Partitioning
When dealing with large volumes of data in SQL Server we may need to look for strategies to make querying and managing the data easier to handle. A few months back we looked at an approach where we partitioned our data into multiple segments by applying partition functions and schemes to our tables. This helps […]
Changing Identity from INT to BIGINT
When creating tables we may choose to use an INT column with an IDENTITY set as a unique clustering value. On occasions we find out that being able to store 2,147,483,647 records just isn’t enough and we need to change this field to be a BIGINT to let us store… well, a lot more. Here I’ll outline one approach which could […]