A database refactoring is a small change to your database schema which improves its design without changing its semantics. There are several categories of database refactorings:
- Structural. A change to the table structure of your database schema.
- Referential integrity. A change which ensures that a referenced row exists within another table and/or that ensures that a row which is no longer needed is removed appropriately.
- Architectural. A change which improves the overall manner in which external programs interact with a database.
- Method. A change which improves the quality of a stored procedure, stored function, or trigger.
- Non-refactoring transformations. A change which changes the semantics of your database schema by adding new elements to it or by modifying existing elements.
- Drop Column
- Drop Table
- Drop View
- Introduce Calculated Column
- Introduce Surrogate Key
- Merge Columns
- Merge Tables
- Move Column
- Rename Column
- Rename Table
- Rename View
- Replace LOB With Table
- Replace Column
- Replace One-to-Many With Associative Table
- Replace Surrogate Key with Natural Key
- Split Column
- Split Table
- Add Parameter
- Consolidate Conditional Expression
- Decompose Conditional
- Extract Method
- Introduce Variable
- Parameterize Methods
- Remove Control Flag
- Remove Middleman
- Remove Parameter
- Rename Method
- Reorder Parameters
- Replace Literal With Table Lookup
- Replace Nested Expression With Guard Clauses
- Replace Parameter With Specific Methods
- Split Temporary Variable
- Substitute Algorithm