Databases Reference
In-Depth Information
describe the alteration of schema and movement of data. For instance, the merge
statement above may be represented in SQL as follows:
CREATE TABLE T (the columns from either R or S)
INSERT INTO T
SELECT FROM R
UNION
SELECT FROM S
DROP TABLE R
DROP TABLE S
The second major contribution of PRISM is support for database versioning with
backward and forward compatibility. When starting with version N of a database, if
one uses SMOs to create version N
1 of the database, PRISM will provide at least
one of the following services to applications whenever the SMOs are deemed to be
invertible or the user provides a manual workaround:
C
-
Automatic query rewriting of queries specified against version N into semanti-
cally equivalent queries against schema N
C
1 , and vice versa.
-
Views that expose version N of the schema using version N
C
1 as a base.
The authors examine the entire schema edit history of the database behind Wikipedia
and create a classification of high-level restructuring that covers the vast majority of
changes that have occurred in the history of that data repository.
HECATAEUS ( Papastefanatos et al. 2010 ) focuses on the dependencies between
schema components and artifacts such as views and queries. Recall that commercial
systems have tight restrictions on schema evolution when dependencies exist; one
cannot drop a column from a table if a view has been created that references that
table. Using HECATAEUS, the developer is given fine-grained control over when
to propagate schema changes to an object to the queries, statements, and views that
depend on it.
A central construct in HECATAEUS is an evolution policy ( Papastefanatos et al.
2008 ). Policies may be specified on creation of tables, views, constraints, or queries.
One specifies an evolution policy using a syntactic extension to SQL. For instance,
consider the following table definition:
CREATE TABLE Person (
Id INT PRIMARY KEY,
Name VARCHAR(50),
DateOfBirth DATE,
Address VARCHAR(100),
ON ADD Attribute TO Person THEN Propagate)
This DDL statement constructs a table with a policy that states that any added
attribute should be automatically added as well to any dependent object. For ins-
tance, consider the following view:
CREATE VIEW BobPeople AS
SELECT Id, DateOfBirth, Address FROM Person
WHERE Name D 'Bob'
 
Search WWH ::




Custom Search