Evolutionary database design
Evolutionary Database Design Techniques
As mentioned in the previous section evolutionary methods are iterative in nature and these methods have become immensely popular over last two decades. Evolutionary database design aims to construct the database schema over the course of the project instead of building the entire database schema at the beginning of the project. This method of database design can capture and deal effectively with the changing requirements of projects.
There five evolutionary database design techniques that can aid developers to build their database in an iterative fashion. A brief overview about the five techniques are provided below,
Database Refactoring
Main Article: Database refactoring
Refactoring is the process of making changes to the program without affecting the functionality of the program. Database refactoring is the technique of implementing small changes to the database schema without affecting the functionality and information stored in the database. The main purpose of database refactoring is to improve the database design so that the database is more in-sync with the changing requirements. The user can modify tables, views, stored procedures and triggers. Dependency between the database and external applications make database refactoring a challenge.
Evolutionary Data Modeling
Data modeling is the technique of identifying entities, associating attributes to the entities and deciding the data structure to represent the attributes. In evolutionary data modeling the technique of data modeling is performed in an iterative manner. This kind of data modeling is practiced in an agile environment and it is performed in a collaborative manner.
Database Regression Testing
Whenever a new functionality is added to a system it is essential to verify that the update does not corrupt or render the system unusable. In a database the business logic is implemented in stored procedures, data validation rules and referential integrity and they have to be tested thoroughly when any change is implemented in the system. Regression testing is the process of executing all the test cases whenever a new feature is added to the system. Test First Development (TFD) is a form of regression testing followed in evolutionary database design. The steps involved in TFD approach are,
- Before adding a new function to the system, add a test to the test case suite such that the system fails the test
- Run the tests, either the entire set of test cases or just a subset and ensure that the newly added test does indeed fail
- Update the function such that the test passes
- Run the tests again to ensure that all the tests pass that is system is not broken
Configuration Management of Database Artifacts
Configuration management is a detailed recording of versions and updates that have been applied to any system. Configuration management is useful in rolling back updates and changes which have impacted the system in a negative manner. To ensure that any updates made in database refactoring can be rolled back it is important to maintain database artifacts like Data Definition Language scripts, Data Model files, Reference Data, Stored Procedures, etc. in a configuration management system.
Developer Sandboxes
Sandbox is a fully functional environment in which the system can be built, tested and executed. In order to make changes to the database schema in an evolutionary manner it is ideal for every developer to have his/her own physical sandbox, copy of source code and a copy of database. In a sandbox environment the developer can make changes to the database schema and run tests without affecting the work of other developers and other environments. Once the change has been implemented successfully it is promoted to pre-production environment where in acceptance testing is performed and after the changes pass the acceptance tests it is deployed into production environment.
Advantages and Disadvantages
Advantages
- High quality of database design: In evolutionary database design the developer makes small changes to the database schema in an incremental manner and this achieves a highly optimized database schema.
- Handling Change: In a traditional database approach a lot of time is spent in remodeling and restructuring the database when the requirements change. In evolutionary database technique, the schema of the database is adjusted periodically to keep up with the changing requirements. Hence Evolutionary Database Design technique is better suited in handling the changing requirements.
- Guaranteed working of system at all times: The Evolutionary Database Design approach follows Test First Development model, in which the complete working of a system is tested before and after implementing an update. Hence it is guaranteed that the system always works.
- Compatible with software development: The IT industry is progressing towards agile method of software development and Evolutionary Database Design ensures that data development is in sync with software development.
- Reduce Overall Effort: In an evolutionary environment only the functionality that is required at that moment is implemented and no more.
Disadvantages
- Cultural Impediments: Evolutionary Database Design approach is relatively a newer concept and many well qualified data professionals still advocate the traditional approach. Therefore, most of the databases are still being designed in a serial fashion and Evolutionary Database Design is yet to gain support and traction among experienced data professionals.
- Requires a learning curve: Most of the developers are more familiar with the traditional approach and it takes time to learn evolutionary design as it is not intuitive.
- Complex: When the database has a lot of external dependencies, making changes to the schema becomes all the more complicated as the external dependencies should be updated to cope up with the changes made in the database schema. With the increase in number of dependencies Evolutionary Database Design approach becomes extremely complex.
Comparison between Traditional and Evolutionary Database Design Techniques
Traditional databases were developed by collaboration between business analysts and users. But they demonstrate some design issues in databases such as commercially available databases that were initially developed by experienced individuals in that field but are now being serviced by the database and not data professionals. Traditional database design does not support changes like evolutionary database design. ‘Unfortunately, the traditional data community assumed that evolving database schema is a hard thing to do and as a result never thought through how to do it.[1]’ Any change requested by the user is incorporated in the logical model followed by the physical model and then tested to ensure perfect functionality. Though this is not cumbersome in the case of small databases, the cost, and effort of frequently repeating this procedure for large databases increases exponentially making traditionally designed databases, difficult to evolve.
On the other hand, traditional design is methodological and due to its dependency on ER diagram, and its detailed design phases such as user, logic, and physical we can track data as well as its meaning. In a way , the evolutionary design is better for application developers and traditional design is better for data professionals.
Tools
- LiquiBase
- Red Gate Deployment Manager
- Ruby on Rails Active Record Migration
- Flyway (software)
- Autopatch
See also
- Database management system
- Agile software development
- Data model
- Test-driven development
- Regression testing
- Sandbox (software development)
- Configuration management
References
This article has not been added to any content categories. Please help out by adding categories to it so that it can be listed with similar articles. (September 2016) |
- ^ "Evolutionary Database Design". Retrieved 2016-09-14.