Problems displaying this newsletter? View online.
SQL Server Central
Featured Contents
Question of the Day
The Voice of the DBA
 

Defending the RDBMS

This editorial was originally published on Sept 13, 2018. It is being republished as Steve is on vacation.

A few weeks ago I ran across an essay from Randolph West called, Relational Databases Aren't the Problem. This was a response to another essay that made a case for relational databases being bad for many businesses. I thought that both pieces were interesting for different reasons. Certainly I don't believe the the RDBMS is perfect, and it certainly can be hard for developers to build software that interfaces with a relational system.

The original complaint about the RDBMS is somewhat rambling and deceitful, in my opinion. It is an excellent study of how to use a few concepts to confuse and create doubt in a casual reader. If I weren't reading closely, I might fall for a number of the issues that exist with relational databases. However, in my mind, part of the issue is that quite a few of the issues that are discussed aren't problems with relational databases, but often the issue with poorly developed software or design of the entities and relationships. I find myself even more disappointed that the author hasn't really addressed any comments, but rather just pasted a link to his followup article.

I do think that the defense from Mr. West does a good job, though it also misses some of the primary issues we struggle with relational databases. There are problems with the knowledge of how to build a well performing database, both from application developers that view this as a necessary evil as well as experienced database developers that don't regularly improve their skills and try new design techniques.

I also think that both of the pieces fail to address the issues of gathering and working with multiple rows of data. The second discussion of "doing without databases" really implements its own database management structure, which may work well, but is fraught with issues such as the concurrency issues of multiple users searching and scanning through data without having indexes. While indexes are overhead, they are necessary as hash buckets aren't necessarily feasible for all the properties in a class. Also, if you end up building them for multiple properties, you're building an index. There's another good defense of some of the issues here.

I do think that keeping more data in memory and synchronizing access to structures sounds great, but scaling that out to multiple systems, and ensuring consistency at high volumes, not to mention potential loss of data issues from crashes are a problem. Having a write ahead log in SQL Server does a wonderful job of ensuring we can handle redo/undo on system restart. The method presented doesn't necessarily ensure this, though perhaps accepting some data loss from high concurrency changes is OK for many applications.

I will say that the idea of all data in memory is interesting. I had to stop and think about how many databases really have more than 1TB of data. If we throw out indexes, does this cover most data stores? I bet this does, though that doesn't mean that there aren't issues with using in memory array structures, with widely varying data sizes.

Would I use an in-memory data structure for software? It's tempting, but honestly, I wouldn't. The value of data is too high, with potential issues from poorly implemented ACID control structures. Plenty of issues have been found with different RDBMSs over their years, and even some in NoSQL systems. Thinking that I could avoid any issues and protect data is something I wouldn't even try. After all, if there is some error, I'd prefer it from a system that many people use, rather than one I tried to emulate for no good reason.

Steve Jones - SSC Editor

Join the debate, and respond to today's editorial on the forums

 
 Featured Contents
SQLServerCentral Article

Creating an Azure SQL Database Using Azure Cloud Shell

Kenneth Igiri from SQLServerCentral

This article will show how to use the Azure Cloud Shell and PowerShell to set up a new Azure SQL Database.

External Article

Starter Metadata T-SQL Query Examples for Databases and Tables

Additional Articles from MSSQLTips.com

SQL Server provides lots of information about various aspects of server and database objects and this data is referred to as metadata. Understanding what is available and how to use this metadata can greatly enhance and streamline how you can work with SQL Server.

Technical Article

Storing Credentials Securely on a Windows-based Flyway Installation

Additional Articles from SQLServerCentral

This article demonstrates how to use PowerShell to fetch your login credentials from Windows Credential Manager and pipe them securely to Flyway without ever saving them in any form, such as in a file or environment variable.

Blog Post

From the SQL Server Central Blogs - The Four Different Types of Flyway Files

Steve Jones - SSC Editor from The Voice of the DBA

