Databases Reference
In-Depth Information
If the type changes in such a way that will cause data type conflicts, Data Studio
Administrator will alert the user that an error exists and offer the potential solution
of casting the column's data on reload.
3.2
Research Approaches
PRISM ( Curino et al. 2008 ) is a tool that is part of a larger project called Panta
Rhei , a joint project between UCLA, UC San Diego, and Politecnico di Milano
investigating schema evolution tools. The PRISM tool is one product of that joint
venture that focuses on relational evolution with two primary goals: allow the user
to specify schema evolution with more semantic clarity and data preservation and
grant multiple versions of the same application concurrent access to the same data.
One contribution of the work on PRISM is a language of schema modifica-
tion operators (SMOs). The SMO language closely resembles the DDL language
in the SQL standard in that it is a textual, declarative language. The two languages
also share some constructs, including “CREATE TABLE” and “ADD COLUMN.”
However, the two languages have two fundamental distinctions.
First, for every statement expressed using the SMO language, there are for-
mal semantics associated with it that describe forward and reverse translation of
schemas. The reverse translation defines, for each statement, the “inverse” action
that effectively undoes the translation. The only SMO statements that lack these
forward and reverse translations are the CREATE TABLE and DROP TABLE oper-
ations; logical formalism for these statements is impossible, since one is effectively
stating that a tuple satisfies a predicate in the before or after state, but that the
predicate itself does not exist in the other state. The work on PRISM describes
“quasi-inverses” of such operations; for instance, if one had copied the table before
dropping it, one could recover the dropped information from other sources. PRISM
offers some support for allowing a user to manually specify such inverses.
Second, SMO and SQL DDL have a different philosophy for what constitutes
an atomic change. SQL DDL has a closure property - one can alter any schema S
into another schema S 0 using a sequence of statements in the language. The state-
ments may be lossy to data, but such a sequence will always be possible. The SMO
statements have a different motivation, namely, each statement represents a common
database restructuring action that requires data migration. Rather than set the unit of
change to be individual changes to individual database elements, the unit of change
in PRISM more closely matches high-level refactoring constructs such as vertical
or horizontal partitioning. For instance, consider the following statements:
MERGE TABLE R, S INTO T
PARTITION TABLE T INTO S WITH T.X < 10, T
COPY TABLE R INTO T
These three statements merge two tables, partition a table into two based on a
predicate, and copy a table, respectively. Each statement and its inverse can be rep-
resented as a logical formula in predicate calculus as well as SQL statements that
 
Search WWH ::




Custom Search