Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6042469
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:47:38+00:00 2026-05-23T06:47:38+00:00

I am using ORM to automatically create tables from model classes. I am naming

  • 0

I am using ORM to automatically create tables from model classes. I am naming the classes and their fields in a way that is natural for the application. The ORM then uses those same names for the tables and columns, and automatically generates names of other objects like constraints and sequences which are completely abstracted by the ORM.

I am not declaring how the tables, columns, etc. should be named. I leave it to the ORM to decide. I see this as good sense from the application’s point of view.

The DBA for my team does not like this one bit. The DBA says that if column “B” in table “A” has a foreign key constraint to field “Y” in table “X”, that the name must be “A.X_Y” instead of “A.B”. The DBA says this is the “correct” way to name foreign keys and that the ORM is therefore naming them incorrectly. Both of the ORM engines I am familiar with allow class/field names to be explicitly mapped to table/column names, so I am aware it is possible to accommodate the DBA without changing the classes.

My question is, in practice, does doing this (explicitly mapping the names) necessarily introduce an extra entity(i.e. new configuration files/sections, new code) or coupling (i.e. imports, decorators, annotations) in the application that might not otherwise exist? ORM designs vary, so I would think it is possible that the answer is different for different engines.

If the answer to this is nearly universally yes, I would consider that a good argument that the DBA should yield to the ORM in the interest of productivity, on the logic that the database exists to serve the needs of the application, not the other way around. Commentary on this point is welcome also.

Please note, I am NOT asking for specific recommendations on how classes/fields/tables/columns should be named.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T06:47:38+00:00Added an answer on May 23, 2026 at 6:47 am

    ORM designs vary, so I would think it is possible that the answer is different for different engines.

    You are right here. Depending on the ORM, explicitly specifying the field->column mapping might (or might not) introduce extra entities in the form of configuration entries, annotations, attributes etc. Having said that, this is the bread and butter (or should I say the very basics) for an ORM engine and hence handling these mappings usually does not add a noticeable overhead.

    I feel you definitely cannot use this as an argument against explicitly naming the tables,columns etc. Most often than not you would have another application that would use the same database. The default names generated by your application might make absolutely no sense for that application. I would let the DBA decide the right nomenclature for the database artifacts and tweak the mapping to my domain model, in my app. After all that’s where the ORM adds value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using an ORM (SQLAlchemy, but my question is quite implementation-agnostic) to model a
I'm starting a new application and looking at using an ORM -- in particular,
i am using kohana ORM in order to get some results from the database.
Using an ORM approach in applications can often lead to the scenario where you
I'm using Hibernate for ORM of my Java app to an Oracle database (not
I am using NHibernate as my ORM solution and have a need for a
I'm using the SQLAlchemy Python ORM in a Pylons project. I have a class
I am trying to leverage ORM given the following requirements: 1) Using .NET Framework
Using online interfaces to a version control system is a nice way to have
Using ASP.NET MVC there are situations (such as form submission) that may require a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.