Tables with unconventional names like ABC1234

Asked

Viewed 112 times

6

I have seen some that some systems adopt a different way of naming tables with letters and numbers like ABC1234, XX_900, etc..

These days I’ve been working on creating some queries in a system that adopts this type of approach, more than 1200 tabelas to browse to find out where the data from a given table was (Produtos).

Fortunately, I found some queries that made the task less painful, such as searching all tables by column name Produto,

SELECT      c.name  AS 'ColumnName',
            t.name AS 'TableName'
FROM        sys.columns c
JOIN        sys.tables  t   ON c.object_id = t.object_id
WHERE       c.name LIKE '%produto%'
ORDER BY    TableName,
            ColumnName

Even so the number of tables returned was frightening, more than 200!

So the question is:

What is the advantage of this type of adopting this kind of nomenclature for tables? It would only be to make life difficult for people 'strange' to the project?

  • 3

    I find it hard to answer that question without being too subjective. The only advantage to my view is that you write less when the table names are abbreviated. One possibility is that they were created in an automated way, so the weird names. What I recommend to help you is to create views for queries and then use meaningful names. So you would only need to consult the views, which would make the queries much more readable.

  • Thanks for the tip @Giulianabezerra

  • Related: http://desciclopedia.org/wiki/Gambi_Design_Patterns#Nonsense_naming

1 answer

7


This was a technique used in the 1970s, there was a limit of possible characters and giving meaningful names was not a priority, it was better to use codes. It had some meaning back then, but not much. In fact I think people imagined that they would have thousands of tables one day and that the restriction of the name size would continue, which was naive.

Whoever did this at that time could have changed the pattern at least in new things. For some reason they think that keeping the pattern pays more. I see no advantage.

Some people never had to do that, but they saw that someone was doing it and they thought it was interesting. That’s what I always say, people follow rules without knowing why. It was probably something like "a big company did it like this, it must be good practice, I’ll do it like this".

Large erps usually have many tables even, thousands. I don’t know if all of them are really necessary, but meeting ample needs horizontally and vertically requires it all.

I was a developer of a system like this and it was terrible. Worse, it was created in the 90s and already at the time had better techniques than this, but they did not use because someone who had power learned to do so and imposed this disgrace to what today are many thousands of developers dealing with this difficulty.

But to be fair, after a while you get used to the names :D And the biggest complication isn’t even in the name. The structure of these tables and their relationships are often appalling. Imagine a lot of people, each with their own bias, without understanding the whole and what already exists, creating different things in something monolithic with deadlines weighing more than quality.

There’s a lot, a lot that people do today because everyone has always done this, but they did this because 50 years ago they had to, today is no more. Comments for example.

Today the advantage is zero.

  • 4

    "uma grande empresa fez assim, deve ser uma boa prática, vou fazer igual" Truth.

  • 4

    "a large company company did so, it must be good practice, I will do the same" - I could even give names to the oxen in many cases, because in a few seconds I’ve already thought of a 5 large bug factories that call themselves software factories, all multinational. :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.