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.

Need Design Patterns for working with a database

We have a lot of procedural code that accesses databases and holds info in global or instance level data structures.

I am looking for a good book or site to get me started on the fundamentals of good OO design for how to hold the data and work with it.  I'm a little tripped up in that every function in this code accesses this data in some way.  As I think about encapsulating the data it seems like I will need too many methods.

I dug up a book through searches called Object-Oriented Modeling and Design for Database Applications by Blaha and Premerlani.  This book looks like a winner but it would be great to get any feedback or advice.  Thanks.
Saturday, December 02, 2006
Perhaps its best to focus on the refactoring process, since you already have an idea of where you want to go.
 - "Refactoring"
 - "Refactoring to Patterns"
 - "Refactoring Databases"
Sunday, December 03, 2006
Refactoring Databases???
Sunday, December 03, 2006

Sunday, December 03, 2006
Martin Fowler's Patterns of Enterprise Application Architecture might help you. A short summary of the patterns described in the book is here:
Costin Send private email
Sunday, December 03, 2006
from the book blurb on the linked web page ( it looks like the blurb has been 'refactored' one too many times:

"The first section of the book overviews the fundamentals evolutionary database techniques in general and of database refactoring in detail."

My god, why would I buy a technical book from people who can't even construct a simple english sentence?

This only reinforces my impression that the refactoring crowd has a strong whiff of snake oil about them. (same smell that the Gang of Four gives off, unfortunately). It doesn't help that the only people I've even seen with the refactoring books are managers who don't actually DO any programming (refactoring or otherwise).
Jeff Dutky Send private email
Sunday, December 03, 2006
Are you looking for patterns dealing with the database itself, or dealing with accessing / manipulating the data outside of the database?

For the latter, I've found "Data Access Patterns"[0] by Clifton Nock to be extremely helpful. Fowler (mentioned above) gives a good overview of what to think about, but doesn't give enough specific details to really implement most of the bigger patterns.

I'd also suggest "Domain Driven Design"[1] by Eric Evans. It's not specifically about database access, but talks about design of enterprise systems as a whole, and covers lots of things you need to think about when dealing with persistence. Basically, it's an entire book about Fowler's Domain Model pattern.
Chris Tavares Send private email
Monday, December 04, 2006

Are you looking for patterns dealing with the database itself, or dealing with accessing / manipulating the data outside of the database?

I was looking for the latter.  I'm looking for good design to help in building the classes to hold the data. 

The big concern is how to allow lots of independent objects to change the data.  I would like to expose the acutal data inside the objects that hold the data.  I instinctively know that this is a bad design (if the representation of the data changes then all the objects that modify the data also have to change)...but creating too many methods to allow for (and abstract) changing the data also is bad.

I'll take a look at your references.  Thanks!
Monday, December 04, 2006
Tuesday, December 05, 2006

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

Other recent topics Other recent topics
Powered by FogBugz