DEV Community

Discussion on: Beyond CRUD n' Cruft Data-Modeling

Collapse
toddtoddowens profile image
Todd M Owens

I wanted to like this post.
My biggest critique is your use of quoted identifiers. Seriously, no one should do that.
Here is an interesting exchange on the topic:
stackoverflow.com/questions/646833...
Summarizing:

  1. The SQL 92 standard does not mandate double-quoted identifiers, it permits them. Just because you can, doesn't mean you should. So stick to upper case and underscore.
  2. Using double quoted identifiers to refer to database tables, views, and columns is much more confusing and risky. Having a table named "Person" allows someone else to create a view named PERSON.
  3. I first learned SQL on MS SQL Server. That product allows for ignoring case when quoted identifiers are set off. So you'll see identifiers named like LastName rather than LAST_NAME. I used to think this was a problem. I was wrong.