This is documented, somewhat, but I wanted to put this down for myself, as the I don’t love the docs and they are hard to sort through. Flyway is...

Blog Post

From the SQL Server Central Blogs - T-SQL Tuesday #163 – Career Advice I received

Tracy Boggiano from Database Superhero’s Blog

It’s time for our monthly blog party and thanks to Gethyn Ellis ( t | b) for hosting this month. Gethyn asks us for the best Career
The post T-SQL Tuesday #163...

Big Data Analytics cover

Big Data Analytics with Spark: A Practitioner's Guide to Using Spark for Large Scale Data Analysis

Steve Jones - SSC Editor from SQLServerCentral

Big Data Analytics with Spark is a step-by-step guide for learning Spark, which is an open-source fast and general-purpose cluster computing framework for large-scale data analysis. You will learn how to use Spark for different types of big data analytics projects, including batch, interactive, graph, and stream data analysis as well as machine learning. In addition, this book will help you become a much sought-after Spark expert.

 

 Question of the Day

Today's question (by Carlo Romagnano):

 

OUTER APPLY

What does the last query return?
declare @t table(i int) 
insert into @t
SELECT * FROM (VALUES
('1')
,('2')
,('3')
,(NULL)
) AS V([i])


SELECT t.i
      ,MSG.msg
  FROM @t t
OUTER APPLY
(
    SELECT msg = CASE t.i
                    WHEN 1 THEN 'ONE'
                    WHEN 2 THEN 'TWO'
                    WHEN 3 THEN 'THREE'
                    ELSE 1/0 --CAST(1/0 AS VARCHAR(10))
                 END
) MSG

Think you know the answer? Click here, and find out if you are right.

 

 

 Yesterday's Question of the Day (by Steve Jones - SSC Editor)

Managed Instance Differential Backups

If I have an Azure SQL Managed Instance, how often does Microsoft run the automated differential backups.

Answer: every 12 to 24 hours

Explanation: Microsoft makes a differential backup every 12 to 24 hours. Ref: Automated backups in Azure SQL Managed Instance - https://learn.microsoft.com/en-us/azure/azure-sql/managed-instance/automated-backups-overview?view=azuresql

Discuss this question and answer on the forums

 

 

 

Database Pros Who Need Your Help

Here's a few of the new posts today on the forums. To see more, visit the forums.


