0

When developing a new system, for a big corporation.

Technologies:
Web, Java, Spring Boot, Rest Api, Postgres, Hibernate

Company:
Bank

System:
Promissory control, and all others

Company name:
Mycorp

Systems:
Many systems, dozens, dozens...

Is there a good reason to put the company name at the beginning of the table names?

For example, for the users table: mycorp_users

Sometimes I see something like this, the company name + the system name + ...: mycorp_systemx_users

Why not use a schema for this? dbmycorp.systemx.users

Or even not use anything only: someschema.users

11
  • 1
    But this is independent of environment, no matter what the requirements, this is a common practice in almost all consultancies.
    – danilo
    Aug 19, 2019 at 13:56
  • The company is a Bank, The system is a promissory system, All systems here, all databases use this convention.
    – danilo
    Aug 19, 2019 at 13:57
  • Are there multiple mycorp per database? Or is it literally just one name repeated everywhere? Aug 19, 2019 at 13:59
  • @YannickLiekens, only one name repeated everywhere.
    – danilo
    Aug 19, 2019 at 14:02
  • @JamesKenkins, I improved my question.
    – danilo
    Aug 19, 2019 at 14:02

2 Answers 2

1

Naming conventions are usually there for a reason.

Perhaps a good idea is to ask the people in charge why this naming convention was chosen this way. Since you work in bank these naming conventions are (in general) pretty strict, and perhaps useful in the bigger picture.

But from what I can read in your comments and in your post, then no, I don't see much use in using the naming convention you specified.

I would also much rather use schemas as you've said yourself. This gives you the added benefit of being able to specify permissions on the separate schemas.

2

As you say in the comments

I work for a different company, yes, that is building the system for the bank

I suspect this is a requirement of the company you work for and/or the expectations of the purchasing bank.

When the build is complete mycorp is going to be all over in the code. If you wanted to sell the same product to DifferentCorp it would be a lot of work to remove reference to mycorp. I assume that by adding mycorp they bank paying you to custom build a product for them, will have some feeling that you will not be going and selling to their competition, as soon as you get it working.

See related

2
  • 1
    The "best practices for SQL Server" might not be relevant for PostgreSQL (which is what danilo is using) Aug 19, 2019 at 14:26
  • "a lot of work" really reduces to a global search-and-replace, with a recompile. Aug 20, 2019 at 3:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.