• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dynamic Database Scheme

 
Neil Renaud
Greenhorn
Posts: 15
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ppl,

I've just designed my database scheme and have tried to make it dynamic. E.g. if the scheme part of the database file changes I can still read in the database and create record and field options no problem.

What I am now going to do is have a set of constants that maps position x of my String[] to a field name. Then when I implement the following part of the interface a constant will say index 0 is name, index 1 is location etc. Then from then on I was going to work on names only.



The advantage of this way (as I see it) is that if the scheme changes all that has to be done is the constant mapping changed.

[edit: scrap that if the scheme changes I still wouldn't have to change anything, if the name and location fields were swapped round 0 would still map to name and 1 to location thus the client wouldn't break]


Am I doing too much here? Should I make it less dynamic?

Neil

[ January 25, 2005: Message edited by: Neil Renaud ]
[ January 25, 2005: Message edited by: Neil Renaud ]
 
Jeff Bosch
Ranch Hand
Posts: 805
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've had similar thoughts, and decided that if the requirements document does not say the program "must" provide such flexibility, then it is probably beyond the scope of the project. There was a time when I tried to put every cool bell and whistle into my programs, but working for a huge company that hammered the warning "stop scope creep" into my skull on a daily basis for four years changed my approach.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic