Data Layer Frame

- J.D. Meier, Alex Homer, Jason Taylor, Prashant Bansode, Lonnie Wall, Rob Boucher Jr, Akshay Bogawat

There are several common issues that you must consider as your develop your design. These issues can be categorized into specific areas of the design. The following table lists the common issues for each category where mistakes are most often made.

Category Common issues
BLOB Improperly storing BLOBs in the database instead of the file system.
Using an incorrect type for BLOB data in the database.
Searching and manipulating BLOB data.
Batching Failing to use batching to reduce database round trips.
Holding onto locks for excessive periods when batching.
Connections Improper configuration of connection pooling.
Failing to handle connection timeouts and disconnections.
Performing transactions that span multiple connections.
Holding connections open for excessive periods.
Using individual identities instead of a trusted subsystem to access the database.
Data Format Choosing the wrong data format.
Failing to consider serialization requirements.
Not mapping objects to a relational data store.
Exception Management Not handling data access exceptions.
Failing to shield database exceptions from the original caller.
Failing to log critical exceptions.
Queries Using string concatenation to build queries.
Mixing queries with business logic.
Not optimizing the database for query execution.
Stored Procedures Using an incorrect strategy to pass parameters to stored procedures.
Formatting data for display to users in stored procedures.
Not considering how dynamic SQL in stored procedures can impact performance, security, and maintainability.
Transactions Using the incorrect isolation level.
Using exclusive locks, which can cause contention and deadlocks.
Allowing long-running transactions to block access to data.
Validation Failing to validate and constrain data fields.
Not handling NULL values.
Not filtering for invalid characters.
XML Not considering how to handle extremely large XML data sets.
Not choosing the appropriate technology for XML to relational database interaction.
Failure to set up proper indexes on applications that do heavy querying with XML
Failing to validate XML inputs using schemas.

Last edited Feb 2, 2009 at 5:22 PM by prashantbansode, version 1

Comments

No comments yet.