The Bit Bucket

SDU Tools: Script Analytics View

Our free SDU Tools for developers and DBAs, now includes a very large number of tools, with procedures, functions, and views. One tool that was added a while back is ScriptAnalyticsView.

When we build BI systems, we create a data warehouse with tables that are structured as cleansed versions of the incoming data, and with strong referential integritty and consistency.

When we expose those tables to external BI tools like Power BI, Analysis Services, etc. we limit those tools to a series of views that we create. Generally we put them in a schema called Analytics, but it could have any name.

2025-04-20

SQL Interview: 38 Table Compression Candidates

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.

Section: Administration Level: Medium

Question:

A developer in your team has suggested applying PAGE compression to all tables and indexes in your application database.

You are concerned that doing so might impact performance, and that ROW compression might be better.

2025-04-19

Book Review: A Developer's Guide to Building Resilient Cloud Applications with Azure

Hamida Rebai Trabelsi started her professional career in Tunisia working for multinational corporations as a software developer, then served as a .NET consultant in Canada. She is currently a senior advisor and information and solution integration architect. She has been awarded as Most Valuable Professional (MVP) in Developer Technologies and as a Microsoft DevHero by Microsoft.

Thanks to the people at PackT, I recently had the pleasure of reviewing another one of her new books: A Developer’s Guide to Building Resilient Cloud Applications with Azure .

2025-04-18

Book Review: Business Intelligence Essentials You Always Wanted To Know

I recently had the opportunity to read a preview of Business Intelligence Essentials You Always Wanted To Know by Irene Tobajas from LUKiN Consulting.

I like the way each chapter started with a set of key learning objectives.

I also like the way that quiz questions are integrated into the text (even though there’s the odd question where I didn’t love the answer. For example, saying that Data Mining wasn’t a component of BI).

2025-04-17

Book Review: Architecting Power BI Solutions in Microsoft Fabric

I was pleased to recently get to review a new book by Nagaraj Venkatesan called Architecting Power BI Solutions in Microsoft Fabric . Nagaraj was an MVP for two years and now a cloud solution architect working for Microsoft.

NOTE: I reviewed the book while it was in preview.

I liked the way that Power BI was discussed for different personas: Business Users, Data Scientists, Administrators.

I was puzzled to see a requirement in the front matter for Angular 9, TypeScript 3.7, and ECMAScript 11. I couldn’t find any relevance to them in the book. Hopefully it will be removed before publication.

2025-04-16

SQL Interview: 37 DROP CREATE vs DISABLE REBUILD for SQL Server indexes

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.

Section: Administration Level: Advanced

Question:

You need to write code to avoid the impact of indexes during data loads.

You could DROP and CREATE the indexes, or you could DISABLE and REBUILD them.

Which should you choose and why? How would the performance compare between the two options?

2025-04-15

Opinion: Do your applications encourage discoverability?

I see software houses all the time that are worried about why users find their software hard to use. Or at least harder than they thought they would find it.

One thing that I see worrying users time and again, is applications that discourage you for discovering how they work. Users are afraid to click on options that they haven’t used before, because they’re worried that  something will happen that they can’t undo.

2025-04-14

SQL Interview: 36 Dereferencing server names in T-SQL code

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.

Section: Administration Level: Medium

Question:

You are using linked servers to refer to tables in a database on another server.

You are concerned that the name of the server appears in three-part table names throughout your code. If the linked server name changes, it would be very messy to locate and correct all references to it.

2025-04-13

SDU Tools: Extracting URL components in SQL Server T-SQL

Our free SDU Tools for developers and DBAs, now includes a very large number of tools, with procedures, functions, and views. One common request that we’ve had, is that users need to be able to extract the component parts of a URL.

In the example above, you’ll see that we have added a table-valued function called URLComponents.

It supports protocols, host names, path names, search terms, and anchors.

In case, you need to process individual components, to help with that, we’ve added a number of scalar functions: URLToProtocol, URLToHostName, URLToPathName, URLToSearchTerms, and URLToAnchor.

2025-04-12

SQL Interview: 35 T-SQL Merge Statement Clauses

This is a post in the SQL Interview series. These aren’t trick or gotcha questions, they’re just questions designed to scope out a candidate’s knowledge around SQL Server and Azure SQL Database.

Section: Development Level: Medium

Question:

You are reading a T-SQL script. One MERGE statement merges data from TableA into TableB, and contains two clauses:

WHEN NOT MATCHED BY SOURCE

and

WHEN NOT MATCHED BY TARGET

What is the difference between these? And what is the most common operation that’s executed in each of these clauses?

2025-04-11