Knowing When to Let Go

When I was commuting back and forth to Baltimore from Washington D.C., having a car was absolutely essential. Every morning I drove an hour up, and every evening I drove an hour back. One morning in the middle of highway traffic on the way to Baltimore, my otherwise wonderful used Saab 900 completely died. Without warning, the engine quit on me. I was barely able to veer across three lanes of traffic into the breakdown lane before the car sputtered to a stop. The Saab, which had been great for moving me around, simply wasn't up to the rigors of a daily drive, of more than 100 miles. The long and short of it is that I got the Saab fixed, but because I wanted to make sure a breakdown didn't happen to me again, I bought a new car (actually new).

What's my point here? After building an abstract data model and writing a still fairly abstract DTD (see Chapter 5, XML Design), it's time to get a little less abstract. If XML is in the driver's seat, the relational database and the database schema you instantiate inside it are the tires, suspension, exhaust system, and engine—the vehicle itself. Remember, a car, no matter how much you love it, is replaceable. You might love driving your two-door roadster around when you're 22 and single, but it may be somewhat impractical for dropping Billy and Sue off at soccer practice. Likewise, your relational database and database schema are a vehicle—a way to get your data from point a to point b; they are application specific. Your database and database schema eventually will be scrapped and replaced with something better. Your XML data, on the other hand, will live on.

The important point is not to get bogged down in the database schema design. Do it right, but don't fall into the trap of thinking your database schema has to support everything in your data model. Your SQL schema should first and foremost support the functionality you need in your application now. If you can make small additions to your schema that will make it easier to support functions you think you will probably need in the near future, by all means make them, but don't go overboard.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset