@@ -4,7 +4,7 @@
5Project:M36 implements a unique feature called "isomorphic schemas" which allow database users to create any number of additional schemas which are completely isomorphic to the original schema.
5Project:M36 implements a unique feature called "isomorphic schemas" which allow database users to create any number of additional schemas which are completely isomorphic to the original schema.
7−Two schemas which are isomorphic have different structure, such as different relation variables, but are actually represent identical information. This means that both schemas contain the same data, but the database structures such as relations are defined distinctly and in such a way as to make the schemas serve potentially different purposes.
7+Two schemas which are isomorphic have different structure, such as different relation variables, but actually represent identical information. This means that both schemas contain the same data, but the database structures such as relations are defined distinctly and in such a way as to make the schemas serve potentially different purposes.
9## Towards Solving Action-at-a-Distance
9## Towards Solving Action-at-a-Distance
@@ -12,7 +12,7 @@ Isomorphic schemas were designed to handle the use-case commonly covered by SQL
13Chris Date elucidates on the numerous caveats involved in updateable SQL views in his "View Updating & Relational Theory" book. Of specific importance is the violation of the "Principle of Orthogonal Design" which states that two relation variables in a database should not represent the same data. Using SQL views as tables clearly violates this principle since a view can only create a duplicate view of the existing data. This same principle is violated even with materialized views.
13Chris Date elucidates on the numerous caveats involved in updateable SQL views in his "View Updating & Relational Theory" book. Of specific importance is the violation of the "Principle of Orthogonal Design" which states that two relation variables in a database should not represent the same data. Using SQL views as tables clearly violates this principle since a view can only create a duplicate view of the existing data. This same principle is violated even with materialized views.
15−Furthermore, SQL views violate the "Principle of Interchangeability" because of the special nature of views. Whether views are updateable or not is at the discretion of the database user. Some SQL views are proveably not updateable such as with summary or report views which intentionally collate data. Therefore, views do not behave identically to table/relation variables.
15+Furthermore, SQL views violate the "Principle of Interchangeability" because of the special nature of views. Whether views are updateable or not is at the discretion of the database user. Some SQL views are proveably not updateable such as with summary or report views which intentionally collate data. Therefore, views do not behave identically to tables/relation variables.
17SQL views violate "The Information Principle" because they represent variable storage which may behave outside the realm of what a table/relation variable could accomplish. A simple example is an SQL view which does *not* change the database state on an UPDATE (ON UPDATE DO NOTHING).
17SQL views violate "The Information Principle" because they represent variable storage which may behave outside the realm of what a table/relation variable could accomplish. A simple example is an SQL view which does *not* change the database state on an UPDATE (ON UPDATE DO NOTHING).
@@ -22,7 +22,7 @@ Isomorphic schemas were designed to address these violations with a mathematical
23## Definition
23## Definition
25−Given a schema A containing relation variables, a given schema B is isomorphic to schema A if-and-only-if all relational expressions which can be written against schema B can be mechanically transformed to perform the an operation on schema A which returns the same result relation.
25+Given a schema A containing relation variables, a given schema B is isomorphic to schema A if-and-only-if all relational expressions which can be written against schema B can be mechanically transformed to perform an operation on schema A which returns the same result relation.
27## The Use Case
27## The Use Case
@@ -39,7 +39,7 @@ Of these use cases, isomorphic schemas only cover the schema complexity and data
40Project:M36 does not purport to be able to represent all possible isomorphic schemas, rather Project:M36 includes a set of "building blocks" from which one can create isomorphic schemas. These building blocks represent transformations needed to shift contexts from one schema to another. Currently, the building blocks are:
40Project:M36 does not purport to be able to represent all possible isomorphic schemas, rather Project:M36 includes a set of "building blocks" from which one can create isomorphic schemas. These building blocks represent transformations needed to shift contexts from one schema to another. Currently, the building blocks are:
42−* rename: a relation variable in schem A may have a different name in schema B
42+* rename: a relation variable in schema A may have a different name in schema B
43* restrict: a relation variable in schema A can be split into two relation variables in schema B given a restriction predicate
43* restrict: a relation variable in schema A can be split into two relation variables in schema B given a restriction predicate
44* union: two relation variables in schema A can be union'd and represent one
44* union: two relation variables in schema A can be union'd and represent one
@@ -52,7 +52,7 @@ Clearly, there are additional limitations placed on the relation variables that
52Project:M36 is the first DBMS to implement isomorphic schemas. By default, each transaction is given a special "main" schema which cannot be deleted. To create a new isomorphic schema, use the "addschema" command:
52Project:M36 is the first DBMS to implement isomorphic schemas. By default, each transaction is given a special "main" schema which cannot be deleted. To create a new isomorphic schema, use the "addschema" command:
55−:addschema <schema name> <isomorphic building block>,...)
55+:addschema <schema name> (<isomorphic building block>,...)
58where the building blocks are one of:
58where the building blocks are one of:
@@ -131,7 +131,7 @@ TutorialD (master/main): :showrelvars
132Note that for schema to be isomorphic, each relation variable in the existing schema must be referenced in the building blocks, otherwise an error is thrown which prevents the creation of a non-isomorphic schema.
132Note that for schema to be isomorphic, each relation variable in the existing schema must be referenced in the building blocks, otherwise an error is thrown which prevents the creation of a non-isomorphic schema.
134−If not all relation variables were referenced in the proposed isomorphism, consider a schema with two relation variables, ```A``` and ```B``` and a foreign key constraint ```X``` between them. If a new schema were to be created with only ```A``` appearing, given an insert to ```A``` which violates the constraint ```X```, it would be possible to issue an insert to ```A``` which would violate a constraint on a relation variable which does not appear to exist. Therefore, such a schema would be not be isomorphic and the schema would violate the both the Closed World Assumption and the Principle of Interchangeability.
134+If not all relation variables were referenced in the proposed isomorphism, then the schema cannot be isomorphic. Consider a schema with two relation variables, ```A``` and ```B``` and a foreign key constraint ```X``` between them. If a new schema were to be created with only ```A``` appearing, given an insert to ```A``` which violates the constraint ```X```, it would be possible to issue an insert to ```A``` which would violate a constraint on a relation variable which does not appear to exist. Therefore, such a schema would be not be isomorphic and the schema would violate the both the Closed World Assumption and the Principle of Interchangeability.
136While it would be possible to create sub-isomorphic schemas mentioning a subset of all relation variables which do not have constraints between them, this has not been implemented because most schemas typically have constraints linking all relation variables together. This could be an area of further research.
136While it would be possible to create sub-isomorphic schemas mentioning a subset of all relation variables which do not have constraints between them, this has not been implemented because most schemas typically have constraints linking all relation variables together. This could be an area of further research.
@@ -163,7 +163,7 @@ Further research into isomorphic schemas could include:
164Many of the additional isomorphisms are mentioned in Date's "View Updating & Relational Theory" book but not named as such.
164Many of the additional isomorphisms are mentioned in Date's "View Updating & Relational Theory" book but not named as such.
166−Project:M36 will continue to be developed in order to implement additional isomorphisms. We offer no proof that *every* isomorphic schema can be represented by these building blocks, but, hopefully, the blocks can be used to build the most interesting/useful schemas.
166+Project:M36 will continue to be developed in order to implement additional isomorphisms. We offer no proof that *every* isomorphic schema can be represented by these building blocks, but, hopefully, the blocks can be used to build the most interesting/useful schemas.
168### Bibliography
168### Bibliography