Tag: database

What’s in a name?

At work I’m in a committee where we are discussing a versioning strategy for one of our legacy projects. I’m not involved directly with the project, but they pulled me into the committee because of my experience with subversion on our current project. In a part of this meeting, we were talking about the database.

In the application I work on, we are able to version the database. So far, it is small enough that we can copy it in a couple of hours, then run the migration scripts on the new database for the new version, and finally point the new application code at the new database. It’s all quite simple really. Then, if things go awry during the release, we can simply replace the webapp with the old version and point back at the old database. In our case, the database name is the application name, followed by the version. For instance, app-1.7.4. When we do the next release, all the data in app-1.7.4 is copied into app-1.7.5. Anyway, you see what I mean.

So I mentioned this in the meeting today. The DBA for the legacy project looked at me as if I was speaking sacrilege. His eyes were wide as he said;
“You actually change the name of the database for every release?!”
My Response: “Well, yeah. That’s the magic of JNDI. My app doesn’t care about the name of the database it’s pointing at, we just set that up in the JNDI properties and merrily go along.”

So, what’s in a name? I’ll admit I don’t have the most experience in technologies other than Java. This isn’t peculiar to Java web applications, is it?