SQL 2012 - General
Can I install SQL failover on a single node WSFC cluster? - For depressing reasons, I'm installing 2012. Don't ask.  For some other reasons I've had to create a single node WSFC cluster (& will add a node later).  I want to install SQL FCI (not standalone) but I'm struggling.  It could be lots of things, group policy, permissions ...  but ... Q 1  - is it […]
SQL Server 2019 - Administration
List SPN for NT Service\MSSQLServer account - Does anyone know how to list the SPN for the NT Service\MSSQLServer account ? I've created the following combinations and nothing is working setspn -L MSSQLSERVER setspn -L NT Service\MSSQLSERVER setspn -L "NT Service\MSSQLSERVER" setspn -L 'NT Service\MSSQLSERVER' When the VM was created via terraform the NT Service\MSSQLSERVER account was used to run the service […]
File extensions errors - Processed: Jun 27 2023 3:02AM, LogDate: Jun 27 2023 3:01AM, Server: [WARNING] === At least 4 extensions for file {XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXX} (sql\ntdbms\hekaton\engine\hadr\mtlog.cpp : 6063) What do the above warnings mean? Do they need to be investigated - if yes-how do we troubleshoot them or can they be ignored. Thanks      
SQL Server 2019 - Development
Arithmetic overflow error when using POWER function - Hello, Any help appreciated. This code should perform a internal rate of return (IRR) calculation. It generates correct data based on what was provided to me using Excel's IRR function. It looks like as GETDATE() gets close to my hard coded date the error is generated. Any suggestion to prevent the error would be appreciated. […]
Preventing Arithmetic overflow error when using POWER function - Hello, Any help appreciated. This code should perform a internal rate of return (IRR) calculation. It generates correct data based on what was provided to me using Excel's IRR function. It looks like as GETDATE() gets close to my hard coded date the error is generated. Any suggestion to prevent the error would be appreciated. […]
Update view from dynamic sql - I'm using the code below to change the name of the columns in a view but it doesn't actually update the view. What do I need to do so that the view is updated? Thanks.   DECLARE @code4 VARCHAR(9); SET @code4 = CONVERT(VARCHAR(2),month(DATEADD(MONTH,DATEDIFF(MONTH, 0, GETDATE()) - 4, 0))) + ' - ' +CONVERT(VARCHAR(4),year(DATEADD(MONTH,DATEDIFF(MONTH, 0, GETDATE()) […]
DELETE with SELECT and join in SQL SERVER - I have a select statement below which gives the expected results of duplicate data. I want to convert this statement to a DELETE Statement to delete items leaving a single item but getting error. Below is my query. Sample data SampleOne 2016-10-14 12:44:39.460 SampleOne 2016-10-14 12:44:39.460 SampleTwo 2016-10-14 12:44:39.460 SampleTwo 2016-10-14 12:44:39.460 SELECT t.* FROM […]
Out of 3 same/ similar rows, remove two and keep one - Hello everyone, I would like to ask someone for an advice. I am not even a 100% sure it is doable, but it might be. I have a table that returns the same or almost the same rows of information often times 3 times. Basically there are 3 types of Transactions: 1. GL Posted - […]
SQL Azure - Administration
How to read file metadata from an Azure Blob location? - Anyone recommend the best way to accomplish this? Powershell? Or can you do this via external data sources?   All I need to do is read file metadata from folders in azure blob storage so I can get the filename and date file created for audit purposes.   Thanks in advance!
Reporting Services
SSRS reports URL in database - We would like to include userID in the reportURL, so that later we can see the report execution data for specific users. I know we can query the database using ExecutionLog3, but I don't see a URL field included. Any where store that information, what is the best way to get report execution counts for […]
Integration Services
How to skip Deleted Servers - I have a SQL table with some servers and a package which runs of those servers. 1.Execute task to list the servers from the table. 2.For each loopcontainer inside which I have data flow task which in turn has oledbsource and oledbdestination. The package runs fine when all servers are present.If a server is deleted […]
T-SQL
Use BCP and a format file to export data to a text file - I would like to use BCP and a format file to export data to a text file in a fixed length format. Fields export. The length and starting and ending position. Last Name Length 20 Position 1-20 First Name Length 15 Position 21-36 Social Security Number Length 9 Position 37 46 AddressLine1 Length 30 Position […]
SQL Server 2022 - Administration
SQL Server running on Linux, instance starts almost 2 mins after the service - SQL Server (2022) running on Linux (SuSE 15.4), instance starts almost 2 mins after the service. When the system starts, systemctl status mssql-server.service reports, something like Active: active (running) since Wed 2023-06-28 15:47:57 UTC; 2min 43s ago However, sql server is not available immidately, has to wait almost 2 mins before can be queried. When […]
SQL Server 2022 - Development
how to identify sql scripts not in stored procs w/o using trace - I'm storing off various stats about procs on a daily basis. On e of them stores each sql statement in each proc w/ runtimes and other information.   My issue is there are power bi reports and sql job step that are not using procs but have embedded the sql scripts directly in them . […]
issue with text column in dbo.syscomments - I wrote a process to store off all sql objects daily. There is one that stores off all stored procedures contents daily. The text column in the dbo.syscomments table is being stored locally in another table whose column is a varchar(max). It stores each proc in 4000 char chunks. So there will be one record […]
 

 

RSS FeedTwitter

This email has been sent to {email}. To be removed from this list, please click here. If you have any problems leaving the list, please contact the webmaster@sqlservercentral.com. This newsletter was sent to you because you signed up at SQLServerCentral.com.
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
webmaster@sqlservercentral.com

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -