List of Refactorings and Transformations

Add CRUD Methods (page 232): Introduce stored procedures (methods) to implement the creation, retrieval, update, and deletion (CRUD) of the data representing a business entity.

Add Foreign Key Constraint (page 204): Add a foreign key constraint to an existing table to enforce a relationship to another table.

Add Lookup Table (page 153): Create a lookup table for an existing column.

Add Mirror Table (page 236): Create a mirror table, an exact duplicate of an existing table in one database, in another database.

Add Parameter (page 278): Existing method needs information that was not passed in before.

Add Read Method (page 240): Introduce a method—in this case, a stored procedure—to implement the retrieval of the data representing zero or more business entities from the database.

Add Trigger For Calculated Column (page 209): Introduce a new trigger to update the value contained in a calculated column.

Apply Standard Codes (page 157): Apply a standard set of code values to a single column to ensure that it conforms to the values of similar columns stored elsewhere in the database.

Apply Standard Type (page 162): Ensure that the data type of a column is consistent with the data type of other similar columns within the database.

Consolidate Conditional Expression (page 283): Combine sequence of conditional tests into a single conditional expression and extract it.

Consolidate Key Strategy (page 168): Choose a single key strategy for an entity and apply it consistently throughout your database.

Decompose Conditional (page 284): Extract methods from the condition.

Drop Column (page 72): Remove a column from an existing table.

Drop Column Constraint (page 172): Remove a column constraint from an existing table.

Drop Default Value (page 174): Remove the default value that is provided by a database from an existing table column.

Drop Foreign Key Constraint (page 213): Remove a foreign key constraint from an existing table so that a relationship to another table is no longer enforced by the database.

Drop Non-Nullable (page 177): Change an existing non-nullable column so that it accepts null values.

Drop Table (page 77): Remove an existing table from the database.

Drop View (page 79): Remove an existing view.

Encapsulate Table With View (page 243): Wrap access to an existing table with a view.

Extract Method (page 285): Turn the code fragment into a method whose name explains the purpose of the method.

Insert Data (page 296): Insert data into an existing table.

Introduce Calculated Column (page 81): Introduce a new column based on calculations involving data in one or more tables.

Introduce Calculation Method (page 245): Introduce a new method, typically a stored function, which implements a calculation that uses data stored within the database.

Introduce Cascading Delete (page 215): Ensure that the database automatically deletes the appropriate “child records” when a “parent record” is deleted.

Introduce Column Constraint (page 180): Introduce a column constraint in an existing table.

Introduce Common Format (page 183): Apply a consistent format to all the data values in an existing table column.

Introduce Default Value (page 186): Let the database provide a default value for an existing table column.

Introduce Hard Delete (page 219): Remove an existing column which indicates that a row has been deleted and instead actually delete the row.

Introduce Index (page 248): Introduce a new index of either unique or non-unique type.

Introduce New Column (page 301): Introduce a new column in an existing table.

Introduce New Table (page 304): Introduce a new table in an existing database.

Introduce Read-Only Table (page 251): Create a read-only data store based on existing tables in the database.

Introduce Soft Delete (page 222): Introduce a flag to an existing table which indicates that a row has been deleted instead of actually deleting the row.

Introduce Surrogate Key (page 85): Replace an existing natural key with a surrogate key.

Introduce Trigger For History (page 227): Introduce a new trigger to capture data changes for historical or audit purposes.

Introduce Variable (page 287): Put the result of the expression, or parts of the expression, in a temporary variable with a name that explains the purpose.

Introduce View (page 306): Create a view based on existing tables in the database.

Make Column Non-Nullable (page 189): Change an existing column so that it does not accept any null values.

Merge Columns (page 92): Merge two or more columns within a single table.

Merge Tables (page 96): Merge two or more tables into a single table.

Migrate Method From Database (page 257): Rehost an existing database method (a stored procedure, stored function, or trigger) in the application(s) which currently invoke it.

Migrate Method To Database (page 261): Rehost existing application logic in the database.

Move Column (page 103): Migrate a table column, with all of its data, to another existing table.

Move Data (page 192): Move the data contained within a table, either all or a subset of its columns, to another existing table.

Parameterize Method (page 278): Create one method that uses a parameter for the different values.

Remove Control Flag (page 289): Use return or break instead of a variable acting as a control flag.

Remove Middle Man (page 289): Get the caller to call the method directly.

Remove Parameter (page 279): Remove a parameter no longer used by the method body.

Rename Column (page 109): Rename an existing table column with a name that explains its purpose.

Rename Method (page 279): Rename an existing method with a name that explains its purpose.

Rename Table (page 113): Rename an existing table with a name that explains its purpose.

Rename View (page 117): Rename an existing view with a name that explains its purpose.

Reorder Parameters (page 281): Change the order of the parameters of a method.

Replace Column (page 126): Replace an existing non-key column with a new one.

Replace LOB With Table (page 120): Replace a large object (LOB) column that contains structured data with a new table or in the same table.

Replace Literal With Table Lookup (page 290): Replace code constants with values from database tables.

Replace Method(s) With View (page 265): Create a view based on one or more existing database methods (stored procedures, stored functions, or triggers) within the database.

Replace Nested Conditional With Guard Clauses (page 292): Remove nested if conditions with a series of separate IF statements.

Replace One-To-Many With Associative Table (page 130): Replace a one-to-many association between two tables with an associative table.

Replace Parameter With Explicit Methods (page 282): Create a separate method for each value of the parameter.

Replace Surrogate Key With Natural Key (page 135): Replace a surrogate key with an existing natural key.

Replace Type Code With Property Flags (page 196): Replace a code column with individual property flags, usually implemented as Boolean columns, within the same table column.

Replace View With Method(s) (page 268): Replace an existing view with one or more existing methods (stored procedures, stored functions, or triggers) within the database.

Split Column (page 140): Split a column into one or more columns within a single table.

Split Table (page 145): Vertically split (e.g., by columns) an existing table into one or more tables.

Split Temporary Variable (page 292): Make a separate temporary variable for each assignment.

Substitute Algorithm (page 293): Replace the body of the method with the new algorithm.

Update Data (page 310): Update data within an existing table.

Use Official Data Source (page 271): Use the official data source for a given entity, instead of the current one you are using.

image
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset