pgexercises
pgexercises copied to clipboard
Naming conventions are haphazard
Per HN comment:
After doing a couple exercises what I don't like is the naming convention. Something like "montlymaintenance" or "recommendedby" are just hard to read and type and I'd much rather use snake-case and/or shorter names. Eg. "monthly_maintenance" or "maintenance_per_month" or just "maintenance" if it's explicit enough that it's always per month.
Also to me using shorthands for ids is a bit hmm hmm I mean sure you write them a lot so it's useful to spare your fingers when typing queries but "facid" just seems wrong. Again maybe underscore? "fac_id" or even "facility_id".
This is correct, the schema could use a bunch of fixing up in this regard. Sadly fixing this is a nontrivial change, as all the answers, explanations, and diagrams will need to be updated along with the SQL itself.