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

Understanding a Database

This editorial was originally published on Nov 30, 2018. It is being republished today as Steve is traveling.

I ran across a post that asked a good question, one which I want to ask you today: how do you learn about a database?

I've run into quite a few databases in my career. Some were third party systems, like Dynamics and JD Edwards World. Some were databases that custom designed and built by developers and database modelers of widely varying skills. Some were well built in order to normalize data and define referential integrity, and other databases were put together in a piecemeal fashion over time, lacking keys and consistent naming. I'll leave it to you to guess if there were more of the former or the latter.

When a developer or DBA comes across a database, what's the way that they can decode what fields and columns mean? Certainly names help at times, especially when the purpose of the database is understood, but all too often the names don't quite make sense. This is especially true in many vendor databases. The one common theme I've seen in many databases is that there is no data dictionary provided by anyone.

Trying to understand a database has been a trial and error detective task for me in the past. Usually this starts when I need to do some work that is requested by users: write a report, change data, etc. In these cases, I often will ask users to access certain data related to the change from their application while I run Extended Events and note which entities are accessed. I can then start looking for data elements, and note which columns might be mapped to which fields in an application.

Often I've built a data dictionary of sorts outside of the database using something like ErWin, ER/Studio, or another tool. That has been somewhat flawed, as it's hard to share the information with others. These days I think I'd make extensive use of Extended Properties to document what I learned, so that all my knowledge is available for anyone else that needed to work on the system. They can just look at the properties for various entities.

If you've got other methods, share them with us today. I'm sure there are plenty of DBAs and developers out there that would like some tips and tricks for decoding a database design.

Steve Jones - SSC Editor

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

 
  Featured Contents
SQLServerCentral Article

Deploy DACPAC to Azure SQL Database using Visual Studio

Kunal Rathi from SQLServerCentral

This guide will walk you through the process of deploy DACPAC to Azure SQL database directly from Visual Studio.

External Article

INFO.VIEW DAX Functions Usage and Examples

Additional Articles from MSSQLTips.com

In the December 2023 Microsoft Power BI Desktop release, more than 50 new INFO DAX functions were added. They all start with “INFO.” and return the same result as corresponding data management views (DMVs) that were available before only using a SQL-like syntax. With these new DAX functions, you can use the recently added DAX query to get metadata about your semantic mode

Technical Article

The State of the Database Landscape in 2025: Insights and trends

Steve Jones - SSC Editor from SQLServerCentral

How are you navigating the database landscape? Our latest report sheds light on the current state of database management and offers valuable insights into how organizations can navigate and simplify the growing complexities of the database landscape.

Blog Post

From the SQL Server Central Blogs - What is Deferred Name Resolution?

Steve Jones - SSC Editor from The Voice of the DBA

One interesting concept in SQL Server is Deferred Name Resolution. This is something many developers struggle with understanding how this works and where it works. In the Microsoft docs,...

Blog Post

From the SQL Server Central Blogs - Is Your Business Truly Ready for AI?

Joyful Craftsmen from Joyful Craftsmen Blog

The AI revolution isn’t coming – it’s here. Companies are racing to integrate artificial intelligence into their operations, eager to unlock efficiency, automation, and data-driven decision-making. But while AI...

Pro T-SQL 2022: Toward Speed, Scalability, and Standardization for SQL Server Developers

Site Owners from SQLServerCentral

Learn how to write and design simple and efficient T-SQL code. This is a hands-on book that teaches you how to write better T-SQL with examples and straightforward explanations.

 

  Question of the Day

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

 

Partial Backups II

What is a partial backup for a read-write database?

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)

Counting Bits IV

What does this code return in SQL Server 2022+?

select bit_count(2.4) 

 

Answer: An error

