Xp Database Pitfalls

XpPitfalls

Solution: Don't use a DB until you really need it. When you think you really need it, you probably don't, so hold off some more. When you are completely sure that you need a DB, get a second opinion. When the second opinion agrees that you need a DB, ask a contrarian like Ron Jeffries for a third opinion. When everyone agrees that you really need a DB, start with the most agile (Prevayler) and then work your way down (Flat file, Object DB) until you hit rock-bottom (Relational DB). Love it!

Solution: For the love of Cher, if you need a relational DB, start with a free one and gradually work your way down to a non-free one when it starts to make financial sense.

Solution: Use a truly robust object-relational mapping tool. Everyone seems to be saying great things about Hibernate these days. http://hibernate.bluemars.net/

Solution: Design for change. See Fowler's article http://www.martinfowler.com/articles/evodb.html

Speaking of this problem, I know of at least one gent in the Atlanta XP group who was talking about making a database refactoring tool. Aside from waiting on that, there is an extent project to help with continuous integration and database changes at http://migratosaur.dev.java.net --BrianMcCallister

Solution: Don't use stored procedures.


HolyWar Warning

Problem: Databases are a drag.

I like databases. I agree that some vendors make them a pain, but I do not find them a drag as a tool. They are a high-level tool (if you use them right), just like a high-level programming language. -- A RelationalWeenie


See Also: YagniAndDatabases


EditText of this page (last edited July 2, 2003) or FindPage with title or text search