Re-Engineering of Databases#

Database re-engineering is a comprehensive process that involves analyzing, modifying, and optimizing an existing database system to better meet organizational needs.

This process can range from minor structural changes to major overhauls that improve efficiency, scalability, and adaptability. Unlike creating a new database from scratch, re-engineering leverages the existing system, aiming to retain vaulable data and functionality while addressing shortcomings and adapting to new requirements.

Database re-engineering is the application of engineering principles and practices to systematically improve an existing database’s structure, performance, and functionality, with the goal of supporting current and future business objectives.

Why Re-engineer a Database?#

The need to re-engineer a database can arise from a variety of business and technical pressures. As organizations grow and evolve, their databases must keep pace with new demands. Re-engineering is often more cost-effective and less disruptive than replacing the system entirely.

  • Addressing performance bottlenecks or slow response times, such as when reports take hours to generate instead of minutes.

  • Accommodating new business processes or data requirements, for example, adding support for online transactions in a retail database.

  • Integrating with new technologies or platforms, such as cloud services or mobile applications.

  • Improving data integrity and security to meet new regulatory standards.

  • Reducing maintenance costs by simplifying database structures and removing obsolete elements.

  • Supporting scalability for future growth, ensuring the database can handle increased data volumes and user numbers.

Common Triggers for Database Re-engineering#

Business Expansion

Increasing data volumes or new lines of business require the database to scale or adapt.

Example

A logistics company expands to international markets and needs to store multi-currency transactions and new customer data types.

Legacy System Issues

Outdated database technologies or architectures hinder efficiency and compatability.

Example

A university’s student records system built on an old version of Microsoft Access struggles to integrate with modern web portals.

Performance Problems

Slow queries, locking issues, or resource limitations impact user experience.

Example

An online retailer notices checkout times are increasing due to inefficient queries in the orders table.

Regulatory Changes

New compliance requirements necessitate changes in data storage or access.

Example

A healthcare provider must implement stricter privacy controls after the introduction of new data protection laws.

Integration Needs

Connecting with other systems or platforms requires restructuring data models.

Example

A bank wants to integrate its customer database with a new mobile app, requiring changes to authentication and transaction tables.

Key Steps in Databse Re-engineering#

  1. Assessment

    Evaluate the current database for weaknesses, inefficiencies, and areas for improvement.

    Example

    A manufacturing firm may discover that its inventory tables have redundant data and slow queries.

  2. Planning

    Develop a clear strategy, including objectives, resources, and timelines. This may include prioritizing critical business areas, such as sales or compliance.

  3. Design

    Create updated schemas, data models, and workflows based on identified needs.

    Example

    Introducing new tables to support customer loyalty programs.

  4. Implementation

    Apply changes to the database, such as restructuring tablels, optimizing queries, or migrating data.

    Example

    Converting legacy date formats to a standardized ISO format.

  5. Testing

    Validate the new system to ensure data integrity, performance, and compliance. This include running parallel systems to compare outputs.

  6. Deployment

    Roll out the re-engineered database to production, with appropriate monitoring and support.

    Example

    Launching the new system during a low-traffic period to minimize disruption.

Techniques Used in Database Re-Engineering#

Normalization

Reorganizing data to miminize redundancy and improve integrity.

Example

Splitting a customer table that stores multiple addresses into separate address and customer tables.

Denormalization

Introducing controlled redundancy to optimize performance for specific queries.

Example

Combining order and customer data into a single view to speed up reporting.

Schema Refactoring

Modifying table structures, relationships, or constraints.

Example

Changing a text-based status field to an enumerated type for consistency.

Data Migration

Moving data from legacy formats or systems to modern architectures.

Example

Migrating data from a flat-file system to a relational database.

Index Optimization

Creating or adjusting indexes to speed up data retrieval.

Example

Adding an index to the product ID field in an inventory table to reduce search times.

Partitioning

Splitting large tables into smaller, more manageable pieces.

Example

Dividing a transaction table by financial year.

Archiving

Removing or storing historical data to reduce load and improve efficiency.

Example

Moving sales records older than five years into a separate archive database.

Challenges in Database Re-Engineering#

Re-engineering a database is rarely straightforward, and several challenges may arise:

  • Ensuring data integrity and consistency during changes, such as avoiding data loss when merging tables.

  • Minimizing downtime and disruption to business operations, especially for customer-facing systems.

  • Managing legacy code and undocumented features that may not be well understood.

  • Dealing with resistance to change from stakeholders who are accustomed to existing workflows.

  • Balancing short-term costs with long-term benefits, such as investing in new technology versus immediate business needs.

Best Practices#

  • Involve key stakeholders throughout the process to ensure requirements are understood and met.

  • Document all changes and rationale clearly, including schema diagrams and migration plans.

  • Test thoroughly before deployment, using realistic data and scenarios.

  • Maintain regular backups and recovery plans to safeguard against unexpected issues.

  • Monitor performance and user feedback post-implementation to identify further optimization opportunities.

  • Stay informed about new database technologies and standards to future-proof your system.

Elaborated Example Scenario#

Worked example: Re-engineering a retail database

Background: A national retail chain operates hundreds of stores and has an existing sales database built a decade ago. The business faces slow reporting, frequent errors, and plans to introduce online sales and integrate with a new inventory management system.

Assessment

IT staff audit the database and discover:

  • Redundant tables for product categories

  • Missing indexes on sales transaction fields

  • Outdated field types, such as text fields for dates

Planning

A phased approach is chosen:

Phase 1

Refactor product and sales tables

Phase 2

Migrate data to new schemas

Phase 3

Integrate online sales and inventory management

Design

New tables are designed to:

  • Support online transactions

  • Enable real-time inventory updates

  • Streamline reporting by introducing summary tables

Implementation

Changes include:

  • Cleaning and migrating data to new tables

  • Creating indexes for faster query performance

  • Converting date fields to standardized formats

Testing

The new system is tested with:

  • Sample online transactions

  • Inventory synchronization routines

  • Performance benchmarks for reporting

Deployment

The updated database is rolled out during a scheduled maintenance window, with:

  • Real-time monitoring

  • Immediate support for any issues

  • Post-launch review and adjustments

Outcome: The retailer now supports online sales, enjoys faster reporting, and has seamless integration with inventory management. The re-engineered database is more robust, scalable, and easier to maintain.