Naming convention to use when converting from database to java variables
database, java, naming-conventions
Solution
If working in Java, use Java naming conventions.
It sounds like your code should be responsible for abstracting the database layer away from the rest of the application anyway so there is no reason to expose the database representation by naming the Java variables with the exact same name as the database columns.
Problem
I'm currently working on a project where I'm converting database info to java objects, and I was curious has to how I should represent/name the objects and variables on the java side. For example, if I'm converting a table named Dog containing info about dogs such as: Column: `BREED_C, NAME_C, OWNER_C, DOGID_D, HAS_RABIES_I` and so on into a java object called Dog with corresponding variables, should I follow a java naming convention such as `BreedC` or use `Breed_C` or even `BREED_C` so there's as little discrepancy between the two systems?