3 ms·
This sounds a lot like Hungarian notation [1]. [1] https://en.wikipedia.org/wiki/Hungarian_notation https://en.wikipedia.org/wiki/Hungarian_notation
by Cieplak 6y ago
This sounds a lot like Hungarian notation [1].
[1] https://en.wikipedia.org/wiki/Hungarian_notation https://en.wikipedia.org/wiki/Hungarian_notation
- goto11 6y agoYeah, and like Hungarian notation it is mostly useful in an untyped system (like BCPL where Hungarian was invented). If you have a type system, let it do the work for you. One of the most bizarre conventions I have seen is prefixing table names with "TBL_" and column names "COL_". I suspect some people just really like abbreviations.
- mgkimsal 6y agoHaven't seen a COL_ prefix in a long time, but I still run across 'TBL_' prefixes sometimes. I've seen it in practice for more than 20 years, and never saw any value. Then... I realized you might be pulling from a 'view' vs an actual table, and perhaps there's a bit of value in that knowledge? I did run across someone joining a view against a table that was joining another view that was comprised of joining against that original table, and the query then did a few of these, and people wondered why it got slow. If the names had been prefixed with view_ perhaps it might have been more obvious this might cause problems? I think not though - the original person who put it together was apparently a DBA by trade and insisted this was normal and good, and 'my' code (which... he'd also written?) was the culprit. "Worked fine when I was there". Well... there were 1200 rows at that time; hitting 60000 rows, we ran in to large perf problems.
- jpalomaki 6y agoI think the goal is slightly different: “This is not quite the same as data types in a programming language (e.g. bool, double, float) although everything with the same prefix should ultimately be cast in the same type. Instead, these data types imply both a type of information and appropriate usage patterns [...]”