Explanation: This returns an error as the bit_count() function only takes integer or binary expressions. Ref: BIT_COUNT() - https://learn.microsoft.com/en-us/sql/t-sql/functions/bit-count-transact-sql?view=sql-server-ver16

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 2017 - Development
Splitting Text based on certain phrases in string - I have a text string that contains something similar to below : [{"ChannelName":"LOT4 - Telephone","ChannelRecordId":"42c49edf-9aa1-ec11-b85f-00155d640f76","Removed":false},{"ChannelName":"LOT4 - Video","ChannelRecordId":"46c49edf-9aa1-ec11-b85f-00155d640f76","Removed":false}] I need to strip out into separate columns or create additional records for the guid after the text "ChannelRecordID":" and also the false at the end (which might say true). The number of iterations of the phrase ChannelRecordID […]
SQL Server 2016 - Administration
KB5046856 fails to install - Hello experts, The following SQL update is failing to install on some of our SQL Servers with the following error. Is anyone else seeing this? I've tried Googling the error but have not found a specific fix for this issue. Thanks for any help. -- webrunner Update: Installation Failure: Windows failed to install the following […]
Perfomance in views - Hello, I want to ask you about the following case that I live with a company in my country. They have a SQL server licensed with SQL enterprice ver 2016, where in the same instance about 25 databases coexist and in particular the main one and heart of all the systems, the Erp base. There […]
SQL Server 2016 - Development and T-SQL
Deadlocks after index rebuild - We rebuilt a bunch of indexes that had avg_fragmentation_in_percent>30. Now we have 1 job that is consistently getting deadlocks and I'm trying to find the root cause. Attached is the event data xml file from the deadlock event. Any help on which direction to start looking is greatly appreciated. We are using 2016 sp 2. […]
SSIS (Integration Services) - "External table is not in the expected format" - Good Afternoon. I have been manually running an SSIS package on an adhoc basis, which populates an Excel file from a SQL Server Table. There is no apparent issue with the package, but often I get the following error: "External table is not in the expected format" And it resolves when I Shut Down and Re-Start the […]
SQL Server 2019 - Administration
Multisubnet Cluster DBs not replicating - No AD on one subnet - Hi All, We have setup a 3 node SQL Server 2019 (CU30) multi subnet cluster with 2 nodes on production site and 1 node in disaster recovery (DR) site. The DR site does not have any AD/Domain and it is still under the same AD/Domain as production (Just different subnet but same AD - One […]
SQL Server 2019 - Development
how to output date of when a SP was created and last modification? - Hi everyone I have a query that gives me the list of all SP in my DB.  I would like to modify the query so it outputs two additional fields: 1. When was the SP created (call it CREATION_DATE)? 2. When was the SP last updated (call it LAST_UPDATE_DATE)? Is this possible?  If yes, how […]
Source to Target Mapping (Lineage) - Hi all, I work with an unusual warehouse and I was wondering if anyone else has this issue, we are looking to document source to target but with our set up it seems like it's going to be a manual process. We don't have a separate ETL tool that loads the data. Our warehouse is […]
where to find information about xE sqlserver.databases_bulk_copy_throughput - where to find information about xE sqlserver.databases_bulk_copy_throughput ? I'm searching for de description of all attributes ( e.g. "count" - is it number of B/KB/MB/GB or number of rows ? )
Analysis Services
How do I read XEL files in SSAS? - A colleague of mine has setup SSAS monitoring through Extended Events and these are writing to XEL files on the local server. Can anyone advise how I can read these on an SSAS server? I know how to do this in SQL Server but those commands don't work (or exist) in the SSAS query window. […]
SQLServerCentral.com Test Forum
New test Mar 2025 - Testing posting and replying
SQL Server 2022 - Administration
Service Principal Name (SPN) getting this error and then sqlserver restarting. -   HI All, Service Principal Name (SPN) getting this error and then sqlserver restarting. every time unable to find other thing in logs in event viewer and in sqlserver logs also , do we need to check with windows team to get a fix for this so that again and again this wont happens and […]
SQL Backup folder permission issue - Hi SQL experts, Having an issue on one of our SQL servers at work in which the SQL backup folder permissions are not right and the folder is inaccessible. I just noticed this problem when attempting to setup nightly maintenance plans. Even though I'm logged in with my domain admin account, I still don't have […]
DBCC Clone Database Failing on SQL 2022 - When running clone sql is changing one specific table to History table and its failing. Please suggest if there is any bug  
SQL Server 2022 - Development
Getting error in sql server 2022 - Hi folks We have migrated database from sql server 2014 std to sql server 2022 std. database get restored and old server is sql service is stopped. Now after few initial operation we are facing this error "Please create master key in the database or open master key in session" as checked on net restored […]
 

 

RSS FeedTwitter

This email has been sent to newsletter@newslettercollector.com. 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

 

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