The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Column Naming Question

So, I'm using nHibernate with a .Net application. I'm trying to make everything in my design as intuitive as possible "self documenting code" if you will. I want the next person that takes a look at this to know exactly what everything does and where everything should be, that's why I care so much.

With nHibernate the objects are mapped to each other, not to IDs, so the objects stores an instance, or a list of the other object. However, in the database it's status quo with the object ID being stored, not the actual object.

Do I call the column the referenced object name + ID? Or just the referenced object name like they seem to be doing in the documentation I am reading?

Actually, now that I'm talking about it I thik the column name should reference what's actually in the column and append the ID, do you agree?
Sara C Send private email
Thursday, August 07, 2008
 
 
I agree. I would have called it with "ID" appended.
asmguru62 Send private email
Thursday, August 07, 2008
 
 
This is completely not answering your question, so I do apologize, but have you looked into "SubSonic"?

SubSonicProject.com -- I liked this WAY more than I liked Hibernate or CastleProject. It's awesome, I highly recommend it.
Ken Sharpe Send private email
Thursday, August 07, 2008
 
 
Looking into it, Ken. What do you like about it?
Sara C Send private email
Thursday, August 07, 2008
 
 
I agree, appending "ID" or "_id" to the reference in question is a good way to do it.  You have to think about self documenting software from the point of the database as well.  Suppose somebody comes to maintain this application in the future and approaches problems from more of a database point of view?  I suppose ref_id is a more natural way of expressing this in the database to those users, especially if your tool allows you to map it however you want.
Austinian
Thursday, August 07, 2008
 
 
www.llblgenpro.com
Tom
Friday, August 08, 2008
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz