My chum Jamie has a good post over on his blog about Object Relational Mapping. It tells you the sort of steps you have to perform to build a database or object hierarchy to describe a real world situation, and ends with the following sentence:
The key aspect is getting the information right from the outset – which is interviewing people and writing the needs of the application the story in effect.
This, of course, is the killer. The truth is that a lot of people will tell you what they think they do or what they ought to do, not what they really do. My best experience of this came at a previous job, where trying to get somebody to tell me how their subscriptions system worked took far too many iterations because I’d not written stuff I hadn’t been told about (oh but that should be obvious!).
Also, users don’t realise just how important what they say is and how it will affect your design. Watch out for conversations like this:
Programmer: So an X has one Y, right?
User: That’s right.
P: Is there ever an occasion where an X can have more than one Y?
U: No! How could two Ys belong to an X? That would be impossible!
[programmer goes off and codes a 1-1 relationship]
U: Your program’s rubbish! I can’t add a Y to this X!
P: Let’s have a look… oh I see, that X already has a Y and that’s why you can’t add a new one.
U: But that’s stupid! I need to be able to add this Y!
P: You told me there can only ever be one Y for an X! I asked specifically!
U: Oh eventually, yes. But we need to have both on there while we work out which one to use.
P: *bangs head on table*
Reporting can be even worse. Users don’t understand the logical definition of "AND" and "OR" and have never heard of "XOR". If someone asks for "a report containing people in this group and that group", they probably mean "people in this group OR people in that group". Similarly, "a list of people in this group or that group" might mean this OR that, this XOR that or, in extremis, this AND that. Better still is when you have to deal with two people, one of whom doesn’t understand boolean logic and one of whom does. Then you can get yourself really confused!
So whilst I’m not disagreeing with Jamie’s post, I’m telling you to watch out for users; they’re a real pain at times!