Shop Talk: 2023-10-09

The Recording

The Panelists

  • Kevin Feasel
  • Mike Chrestensen

Notes: Questions and Topics

Data Relay Debrief

Our first topic was Data Relay, where I had spent the prior week. If you’re not familiar with it, Data Relay is a touring conference which spans 5 cities in 5 days across the UK. We talked quite a bit about the first day’s events, as that happened to be the National Museum of Computing in Bletchley Park.

Yes Aliases

Mike was responsible for the next topic, covering whether or not to alias table names in queries. We used this Reddit post to springboard the discussion, but it’s something Mike is dealing with at work as well. We talked about how a “no aliases” policy is a bad idea, but also about rules of thumb which make aliasing easier to understand. I tend not to have hard-and-fast rules around aliasing and certainly don’t expect aliases to be globally unique and non-repetitive (e.g., a dbo.Patient table always and everywhere aliased as pat, but no other table either being aliased as pat), but they should be meaningful enough within the context of a query to make clear which table, view, or expression it is.

Fully Qualified Object Names

Mike also had a question about qualifying object names. For example, in SQL Server, you can have up to four-part naming: instance.database.schema.object. We talked a bit about what each of those four parts actually means and why I always include schema and object when querying, almost never include database, and even more rarely include instance.

Leave a Reply

Your email address will not be published. Required fields are marked *