Columnar, Graph and Spatial Databases are three data models built for three kinds of questions: totals over many rows, paths through relationships, and distances between places. This post explains each one and builds all three in SQL Server 2025 with columnstore, graph tables and the geography type.
Spatial Unions in SQL Server: STUnion and UnionAggregate
Spatial unions merge shapes that touch or overlap into one shape. This post uses six land parcels on a flat grid to show STContains, STUnion for two shapes, chained unions, UnionAggregate with GROUP BY, and CollectionAggregate for comparison. Every area and result comes from SQL Server 2025.
Draw Pictures with T-SQL: The SSMS Spatial Results Tab
The SSMS Spatial results tab draws every geometry value a query returns. This post draws a house and a tree with STGeomFromText and STBuffer, explains labels and the 5,000 object limit, and checks store service areas for overlaps and gaps.
SQL SERVER – Validating Spatial Object as NULL using IsNULL
How do spatial functions handle NULL? I show two ways of validating a spatial object as NULL: the IsNULL method, which returns 0 or NULL, and IsValidDetailed.
SQL SERVER – Validating Spatial Object with IsValidDetailed Function
Invalid spatial objects used to give only a simple error. The IsValidDetailed function tells you whether a shape is valid and, when it is not, the reason why.
Shortest Distance Between Two Shapes in SQL Server: Ramsetu or Adam’s Bridge
The shortest distance between two shapes in SQL Server comes from ShortestLineTo and STDistance. The tests here show the numbers behind the three original pictures, what happens when shapes overlap or use different SRIDs, and the same method on the globe near Ramsetu.
Distance Between Two Points on the Earth With the geography Type
The distance between two points on the earth takes one method call once you store the points as a geography value. This post builds a small table of five US cities, turns latitude and longitude into points, and measures with STDistance in meters, kilometers and miles. It also compares the answer with a flat map formula and a sphere formula, and shows the error for swapped arguments.






