02 May 2019
02 May 2019

Enjoying Joins in MongoDB

12
MongoDB has a prodigious appetite for unstructured data and has its place in a Database Developer’s toolkit. Even with indexes in place, some operations that involve aggregation are a lot slower than they are with relational databases: So it is when using ‘joins’ between collections. Lookup, the MongoDB equivalent to Joins, cannot yet do Merge … Read more
24 April 2019
24 April 2019

Implementing a phone number based login/signup

29
In today’s world, a user interacts with various apps/websites which require them to login or sign up via using their email address. There are a high chances of a person forgetting the username and the associated password to login or just completely giving up the sign up process as it asks a lot of information. … Read more
23 April 2019
23 April 2019

Comparing SQL Server Instances: Objects by Name

4
It is all to easy to build a database on a server and then expect it to be fully functional. Not so fast: There are a number of possibilities in terms of server-based functionality that can defeat you. Databases are likely to have scheduled jobs and alerts, and may have server triggers or even message … Read more
13 April 2019
13 April 2019

Extract the Path from Filename in SQL

2
While I was preparing an article, I faced the challenge to extract the path from a filename in SQL Server. It’s an interesting challenge with many possible uses, so I decided to create a function to solve this problem. The Main Expression First, let’s understand the main expression to solve the problem. The path is everything … Read more
09 April 2019
09 April 2019

Using JSON for matrices in SQL Server.

5
From SQL Server 2017, it becomes more practical to use JSON arrays for representing and processing a matrix. SQL Server can read them, and update values in them but can’t create them. To do this, you have to create the JSON as a string. The great advantage of them is that you can pass them … Read more
04 April 2019
04 April 2019

How did we get to service meshes?

3
If you’ve been to a conference over the last few years, you’ve probably come across microservices. A microservice architecture consists of many highly decoupled services that are independently deployable and organized around business capabilities. This isn’t a new idea, SOA had similar ideas in the 90’s but the technology around it was clunky (it seemed … Read more
20 March 2019
20 March 2019

Scripting out several databases on a server

6
A while ago, I wrote an article Automated Script-generation with Powershell and SMO about using SMO to script out a SQL Server database. It has remained surprisingly but agreeably popular. SMO is still there, but now part of the sqlserver module that is included with SSMS and downloadable. Someone recently asked me whether it was … Read more
10 March 2019
10 March 2019

SQLBits and Data in Devon 2019

0
This is my first blog in a while and I’m sorry it’s not a technical one.  You may be aware but I’m one of the SQLBits organisers which means that for the last few months all my spare time has been devoted to SQLBits organisation. We were really pleased with how the event went and … Read more
26 February 2019
26 February 2019

Identifying Page Information in SQL Server 2019

2
SQL Server 2019 has some new and very interesting functions to identify information about pages. Many operations, such as analyzing current activities, locks or deadlocks, may result in some metadata pointing/blaming one page in the database. However, how to translate this information to get a database and object name? The image below is an example of … Read more
17 February 2019
17 February 2019

How To, and Not To, Escape a String In TSQL

7
You are never too old to learn an important lesson. Like most programmers, I read programming language documentation for one of two reasons. 1. You have just found out about something new 2. You find out that you were wrong about something you thought you had read the first time, probably 10 years ago. Today’s … Read more