SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Microservices in SQL Server

By Phil Factor,

It occurs to me that SQL Server is now the ideal way of implementing effective microservices. Yes, really.

Over the years, I've rather changed my attitude to structured data and databases. I remain opposed to the idea of holding XML or JSON inside the base tables of databases, unless they are treated strictly as atomic. I particularly dislike seeing untyped XML in databases: it is stored inefficiently and is slow in use. However, we now have in SQL Server 2017 an excellent way of consuming or providing JSON data in a way that is application-friendly, without letting it poison our base tables. I can now smile sweetly at developers when they ask me to 'talk and understand' JSON in the interface between application and database. Not only is it OK with me, but it removes entirely any last lingering requests from developers to access database objects other than what is provided for them in their schema/interface. It is now perfectly possible for all their functions and procedures to consume and return JSON.

Whatever one's philosophical stance to JSON, it has traction. As it is, effectively, JavaScript, it is ridiculously easy for the Web Developer to use. There is enough in JSON to allow us to do business with it. It is the data transport for microservices, and can be read 'natively' by PowerShell and any .NET compiled language. It underpins JSON-RPC and Asynchronous JavaScript and JSON (AJAJ). It is increasingly used for RESTful web services. It is the data transfer medium for most NoSQL Databases.

The introduction of SQL Server 2017 gives us an opportunity for the first time to come out of our bunkers and cooperate with developers in data terms that make sense to them, without having to trouble them with the philosophical depths of relational theory. There need be no mismatch between the object-oriented world and the relational because we, as data people, can now do all the worrying about the translation in both directions, and obsess about both the data security and integrity.

I'm hoping that next year we, as SQL Server data people, can come up with radical ways of making it quicker and easier to develop secure and scalable data applications on Windows and Linux, and change the old scary image of the database person as the grumpy curmudgeon of the IT department. With good JSON support in SQL Server now, it makes it all a lot easier to smile and nod at developers.

Phil Factor.

Total article views: 110 | Views in the last 30 days: 4
Related Articles

The Red Gate Guide to SQL Server Team-based Development

This book shows how to use of mixture of home-grown scripts, native SQL Server tools, and tools fro...


Develop myExpense Project with asp.net application and sql server database

I want to create an Expense Management .Net application with SQL server backend


Database Design for Blog application

Database Design for Blog application


Application Developers don’t own their data

As a data guy, I always smile when application developers refer to ‘their’ data. If only it were tha...


Database Security with Distribuatable Application

How can we secure a Database which is distributed with an Application - (using MS Sql Server 2005 / ...

database weekly