Skip to main content

If you don't have an IBM ID and password, register here.

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. This profile includes the first name, last name, and display name you identified when you registered with developerWorks. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

All information submitted is secure.

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

Common data design problems

Data designs are often far from ideal, so learn to spot common problems

Scott W. Ambler, Prectice Leader, Agile Development, Rational Methods Group, IBM, Software Group
Scott W. Ambler is a Practice Leader for Agile Development within the IBM Methods group. He develops process materials, speaks at conferences, and works with IBM clients worldwide to help improve their software processes. Scott is author of several books, listed on his Web site at www.ambysoft.com. Scott is also a recognized Ratonal Thought Leader, whose homepage may be viewed here.

Summary:  The need to work with questionable legacy data designs is a fact of life. With an understanding of the common design problems that Scott W. Ambler illustrates and analyzes in this tip, you can arm yourself in the inevitable struggle against imperfect data designs.

Date:  01 Jul 2001
Level:  Introductory

Comments:  

Existing data designs, and even new data designs, are rarely perfect and are often significantly flawed. The reality is that most developers must tolerate an existing legacy design, one that is often difficult, if not impossible, to change because changes in the existing legacy design would necessitate corresponding changes to the legacy applications that access it. In my last tip, Challenges with legacy data, I explored some of the common problems that you'll run into with the data itself. In this tip I examine common data design problems that you are likely to experience: They're summarized in Table 1. In the next and final tip in this three-tip series, I'll explore potential solutions and tools to address these problems.

Table 1. Database design problems

ProblemExample(s)Implications
Database encapsulation scheme exists
  • Access to the database provided only through stored procedures. For example, to create a new customer you must invoke a specified stored procedure.
  • Access to views on the database is permitted, direct table access is denied.
  • The database must be accessed via an API implemented by a C or COBOL wrapper that in turn accesses the database directly.
  • The database must be accessed via predefined data classes/objects.
  • To enable container-managed persistence (CMP) in an EJB environment, the encapsulation scheme must be made to look like a data source that your persistence container recognizes. Otherwise you'll be forced to take a session-bean managed persistence (SMP) or bean-managed persistence (BMP) approach.
  • The encapsulation scheme will likely increase the response time of database access.
  • The individual components of the encapsulation scheme may not be able to be included as a step in a transaction.
Naming conventionsYour databases may follow different naming conventions from one another, and likely do not follow common Java naming conventions.
  • The deployer(s) will need to understand all relevant naming conventions.
  • Political pressure may be put on your team to follow inappropriate corporate data naming conventions for use with your objects.
Inadequate documentation The documentation for your database is sparse, nonexistent, or out of date.
  • A significant legacy data analysis effort will be required to determine the proper usage of each table, column, and stored procedure within your database.
Original design goals at odds with current project needsThe legacy database was built for internal use by data entry clerks to capture customer orders in batch mode, whereas you are building an 24/7 order-entry application to be deployed over the Internet.
  • Good luck, you'll need it.
Inconsistent key strategyYour database uses natural keys for some tables, surrogate keys in others, and different strategies for surrogates keys when they are used.
  • Developers must understand and then appropriately code support for the various key strategies for their objects.
  • Key-generation code increases in complexity to support the various strategies.
  • Additional source code to validate that natural keys are unique will be required.
  • Relationship-management code increases in complexity because you can't code and then reuse a single approach.

Note: This tip was modified from the Mastering Enterprise JavaBeans 2/e, to be published in autumn of 2001.


Resources

  • Find all the nuts and bolts you need for using Java to develop DB2 Universal Database applications at the Java Enablement with DB2 page.

  • With DB2 Data Joiner middleware, a single SQL statement can access and join tables located across multiple data sources (including databases from vendors other than IBM) without needing to know the source location. With only one API to deal with, application development is easier: You tell your application how to talk to DataJoiner, and DataJoiner talks to all the different databases in your organization.

About the author

Scott W. Ambler is a Practice Leader for Agile Development within the IBM Methods group. He develops process materials, speaks at conferences, and works with IBM clients worldwide to help improve their software processes. Scott is author of several books, listed on his Web site at www.ambysoft.com. Scott is also a recognized Ratonal Thought Leader, whose homepage may be viewed here.

Report abuse help

Report abuse

Thank you. This entry has been flagged for moderator attention.


Report abuse help

Report abuse

Report abuse submission failed. Please try again later.


developerWorks: Sign in

If you don't have an IBM ID and password, register here.


Forgot your IBM ID?


Forgot your password?
Change your password


By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. This profile includes the first name, last name, and display name you identified when you registered with developerWorks. Select information in your developerWorks profile is displayed to the public, but you may edit the information at any time. Your first name, last name (unless you choose to hide them), and display name will accompany the content that you post.

Choose your display name

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

(Must be between 3 – 31 characters.)


By clicking Submit, you agree to the developerWorks terms of use.

 


Rate this article

Comments

Help: Update or add to My dW interests

What's this?

This little timesaver lets you update your My developerWorks profile with just one click! The general subject of this content (AIX and UNIX, Information Management, Lotus, Rational, Tivoli, WebSphere, Java, Linux, Open source, SOA and Web services, Web development, or XML) will be added to the interests section of your profile, if it's not there already. You only need to be logged in to My developerWorks.

And what's the point of adding your interests to your profile? That's how you find other users with the same interests as yours, and see what they're reading and contributing to the community. Your interests also help us recommend relevant developerWorks content to you.

View your My developerWorks profile

Return from help

Help: Remove from My dW interests

What's this?

Removing this interest does not alter your profile, but rather removes this piece of content from a list of all content for which you've indicated interest. In a future enhancement to My developerWorks, you'll be able to see a record of that content.

View your My developerWorks profile

Return from help

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=SOA and web services
ArticleID=86964
ArticleTitle=Common data design problems
publish-date=07012001
author1-email=scott_ambler@ca.ibm.com
author1-email-cc=

Tags

Help
Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

For articles in technology zones (such as Java technology, Linux, Open source, XML), Popular tags shows the top tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), Popular tags shows the top tags for just that product zone.

For articles in technology zones (such as Java technology, Linux, Open source, XML), My tags shows your tags for all technology zones. For articles in product zones (such as Info Mgmt, Rational, WebSphere), My tags shows your tags for just that product zone.

Use the search field to find all types of content in My developerWorks with that tag. Popular tags shows the top tags for this particular content zone (for example, Java technology, Linux, WebSphere). My tags shows your tags for this particular content zone (for example, Java technology, Linux, WebSphere).