AlisdairO / pgexercises

PostgreSQL Exercises web site code
Other
400 stars 62 forks source link

Naming conventions are haphazard #38

Open AlisdairO opened 6 years ago

AlisdairO commented 6 years ago

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.