Videos uploaded by user “Database by Doug”
SQL Server Management Studio Intro
A brief introduction to SQL Server Management Studio, for beginners. Covers the main user interface windows, and some basic tasks.
Views: 112292 Database by Doug
SQL Server Caching
Indexing on Index Cards This is part 1 of a series to help people better understand storage, caching, and ultimately indexing in SQL Server. The concepts are applicable to any modern relational database, and most non-relational databases. This video covers caching, logical and physical IO, dirty pages, and checkpointing.
Views: 4318 Database by Doug
The SQL EXISTS clause
How to use the EXISTS clause in SQL. For beginners.
Views: 25822 Database by Doug
Simple Recursion in SQL
A simple example of recursion using SQL Server and Common Table Expressions (CTEs). Thanks to +Nikola Gujanicic for the request.
Views: 28165 Database by Doug
Clustered Indexes and DB Caching
Second in the series of "Indexes on Index Cards", this video covers clustered index read operations and how the cache works on these operations in a relational database. Various queries and cache situations are covered, pointing out the logical and physical for each query and situation.
Views: 1724 Database by Doug
Whats slow on my database server?
Investigation of the relative speed of network, disk IO, and CPU on SQL Server. See the code on the blog post here: http://douglaskline.blogspot.com/2015/10/whats-slow-on-my-database-server.html
Views: 9683 Database by Doug
Simple Scalar Subquery
Demonstrating simple scalar subqueries in structured query language (SQL).
Views: 1760 Database by Doug
Group By Part 2: Null Handling and Count
Aggregation in SQL, how NULLs are handled, and the COUNT function
Views: 899 Database by Doug
The LIKE operator in SQL
An introduction to using LIKE in the WHERE clause of your SQL SELECT statements. For beginners.
Views: 3265 Database by Doug
The SQL ORDER BY clause
For beginners. How to use the ORDER BY clause in the SELECT statement. Covers multiple sort keys, ascending, descending, how NULLs are handled, and best practice.
Views: 1193 Database by Doug
Using the IN Operator in SQL
Demos of using IN in the WHERE clause using SQL Server. For beginners.
Views: 1465 Database by Doug
SQL Ranking Functions: Part 1 The Over Clause
Overview of the SQL Ranking functions, focusing on the OVER clause, which must have an ORDER BY part, and might also have a PARTITION BY part.
Views: 609 Database by Doug
Finding UnMatched Records in SQL
Short video for finding unmatched records using the LEFT JOIN ... WHERE IS NULL pattern. Get the code here: https://douglaskline.blogspot.com/2018/10/finding-unmatched-records-in-sql.html
Views: 309 Database by Doug
Quick! What's the difference between RANK, DENSE_RANK, and ROW_NUMBER?
Short videos showing the difference in the RANK(), DENSE_RANK(), and ROW_NUMBER() ranking functions.
Views: 368 Database by Doug
IN versus EXISTS - are they the same?
Intermediate level video on Structured Query Language. The IN and EXISTS operators are sometimes viewed as "equivalent". They serve a similar purpose and are sometimes used to produce the same records. However, their underlying mechanisms are quite different. This example using the Northwind database demonstrates how NULLs are treated differently when using NOT IN versus NOT NULL.
Views: 128 Database by Doug
Time Zones and the DATETIMEOFFSET data type in SQL
Get the code here: https://douglaskline.blogspot.com/2018/10/time-zones-and-datetimeoffset-data-type.html
Views: 645 Database by Doug
Big Data: How to make your results grid bigger in SQL Mgmt Studio
The default results grid font in SSMS is 8 point, which makes it hard to read for demonstrations on a projector (and for youtube videos). Here's how to make it bigger.
Views: 316 Database by Doug
Understanding Relational Division in SQL
Intermediate level SQL on Relational Division using GROUP BY, COUNT, HAVING, and a correlated subquery or common table expression (CTE). A simple example, stripped-down example of Job Applicants with certain Skills, and Jobs that require certain skills is provided to teach the concept of relational division. Here is the script to create the example JobSkills database, with data. https://douglaskline.blogspot.com/2018/11/jobskills-database-schema-and-data-for.html Here is the code used in the example. https://douglaskline.blogspot.com/2018/11/understanding-relational-division-in-sql.html
Views: 1118 Database by Doug
Simple SQL WHERE clause
How to use simple WHERE clause in a SELECT statement.
Views: 1162 Database by Doug
ANY and ALL in SQL Server
Basic use of the ANY and ALL comparison modifiers in Structured Query Language. Comparison operators (equals, less than, etc.) which compare one single value with another single value can be modified with ANY or ALL to compare one single value with all the values in a single-column table. Get the code here: https://douglaskline.blogspot.com/2018/10/using-any-and-all-in-sql.html
Views: 370 Database by Doug
The HAVING clause in SQL
How to use the HAVING clause in SQL.
Views: 576 Database by Doug
The SQL INSERT statement
An introduction to the INSERT statement.
Views: 408 Database by Doug
A brief beginner's introduction to the DISTINCT operator in SQL. DISTINCT creates a set of unique records, based on field values. In other words, duplicates records, based on field values, are removed. DISTINCT is often used with COUNT, to achieve a count of distinct values. Be aware that NULL is treated as a distinct value in terms of records, but COUNT ignores NULLs. See the full code here: https://douglaskline.blogspot.com/2018/10/using-distinct-in-sql.html
Views: 225 Database by Doug
String Expressions in SQL
Beginner video on String Expressions in Structured Query Language (SQL). See full code here: http://douglaskline.blogspot.com/2018/10/string-expressions-in-sql.html
Views: 337 Database by Doug
The SQL FROM Clause
Beginner Structured Query Language (SQL). Get the code here: http://douglaskline.blogspot.com/2018/08/the-from-clause-in-sql.html
Views: 307 Database by Doug
SQL Ranking Functions: Part 2 Rank, Row_Number, and Dense_Rank
How to use the ranking functions ROW_NUMBER(), RANK(), and DENSE_RANK().
Views: 420 Database by Doug
Group By Part 3: uniquess and multi-column grouping
Making sure that group by specifies a unique grouping, and how to specify multi-column groups.
Views: 742 Database by Doug
Using the CAST function in SQL
Using CAST() to convert from one data type to another in SQL. See the code here: https://douglaskline.blogspot.com/2018/10/using-cast-function-in-sql.html
Views: 253 Database by Doug
The UPDATE statement in SQL
Brief introduction to UPDATE statement in SQL.
Views: 440 Database by Doug
The bit data type in SQL Server
Does bit act like an exact numeric or like a boolean. Well, neither.
Views: 4063 Database by Doug
Using the SwitchOffset function for Time Zones
SwitchOffset is a function that will shift a time in one time zone to the correct time in another time zone. It takes a DATETIMEOFFSET data type, and produces a DATETIMEOFFSET data type. Get the code here: https://douglaskline.blogspot.com/2019/01/the-switchoffset-function.html
Views: 111 Database by Doug
Dates and Times in SQL
An introduction to working with dates and times in SQL Server.
Views: 638 Database by Doug
SQL Server Diagramming Intro
Brief introduction to using diagrams in SQL Server Management Studio.
Views: 1001 Database by Doug
Very simple SQL SELECT statements without a table. No FROM clause! For beginners. Covers renaming a column, selecting number and string literals, simple math expressions, string concatenation, and column ordering.
Views: 1744 Database by Doug
Introduction to JOINs
An introduction to using SELECT to display columns from multiple tables using JOINs.
Views: 901 Database by Doug
LIKE, advanced
Advanced things to do with the LIKE operator in SQL.
Views: 721 Database by Doug
Numeric Expressions in SQL
A beginner video on numeric expressions in Structured Query Language. See full code here: http://douglaskline.blogspot.com/2018/10/numeric-expressions-in-sql.html
Views: 191 Database by Doug
Group By Part1: Introduction
An introduction to aggregation and using Group By in SQL.
Views: 650 Database by Doug
The DELETE statement in SQL
Introduction to using the DELETE statement in structured query language using MS SQL Server.
Views: 234 Database by Doug
Introduction to Outer Joins
An introduction to outer joins in SQL.
Views: 468 Database by Doug
Tables and their parts
Beginner level terminology for tables in relational databases. See the code on my blog here: http://douglaskline.blogspot.com/2018/07/tables-and-their-parts.html
Views: 189 Database by Doug
Foreign Keys in Relational Databases
Beginner video on Foreign Keys in relational databases. Foreign keys allow for "lookups" between two tables. To ensure that these "lookups" are valid, we can enforce referential integrity, which makes sure that all foreign key values actually exist in the primary key table. Although referential integrity is specified as a constraint on the foreign key table, both tables involved check data changing operations to ensure all foreign key values are always valid. Primary Keys are always UNIQUE and NOT NULL, but Foreign Keys are generally not UNIQUE, and can be NULL. See the full code here: http://douglaskline.blogspot.com/2018/10/foreign-keys-in-relational-databases.html
Views: 207 Database by Doug
Model Building: The Big Picture
A big picture look at the model building process for data analytics, statistics, data science, etc. In honor of a great professor I had in PhD school! Table of Contents: 00:00 - Introduction 00:00 - Marker 1 00:10 - Slide 2 00:28 - Slide 3 00:57 - Slide 4 01:17 - Slide 5 01:41 - Slide 6 02:03 - Slide 7 02:28 - Slide 8 02:58 - Slide 9 03:21 - Slide 8 03:27 - Slide 9 03:29 - Slide 10 03:44 - Slide 11 03:46 - Slide 12 03:55 - Slide 13 04:27 - Slide 14 05:54 - Slide 15 06:16 - Slide 16 06:41 - Slide 17 07:04 - Slide 18 08:13 - Slide 19 08:34 - Slide 20 09:26 - Slide 21
Views: 50 Database by Doug
Primary Keys in Relational Databases
Beginner video - an introduction to primary keys in relational databases. Primary Keys need to be UNIQUE and NOT NULL, but not really anything else. This makes sure that all records are accessible by at least one field (the primary key). See the code here: http://douglaskline.blogspot.com/2018/10/primary-keys-in-relational-databases.html
Views: 180 Database by Doug
Simple Indexing Intro
Very simple indexing demonstration. Looking at the IO statistics, and discussing what to focus on when looking at database performance.
Views: 249 Database by Doug
Structuring Data
Beginner level. Basic rules for structuring your data and making it easy to work with. See the code on my blog here: http://douglaskline.blogspot.com/2018/07/structuring-data-in-tables.html
Views: 184 Database by Doug
Can I use NULL with the IN operator in SQL?
In SQL, can you use NULL in the list of items for an IN operator? The short answer is no, but why? I demonstrate that it doesn't work, then dig deeper into the query plans and talk about the IS comparison operator.
Views: 173 Database by Doug