I'll try to keep this example as simple as I can. I'm trying to implement a domain-driven design (a business object to represent each table) in an old VB6 app which follows no OOP patterns. The existing code is written just as you might expect from a 10 year old VB app (i.e. use of ADODB.Recordset with no intellisense for fields). The existing code is non-OOP and I cringe at following its existing patterns. One of my challenges here is how to handle database changes as new requirements come up, without creating too much confusion to any developers who may look at the DB design later.
Suppose in this app we have a hypothetical 'Client' table that is clearly over-burdened as such: clientId ClientName ContactName Address City State Zip Phone CreditLimit CurBalance (and on and on and on...)
A new requirement calls for new financial fields: InterestRate Terms
Would it be acceptable to break InterestRate and Terms into a separate 'Fiancials' table, which may appear as a weird split since the existing 2 financial fields will exist in the original table?
Ideally the old financial fields (CreditLimit, CurBalance) would be relocated to this new table, but at the risk of breaking MANY parts of the app, it is not desirable to move fields. I just want to stop the current practice of making a table wider and wider.
Basically, I am thinking I want to leave old code/table design alone, make a clean break with new fields, and create domain objects to handle any existing and new tables i.e. Client object could expose a Financials property representing the new Financials table.
Is it a good idea to TRY to make a clean break or just add new fields to the existing muck? Is there a clever naming scheme for representing new tables versus the old? How do you DBAs make a clean break without ripping apart the existing design?
thanks for any thoughts