Over the last few posts, we’ve went over Primary Keys, Foreign Keys, Candidate Keys, and Alternate Keys. Most of y’all are probably thinking – that’s too many keys already! Why do we need even more keys? Well, that’s because we sometimes need different ways to describe what we’ve got going on. Of the four different…… Continue reading Even More Fun with Database Keys
Category: SQLBasics
More Fun with Database Keys
If you’ve been following along with some of our previous blog posts, you’ll know that we’ve discussed some of the more used keys when dealing with databases. Lest you forget, we talked about keys in these two blog posts: Primary Keys – Good and BadForeign Keys – Are they worth it? Now, we can talk…… Continue reading More Fun with Database Keys
Foreign Keys – Are they worth it?
Last time, we learned about Primary Keys and some of the goodness that they give you. If you missed that, remember to go back and read that here. This time, though, we want to focus on the close kin of primary keys – the foreign key. Foreign Keys are truly columns that point to the…… Continue reading Foreign Keys – Are they worth it?
Primary Keys – Good and Bad
When it comes down to primary keys, most of us that have been working with databases for a while have come across a few million different ones. Some work fairly well. Some just don’t work at all and should be banned from ever being used as a primary key again. First, let’s delve into what…… Continue reading Primary Keys – Good and Bad
Windowing Functions Exercises
So, using the Lahman’s baseball database – found here – let’s go thru some practice exercises to try out your new windowing functions skills: Find the first year that each park was played inShow the rank with ties (both ways) of the games started in 1983 for each league for all playersPlace the players into…… Continue reading Windowing Functions Exercises
Processes
Every now and again, you’ll hear someone in IT say the word “process.” What does that really mean? Is it just a “black box” that data is shoved into and, magically, a file is created or a dashboard show you your data? https://youtu.be/kx3sOqW5zj4 Kinda how my “process” works According to Dictionary.com, a process is simply…… Continue reading Processes
Data Loss
In our last post, we quickly mentioned the phrase “data loss”. What does that really mean? Well, according to Wikipedia, data loss is “an error condition … in which information is destroyed by failures or neglect in storage, transmission, or processing.” The important part that I want to talk about there, is the “neglect in… processing.” Sadly,…… Continue reading Data Loss
Try/Catch vs RAISERROR
Now I’m sure after the last post , you’re thinking “Oh, ever-so humble author, why, oh, why, would I pick one of these over the other?” Well, I’m glad you’re checking in today, because that’s exactly what we’re going over! Now, the easiest scenario is if the SQL Server you’re working with is somewhere between…… Continue reading Try/Catch vs RAISERROR
More ways to stop errors
Errors can be the bane of a developer’s existence. They can stop even the best developer’s work. A process that takes several hours can be stopped dead in it’s tracks in the last hour because of a horrible error. Thankfully, last time, we discussed one way to make a stored procedure more aware of errors…… Continue reading More ways to stop errors
Making Stored Procedures Bulletproof
So last time in Stored Procedures – Why we talked briefly about ways of making stored procedures more bulletproof. First off, you have to ask yourself, should we? I mean, the data we work with is a known thing every time, right? Can people just blindly enter data in? Haven’t our apps been built to…… Continue reading Making Stored Procedures Bulletproof