'''''XpPitfalls''''' * '''Problem:''' Databases are a drag. 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!'' * '''Problem:''' Databases are expensive. 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. * '''Problem:''' Relational databases are fundamentally incompatible with Object-Oriented design. (This is not an insult; they use fundamentally different data models.) Solution: Use a truly robust object-relational mapping tool. Everyone seems to be saying great things about Hibernate these days. http://hibernate.bluemars.net/ * '''Problem:''' Database schemas are traditionally difficult to change. 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 * '''Problem:''' Stored procedures are difficult to change for some of the same reasons as database schemas (especially the reasons related to corporate policy and politics). Additionally, since they are process, rather than data, they are more likely to require change, and there aren't any great tools, such as refactoring tools for working with them. --DougSwartz 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