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

Poor Names

It's always interesting to me when I give product feedback to engineers at Redgate on their demos. Quite often they've built a feature that uses AdventureWorks or Pagila (PostgreSQL) or some other well known schema to evaluate how their particular thing works with a database. I try to remind them that many databases aren't well modeled and designed with consistent naming.

I ran across a Daily WTF article that isn't showcasing databases, but it does show some poor naming in data being stored in a PDF. The developer who had to automate a process had to map these fields to database fields, which also might not be named very clearly. In fact, I think I've seen a few database models that used column names like the field names in the PDF.

Most systems we work on evolve over time. They aren't built by one programmer, or one team, across any period of time. Existing developers leave and new ones start. DBAs change, and we often don't have any code analysis rules enabled or running in CI that might help us with consistency.  Often we don't even have our rules documented.

Humans are amazingly creative beings, but they also get very uncreative when they have to repeat that creativity over and over. It's why we find a neighborhoods in Colorado with Pine St, Pine Ln, Pine Rd, Pine Circle, Pine Way, etc. You get the idea. Someone got bored and didn't want to be creative, so they just took the easy way out.

The same thing happens in databases. I've seen people have a Customer table and then a CustomerDetails table alongside it (singular and plural) with a custDefault (case) and a tblCustContact (prefix) table that leave me scratching my head. Did the next developer not look at the database at all? Certainly they didn't use any modeling tool like Redgate Data Modeler.

I don't blame others, since I've found myself struggling to be creative as well as consistent when I build systems. Sometimes I've got some automation running that reminds me to do better, but often I'm depending on another human to catch these inconsistencies in a code review. However, I'm not sure code reviews include looking at the name of the object for most people. Well, maybe column names, but that might be it.

I'd hope an AI system could recognize poor names and then suggest better ones that capture the intent of the data being stored and look like the other objects in the database. Unfortunately, that will likely lead to a section in the database that looks amazing while all the older objects drive you crazy with their random nature. Maybe the AI can at least update the comment or description fields in code to ensure there's some place to look for information to help us do better in the future.

Steve Jones - SSC Editor

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

 
 Featured Contents
SQLServerCentral Article

The day-to-day pressures of a DBA team, and how we can work smarter with automation and AI

Terry Jago from SQLServerCentral

What a DBA team actually deals with There are many issues a DBA team faces, from servers going down to login access not being requested on time. These are not glamorous problems, but they are the problems that stop everyone else doing their jobs. In a modern environment you would expect a lot of the […]

External Article

Everything you should know about the SQL Server Resource database

Additional Articles from SimpleTalk

Every SQL Server instance contains a database that most people never query, never back up, and never even see in Object Explorer. Yet, without it, SQL Server would not start. Enter the SQL Server Resource database.

Blog Post

From the SQL Server Central Blogs - Monday Monitor Tips: A New Analysis Page

Steve Jones - SSC Editor from The Voice of the DBA

We have multiple teams (8) working on Redgate Monitor. Some work on the Standard Edition, a few on the Enterprise Edition, and others handling core work, like the Linux/PostgreSQL...

Blog Post

From the SQL Server Central Blogs - SQL Server Security: Always Encryption

Vinay Thankur from Vinay Thakur

As discussed introduction of Always Encryption blog and initial Encryption at rest as TDE which is introduced on SQL Server 2008, TDE is at rest has limitation as data...

Delta Lake: The Definitive Guide: Modern Data Lakehouse Architectures with Data Lakes

Site Owners from SQLServerCentral

Ready to simplify the process of building data lakehouses and data pipelines at scale? In this practical guide, learn how Delta Lake is helping data engineers, data scientists, and data analysts overcome key data reliability challenges with modern data engineering and management techniques.

 

 Question of the Day

Today's question (by Steve Jones - SSC Editor):

 

Removing TDE

How do I remove TDE encryption of data from database xxx?

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)

Identities and Sequences IV

When thinking about the identity property and sequence objects, which of these can be used with numeric and decimal data types?

Answer: Both

Explanation: Both can be used, though with both, the scale must be 0. Ref:

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 Server 2016 - Administration
How to change the FDLaunch Error log file location - The file FDLAUNCHERRORLOG gets created in the default \MSSQL\Log folder. So far, I've found absolutely no way to change that location. The link to a MS URL in a similar posted question here on SSC is Forbidden. I asked our in-house AI, and it told me about the "SQL Server Fallback Database feature". I think […]
SQL Server 2019 - Administration
CMS server query & temp tables - I am annoyed. We have a CMS server that has hundreds of servers saved to the "node." I need to query them all at once to get a COUNT of a certain value. I want a total across all the servers, not the total on each server. But because CMS keeps throwing Server Name as […]
Editorials
Barely Reviewed Code - Comments posted to this topic are about the item Barely Reviewed Code
This Week's AI Trust Problem Became Everyone’s Problem - Comments posted to this topic are about the item This Week's AI Trust Problem Became Everyone’s Problem
Article Discussions by Author
The day-to-day pressures of a DBA team, and how we can work smarter with automation and AI - Comments posted to this topic are about the item The day-to-day pressures of a DBA team, and how we can work smarter with automation and AI, which is is not currently available on the site.
Using OPENJSON - Comments posted to this topic are about the item Using OPENJSON
Data Modeling with dbt for Visual Code: The Fabric Modern Data Platform - Comments posted to this topic are about the item Data Modeling with dbt for Visual Code: The Fabric Modern Data Platform
Data Modeling with dbt for Visual Code: The Fabric Modern Data Platform - Comments posted to this topic are about the item Data Modeling with dbt for Visual Code: The Fabric Modern Data Platform
The Problem Isn't Always Your Query or Schema... Sometimes It's Hidden Assumptions - Comments posted to this topic are about the item The Problem Isn't Always Your Query or Schema... Sometimes It's Hidden Assumptions
Identity Defaults - Comments posted to this topic are about the item Identity Defaults
Migrate SSRS Reports to PowerBI Report Server in SQL Server 2025 - Comments posted to this topic are about the item Migrate SSRS Reports to PowerBI Report Server in SQL Server 2025
Identities and Sequences III - Comments posted to this topic are about the item Identities and Sequences III
SQL Server 2022 - Administration
SQL 2017 to SQL 2025. Good to Go ? - We need to replace our Windows server running SQL 2017. Any reason not to go to SQL 2025 ?  Any "gotchas" migrating databases from SQL 2017 to SQL 2025 ?
SQL Server 2022 - Development
Daily aggregation of Azure Blob Storage by tier (created/tier-change/deleted) - Hello all, I’m looking for advice on how to derive a daily snapshot table from a large fact table in SQL Server that tracks Azure Blob Storage metadata. In production this table can have tens of millions of rows, and its structure cannot be changed. To make the problem reproducible, I’ve created the simplified version […]
what data type i should use for roversion col and can i use less than greater - can i use Rowversioncol ( in my database it's synonyme timestamp is used) to run the following query to find all inseted after this @LastKnownRowVersion; SELECT * FROM YourTable WHERE RowVersionCol > @LastKnownRowVersion; data type i should use for @LastKnownRowVersion; why i am asking is because i read this from "A nonnullable rowversion column is […]
 

 

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

 

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