Information Technology Reference
In-Depth Information
TABLE 5-1 Repeatable Database Integration Activities
Activity
Description
Drop database
Drop the database and remove the associated data so that
you can create a new database with the same name.
Create database
Create a new database using Data Definition Language (DDL).
Insert system data
Insert any initial data (e.g., lookup tables) that your system
is expected to contain when delivered.
Insert test data
Insert test data into multiple testing instances.
Migrate database and data
Migrate the database schema and data on a periodic basis (if
you are creating a system based on an existing database).
Set up database instances in
multiple environments
Establish separate databases to support different versions
and environments.
Modify column attributes
and constraints
Modify table column attributes and constraints based on
requirements and refactoring.
Modify test data
Alter test data as needed for multiple environments.
Modify stored procedures
(along with functions and
triggers)
Modify and test your stored procedures many times during
development (you typically need to do this if you are using
stored procedures to provide behavior for your software).
Obtain access to different
environments
Log in to different database environments using an ID, pass-
word, and database identifier(s).
Back up/restore large data
sets
Create specialized functions for especially large data sets or
entire databases.
efficiency of the database—not on simple administration. Table 5-1
identifies database integration activities typically performed by a
project member that can be automated.
Once you have automated these database-related tasks, you'll find
yourself solving problems just by dropping and creating a database
followed by inserting test data. This chapter's examples utilize Ant,
but the principles apply to any build platform that supports communi-
cating with a database. If your build platform is NAnt, Rake, or Maven,
you can do the same things this chapter demonstrates. Listing 5-1 executes
a series of SQL statements to create a database including its related
tables, comments, constraints, and stored procedures. The script also
applies test data for the given environment, such as development or
Search WWH ::




Custom Search