Christmas is almost here and I thought I would do some experimenting with some “festive” naming in SQL.
You can search Google and find plenty of opinions on what’s right and what’s wrong with naming conventions. You want to make sure you get it right the first time because changing names after deployment can be a hassle. The quotes “measure twice, cut once” and “diamonds are forever” come to mind.
I figured I’d go beyond wrong in this post and see just what is possible when creating a database. I have seen people create with unicode characters and SQL commands as names which would make using the database a nightmare. At least this will look cool.
I looked up some unicode characters at https://www.compart.com/en/unicode/ to see what was available and decided on these to test with:
🎄 – U+1F384
🎅 – U+1F385
🤶 – U+1F936
⛄ – U+26C4
🦌 – U+1F98C
❄ – U+2744
❅ – U+2745
♥ – U+2665
USE [master] GO CREATE LOGIN [🎅] WITH PASSWORD = N'I♥🤶' GO CREATE DATABASE [❄⛄❅🎄❅⛄❄] GO USE [❄❅🎄❅❄] GO CREATE SCHEMA [⛄] GO CREATE USER [🎅] FOR LOGIN [🎅] WITH DEFAULT_SCHEMA = [⛄] GO CREATE TABLE [🦌] ( sleigh_position SMALLINT NOT NULL ,reindeer_name VARCHAR(10) NOT NULL ) USE [master] GO DROP LOGIN [🎅] GO DROP DATABASE [❄⛄❅🎄❅⛄❄] GO
I’m not saying that you should put this out on a test server and wait for one of your coworkers to notice, but I’m not NOT saying it.
Obviously, anyone trying to manage using all of these names would have their hands full but it’s interesting that this setup is valid.
Thanks for reading and Merry Christmas!