• Squashed APCCM_2017.
1 parent 45f4f6a commit 59520c862d217121894b2f8cffa3b21509aa6201
Nigel Stanger authored on 30 May 2017
Showing 11 changed files
View
4
APCCM_2017/.gitignore 0 → 100644
*.pdf
*.tgz
!Business_School_LS_ID_crop.pdf
View
592
APCCM_2017/APCCM2017_Stanger.bib 0 → 100644
@string{acj = {Australian Computer Journal}}
@string{acmcsur = {ACM Computing Surveys}}
@string{acmq = {ACM Queue}}
@string{acmtocs = {ACM Transactions on Computing Systems}}
@string{acmtods = {ACM Transactions on Database Systems}}
@string{acmtois = {ACM Transactions on Information Systems}}
@string{acmtoit = {ACM Transactions on Internet Technology}}
@string{acmtosem = {ACM Transactions on Software Engineering and Methodology}}
@string{acmtosn = {ACM Transactions on Sensor Networks}}
@string{acmtweb = {ACM Transactions on the Web}}
@string{adt = {Application Development Trends}}
@string{ai = {Artificial Intelligence}}
@string{ajis = {Australasian Journal of Information Systems}}
@string{basist = {Bulletin of the American Society for Information Science and Technology}}
@string{bit = {Behaviour {\&} Information Technology}}
@string{byte = {B{YTE}}}
@string{cacm = {Communications of the ACM}}
@string{ccis = {Communications in Computer and Information Science}}
@string{cj = {The Computer Journal}}
@string{crpit = {Conferences in Research and Practice in Information Techology}}
@string{database = {ACM SIGMIS Database}}
@string{dbj = {Database Journal}}
@string{dbms = {DBMS Magazine}}
@string{dbpd = {Database Programming {\&} Design}}
@string{ddj = {Dr. Dobb's Journal}}
@string{develop = {{d}evelop, The Apple Technical Journal}}
@string{directions = {Apple Directions}}
@string{dke = {Data {\&} Knowledge Engineering}}
@string{dlib = {D-Lib Magazine}}
@string{ejis = {European Journal of Information Systems}}
@string{fm = {First Monday}}
@string{hbr = {Harvard Business Review}}
@string{ibmjrd = {IBM Journal of Research and Development}}
@string{ibmsj = {IBM Systems Journal}}
@string{idt = {Internet Development Trends}}
@string{ieeeahc = {IEEE Annals of the History of Computing}}
@string{ieeec = {IEEE Computer}}
@string{ieeedeb = {IEEE Data Engineering Bulletin}}
@string{ieeeic = {IEEE Internet Computing}}
@string{ieeeis = {IEEE Intelligent Systems}}
@string{ieeepc = {IEEE Pervasive Computing}}
@string{ieees = {IEEE Software}}
@string{ieeesp = {IEEE Spectrum}}
@string{ieeetnn = {IEEE Transactions on Neural Networks}}
@string{ieeetse = {IEEE Transactions on Software Engineering}}
@string{ijast = {International Journal of Applied Software Technology}}
@string{ijcatr = {International Journal of Computer Applications Technology and Research}}
@string{ijgis = {International Journal of Geographical Information Science}}
@string{ijgisold = {International Journal of Geographical Information Systems}}
@string{ijhcs = {International Journal of Human-Computer Studies}}
@string{ijmms = {International Journal of Man-Machine Studies}}
@string{ijseke = {International Journal of Software Engineering and Knowledge Engineering}}
@string{ijswis = {International Journal on Semantic Web and Information Systems}}
@string{ijwet = {International Journal of Web Engineering and Technology}}
@string{ipm = {Information Processing and Management}}
@string{is = {Information Systems}}
@string{isedj = {Information Systems Education Journal}}
@string{isj = {Information Systems Journal}}
@string{ist = {Information and Software Technology}}
@string{jacm = {Journal of the ACM}}
@string{jasist = {Journal of the American Society for Information Science and Technology}}
@string{jdim = {Journal of Digital Information Management}}
@string{jdmm = {Journal of Digital Media Management}}
@string{jiis = {Journal of Intelligent Information Systems}}
@string{jlp = {Journal of Logic Programming}}
@string{jodi = {Journal of Digital Information}}
@string{jot = {Journal of Object Technology}}
@string{jrpit = {Journal of Research and Practice in Information Technology}}
@string{jss = {The Journal of Systems and Software}}
@string{lncs = {Lecture Notes in Computer Science}}
@string{misq = {MIS Quarterly}}
@string{nzjc = {New Zealand Journal of Computing}}
@string{nzjis = {New Zealand Journal of Information Systems}}
@string{nzlimj = {New Zealand Library {\&} Information Management Journal}}
@string{oracle = {Oracle Magazine}}
@string{oss = {OCLC Systems {\&} Services: International Digital Library Perspectives}}
@string{pcbi = {PLoS Computational Biology}}
@string{pnas = {Proceedings of the National Academy of Sciences of the United States of America}}
@string{pvldb = {Proceedings of the VLDB Endowment}}
@string{sciam = {Scientific American}}
@string{sej = {Software Engineering Journal}}
@string{sigmetrics = {ACM SIGMETRICS Performance Evaluation Review}}
@string{sigmod = {ACM SIGMOD Record}}
@string{sigplan = {ACM SIGPLAN Notices}}
@string{sigsoft = {ACM SIGSOFT Software Engineering Notes}}
@string{spe = {Software---Practice and Experience}}
@string{swj = {Semantic Web}}
@string{tkde = {IEEE Transactions on Knowledge and Data Engineering}}
@string{vldb = {The VLDB Journal}}
 
 
@article{Bancilhon.F-1981a-Update,
Author = {Fran{\c c}ois Bancilhon and Nicolas Spyratos},
Doi = {10.1145/319628.319634},
Journal = acmtods,
Month = dec,
Number = {4},
Pages = {557--575},
Title = {Update semantics of relational views},
Volume = {6},
Year = {1981}}
 
@book{Batini.C-1992b-Conceptual,
Address = {Redwood City, California, USA},
Booktitle = {Conceptual Database Design: An Entity-Relationship Approach},
Editor = {Carlo Batini and Stefano Ceri and Shamkant B. Navathe},
Isbn = {978-0-8053-0244-1},
Publisher = {Benjamin/Cummings},
Title = {Conceptual Database Design: An Entity-Relationship Approach},
Year = {1992}}
 
@inproceedings{Behrend.A-2008a-Transformation-based,
Author = {Andreas Behrend and Rainer Manthey},
Crossref = {Hartmann.S-2008a-FoIKs},
Doi = {10.1007/978-3-540-77684-0_18},
Pages = {253--271},
Title = {A transformation-based approach to view updating in stratifiable deductive databases}}
 
@inproceedings{Caroprese.L-2012a-View-update,
Author = {Luciano Caroprese and Irina Trubitsyna and Miros{\l}aw Truszczy{\'n}ski and Ester Zumpano},
Crossref = {delCerro.L-2012a-JELIA},
Doi = {10.1007/978-3-642-33353-8_11},
Pages = {134--146},
Title = {The view-update problem for indefinite databases}}
 
@article{Chen.H-2011a-Survey,
Author = {Haitao Chen and Husheng Liao},
Doi = {10.7763/IJCTE.2011.V3.278},
Journal = {International Journal of Computer Theory and Engineering},
Month = feb,
Number = {1},
Pages = {1793--8201},
Title = {A survey to view update problem},
Url = {http://www.ijcte.org/papers/278-D038.pdf},
Volume = {3},
Year = {2011}}
 
@article{Codd.E-1970a-Relational,
Author = {Edgar F. Codd},
Doi = {10.1145/362384.362685},
Journal = cacm,
Month = jun,
Number = {6},
Pages = {377--387},
Title = {A relational model of data for large shared data banks},
Volume = {13},
Year = {1970}}
 
@incollection{Codd.E-1972a-Completeness,
Author = {Edgar F. Codd},
Crossref = {Rustin.R-1972a-Data},
Pages = {65--98},
Title = {Relational completeness of data base sublanguages}}
 
@inproceedings{Codd.E-1974a-Recent,
Author = {Edgar F. Codd},
Crossref = {Rosenfeld.J-1974a-IFIP},
Pages = {1017--1021},
Title = {Recent investigations in relational data base systems}}
 
@article{Console.L-1995a-Abduction,
Author = {Luca Console and Maria Luisa Sapino and Daniele Theseider Dupr{\'e}},
Doi = {10.1007/BF00961655},
Journal = jiis,
Keywords = {deductive databases, view updates, abduction},
Month = may,
Number = {3},
Pages = {261--280},
Title = {The role of abduction in database view updating},
Volume = {4},
Year = {1995}}
 
@article{Cosmadakis.S-1984a-Updates,
Author = {Stavros S. Cosmadakis and Christos H. Papadimitriou},
Doi = {10.1145/1634.1887},
Journal = jacm,
Month = sep,
Number = {4},
Pages = {742--760},
Title = {Updates of relational views},
Volume = {31},
Year = {1984}}
 
@book{Date.C-2013a-View,
Author = {Chris J. Date},
Booktitle = {View Updating \{\&} Relational Theory: Solving the View Update Problem},
Date-Added = {2016-01-25 02:14:14 +0000},
Date-Modified = {2016-01-25 02:15:43 +0000},
Isbn = {9781449357849},
Publisher = {O'Reilly},
Series = {Theory in Practice},
Title = {View Updating {\&} Relational Theory: Solving the View Update Problem},
Year = {2013}}
 
@book{Date.C-2012a-SQL-and-Relational,
Author = {Chris J. Date},
Booktitle = {SQL and Relational Theory: How to Write Accurate SQL Code},
Date-Added = {2016-01-25 02:12:09 +0000},
Date-Modified = {2016-01-25 02:16:01 +0000},
Edition = {second},
Isbn = {9781449316402},
Publisher = {O'Reilly},
Series = {Theory in Practice},
Title = {SQL and Relational Theory: How to Write Accurate SQL Code},
Year = {2012}}
 
@article{Dayal.U-1982a-Correct,
Author = {Umeshwar Dayal and Philip A. Bernstein},
Doi = {10.1145/319732.319740},
Journal = acmtods,
Month = sep,
Number = {3},
Pages = {381--416},
Title = {On the correct translation of update operations on relational views},
Volume = {7},
Year = {1982}}
 
@article{Gottlob.G-1988a-Properties,
Author = {Georg Gottlob and Paolo Paolini and Roberto Zicari},
Doi = {10.1145/49346.50068},
Journal = acmtods,
Month = dec,
Number = {4},
Pages = {486--524},
Title = {Properties and update semantics of consistent views},
Volume = {13},
Year = {1988}}
 
@article{Hegner.S-2004a-Order-based,
Author = {Stephen J. Hegner},
Doi = {10.1023/A:1026158013113},
Journal = {Annals of Mathematics and Artificial Intelligence},
Month = jan,
Number = {1--2},
Pages = {63--125},
Title = {An order-based theory of updates for closed database views},
Volume = {40},
Year = {2004}}
 
@article{Hull.R-1986a-Relative,
Author = {Richard Hull},
Journal = {SIAM Journal on Computing},
Month = aug,
Number = {3},
Pages = {856--886},
Title = {Relative information capacity of simple relational database schemata},
Volume = {15},
Year = {1986}}
 
@inproceedings{Keller.A-1985a-Algorithms,
Author = {Arthur Michael Keller},
Crossref = {PODS-1985a-Proceedings},
Doi = {10.1145/325405.325423},
Pages = {154--163},
Title = {Algorithms for translating view updates to database updates for views involving selections, projections, and joins}}
 
@article{Keller.A-1986a-Role,
Author = {Arthur Michael Keller},
Doi = {10.1109/MC.1986.1663034},
Journal = ieeec,
Month = jan,
Number = {1},
Pages = {63--73},
Title = {The role of semantics in translating view updates},
Volume = {19},
Year = {1986}}
 
@article{Keller.A-1987a-Comment,
Author = {Arthur Michael Keller},
Doi = {10.1145/27629.214296},
Journal = acmtods,
Month = sep,
Number = {3},
Pages = {521--523},
Title = {Comments on {B}ancilhon and {S}pyratos' ``{U}pdate semantics and relational views''},
Volume = {12},
Year = {1987}}
 
@inproceedings{Kotidis.Y-2006a-Updates,
Annote = {Article 2.},
Author = {Yannis Kotidis and Divesh Srivastava and Yannis Velegrakis},
Crossref = {Liu.L-2006a-ICDE},
Doi = {10.1109/ICDE.2006.167},
Pages = {2},
Read = {1},
Title = {Updates through views: {A} new hope}}
 
@article{Laurent.D-2001a-Monotonic,
Author = {Dominique Laurent and Jens Lechtenb{\"o}rger and Nicolas Spyratos and Gottfried Vossen},
Doi = {10.1007/s007780100055},
Journal = vldb,
Month = dec,
Number = {4},
Pages = {295--315},
Title = {Monotonic complements for independent data warehouses},
Volume = {10},
Year = {2001}}
 
@inproceedings{Lechtenborger.J-2003a-Impact,
Author = {Jens Lechtenb{\"o}rger},
Crossref = {Neven.F-2003a-PODS},
Doi = {10.1145/773153.773159},
Pages = {49--55},
Title = {The impact of the constant complement approach towards view updating}}
 
@article{Lechtenborger.J-2003a-Computation,
Author = {Jens Lechtenb{\"o}rger and Gottfried Vossen},
Doi = {10.1145/777943.777946},
Journal = acmtods,
Month = jun,
Number = {2},
Pages = {175--208},
Title = {On the computation of relational view complements},
Volume = {28},
Year = {2003}}
 
@inproceedings{Liefke.H-2000a-View,
Author = {Hartmut Liefke and Susan B. Davidson},
Crossref = {Kambayashi.Y-2000a-DaWaK},
Doi = {10.1007/3-540-44466-1_12},
Pages = {114--125},
Title = {View maintenance for hierarchical semistructured data},
Url = {http://repository.upenn.edu/cis_papers/125/}}
 
@article{Mantri.R-2010a-Data,
Author = {Rashmi Mantri and Junkang Feng},
Journal = {Nirma University Journal of Engineering and Technology},
Keywords = {information bearing capability, information content, propositional content, semantic conflicts, semantic content, digitalization, semantic theories of information},
Month = jul # {--} # dec,
Number = {2},
Pages = {26--30},
Title = {Data semantic conflicts: {A}n approach based on the notion of `information bearing capability'},
Url = {http://nujet.org.in/index.php/nujet/article/view/96},
Volume = {1},
Year = {2010}}
 
@inproceedings{Masunaga.Y-1984a-Relational,
Author = {Yoshifumi Masunaga},
Crossref = {Dayal.U-1984a-VLDB},
Pages = {309--320},
Title = {A relational database view update translation mechanism},
Url = {http://www.vldb.org/conf/1984/P309.PDF}}
 
@article{Mayol.E-2003a-Consistency,
Author = {Enric Mayol and Ernest Teniente},
Doi = {10.1016/S0169-023X(03)00061-2},
Journal = dke,
Keywords = {deductive databases, integrity constraints, updates, view updating, integrity constraint maintenance},
Month = oct,
Number = {1},
Pages = {61--103},
Title = {Consistency preserving updates in deductive databases},
Volume = {47},
Year = {2003}}
 
@inproceedings{Miller.R-1993a-Information,
Author = {Ren{\'e}e Jean Miller and Y. E. Ioannidis and Raghu Ramakrishnan},
Crossref = {Agrawal.R-1993a-VLDB},
Pages = {120--133},
Title = {The use of information capacity in schema integration and translation},
Url = {http://www.vldb.org/conf/1993/P120.PDF}}
 
@phdthesis{Miller.R-1994a-PhD,
Address = {Madison, Wisconsin, USA},
Author = {Miller, Ren{\'e}e Jean},
School = {University of Wisconsin-Madison},
Title = {Managing Structural Heterogeneity},
Type = {{PhD} thesis},
Url = {http://www.cs.toronto.edu/~miller/papers/dissertation.ps},
Year = {1994}}
 
@techreport{Miller.R-1994a-SIG,
Address = {Madison, Wisconsin, USA},
Author = {Ren{\'e}e Jean Miller and Y. E. Ioannidis and Raghu Ramakrishnan},
Institution = {Department of Computer Sciences, University of Wisconsin-Madison},
Month = jan,
Number = {CS-TR-94-1185},
Title = {Schema intension graphs: {A} formal model for the study of schema equivalence},
Type = {Technical report},
Url = {http://www.cs.toronto.edu/~miller/papers/MIR93c.ps},
Year = {1994}}
 
@article{Miller.R-1994a-Schema,
Author = {Ren{\'e}e Jean Miller and Y. E. Ioannidis and Raghu Ramakrishnan},
Doi = {10.1016/0306-4379(94)90024-8},
Journal = is,
Month = jan,
Number = {1},
Pages = {3--31},
Title = {Schema equivalence in heterogeneous systems: {B}ridging theory and practice},
Url = {http://www.cs.toronto.edu/~miller/papers/MIR94b.ps},
Volume = {19},
Year = {1994}}
 
@article{Pan.W-1996a-Object,
Author = {Wen-Wei Pan and Wei-Pang Yang},
Doi = {10.1016/S0020-0255(96)00125-9},
Journal = {Information Sciences},
Month = nov,
Number = {1--2},
Pages = {29--48},
Title = {An object model at conceptual level to support updatable views on object-oriented databases},
Volume = {95},
Year = {1996}}
 
@inproceedings{Scholl.M-1991a-Updatable,
Author = {Marc H. Scholl and Christian Laasch and Markus Tresch},
Crossref = {Delobel.C-1991a-DOOD},
Doi = {10.1007/3-540-55015-1_10},
Keywords = {object-oriented databases, object model, object algebra, views, view updates},
Pages = {189--207},
Title = {Updatable views in object-oriented databases},
Url = {https://kops.uni-konstanz.de/bitstream/handle/123456789/6438/Updatable_Views_in_Object_Oriented_Databases_1991.pdf}}
 
@article{Shu.H-2000a-Using,
Author = {Hua Shu},
Doi = {10.1023/A:1008726123320},
Journal = jiis,
Month = sep,
Number = {2},
Pages = {147--173},
Title = {Using constraint satisfaction for view update},
Volume = {15},
Year = {2000}}
 
@techreport{Qian.X-1995a-Correct,
Address = {Menlo Park, California, USA},
Author = {Xiaolei Qian},
Institution = {Computer Science Laboratory, SRI International},
Month = jul,
Number = {SRI-CSL-95-08},
Title = {Correct schema transformations},
Type = {Technical report},
Url = {http://www.csl.sri.com/reports/postscript/sri-csl-95-08.ps.gz},
Year = {1995}}
 
@article{Wang.L-2006a-Updating,
Author = {Ling Wang and Elke A. Rundensteiner and Murali Mani},
Doi = {10.1016/j.datak.2005.07.003},
Journal = dke,
Keywords = {XML view, XQuery, update translatability},
Month = sep,
Number = {3},
Pages = {236--298},
Title = {Updating {XML} views published over relational databases: {T}owards the existence of a correct update mapping},
Volume = {58},
Year = {2006}}
 
@article{Wang.X-2005a-SIG,
Author = {Xi Wang and Junkang Feng and Hongwei Xu},
Journal = {Computing and Information Systems},
Month = oct,
Number = {3},
Pages = {article 9},
Title = {A study of the schema intension graphs model ({SIG}) approach to the relative information capacity ({RIC}) of data schemas},
Url = {http://cis.uws.ac.uk/research/journal/V9/V9N3/xiwang.doc},
Volume = {9},
Year = {2005}}
 
@article{Xu.K-2009a-Defining,
Author = {Kaibo Xu and Junkang Feng and Malcolm Crowe},
Doi = {10.1007/s10115-008-0129-3},
Journal = {Knowledge and Information Systems},
Keywords = {information content, reasoning, data semantics, semantic information theory, inference rules},
Month = jan,
Number = {1},
Pages = {29--59},
Title = {Defining the notion of `information content' and reasoning about it in a database},
Volume = {18},
Year = {2009}}
 
%% crossrefs
 
@proceedings{Agrawal.R-1993a-VLDB,
Address = {Dublin, Ireland},
Booktitle = {Proceedings of the Nineteenth International Conference on Very Large Data Bases (VLDB)},
Editor = {Rakesh Agrawal and Se{\'a}n Baker and David A. Bell},
Isbn = {978-1-55860-152-X},
Month = aug # {~24--27},
Publisher = {Morgan Kaufmann},
Title = {Proceedings of the Nineteenth International Conference on Very Large Data Bases (VLDB)},
Year = {1993}}
 
@proceedings{Delobel.C-1991a-DOOD,
Address = {Munich, Germany},
Booktitle = {Proceedings of the 2nd International Conference on Deductive and Object-Oriented Databases (DOOD'91)},
Doi = {10.1007/3-540-55015-1},
Editor = {Claude Delobel and Michael Kifer and Yoshifumi Masunaga},
Isbn = {978-3-540-55015-0},
Month = dec # {~16--18},
Publisher = {Springer},
Series = lncs,
Title = {Proceedings of the 2nd International Conference on Deductive and Object-Oriented Databases (DOOD'91)},
Volume = {566},
Year = {1991}}
 
@proceedings{Dayal.U-1984a-VLDB,
Address = {Singapore},
Booktitle = {Proceedings of the Tenth International Conference on Very Large Data Bases (VLDB 1984)},
Editor = {Umeshwar Dayal and Gunter Schlageter and Lim Huat Seng},
Isbn = {0-934613-16-8},
Month = aug # {~27--31},
Publisher = {Morgan Kaufmann},
Title = {Proceedings of the Tenth International Conference on Very Large Data Bases (VLDB 1984)},
Year = {1984}}
 
@proceedings{delCerro.L-2012a-JELIA,
Address = {Toulouse, France},
Booktitle = {Proceedings of the Thirteenth European Conference on Logics in Artificial Intelligence (JELIA 2012)},
Doi = {10.1007/978-3-642-33353-8},
Editor = {Luis Fari{\~n}as del Cerro and Andreas Herzig and J{\'e}r{\^o}me Mengin},
Isbn = {978-3-642-33352-1},
Month = sep # {~26--28},
Series = lncs,
Title = {Proceedings of the Thirteenth European Conference on Logics in Artificial Intelligence (JELIA 2012)},
Volume = {7519},
Year = {2012}}
 
@proceedings{Hartmann.S-2008a-FoIKs,
Address = {Pisa, Italy},
Booktitle = {Proceedings of the 5th International Symposium on Foundations of Information and Knowledge Systems (FoIKS 2008)},
Doi = {10.1007/978-3-540-77684-0},
Editor = {Sven Hartmann and Gabriele Kern-Isberner},
Isbn = {978-3-540-77683-3},
Month = feb # {~11--15},
Publisher = {Springer},
Series = lncs,
Title = {Proceedings of the 5th International Symposium on Foundations of Information and Knowledge Systems (FoIKS 2008)},
Volume = {4932},
Year = {2008}}
 
@proceedings{Kambayashi.Y-2000a-DaWaK,
Address = {London, UK},
Booktitle = {Proceedings of the Second International Conference on Data Warehousing and Knowledge Discovery (DaWaK 2000)},
Doi = {10.1007/3-540-44466-1},
Editor = {Yahiko Kambayashi and Mukesh K. Mohania and A. Min Tjoa},
Isbn = {3-540-67980-4},
Month = sep # {~4--6},
Publisher = {Springer},
Series = lncs,
Title = {Proceedings of the Second International Conference on Data Warehousing and Knowledge Discovery (DaWaK 2000)},
Volume = {1874},
Year = {2000}}
 
@proceedings{Liu.L-2006a-ICDE,
Address = {Atlanta, Georgia, USA},
Booktitle = {Proceedings of the 22nd International Conference on Data Engineering (ICDE 2006)},
Editor = {Ling Liu and Andreas Reuter and Kyu-Young Whang and Jianjun Zhang},
Isbn = {0-7695-2570-9},
Month = {3--8~} # apr,
Publisher = {IEEE Computer Society},
Title = {Proceedings of the 22nd International Conference on Data Engineering (ICDE 2006)},
Year = {2006}}
 
@proceedings{Neven.F-2003a-PODS,
Address = {San Diego, California, USA},
Booktitle = {Proceedings of the Twenty-Second ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems (PODS 2003)},
Editor = {Frank Neven and Catriel Beeri and Tova Milo},
Isbn = {1-58113-670-6},
Month = jun # {~9--12},
Organization = {ACM},
Title = {Proceedings of the Twenty-Second ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems (PODS 2003)},
Year = {2003}}
 
@proceedings{PODS-1985a-Proceedings,
Address = {Portland, Oregon, USA},
Booktitle = {Proceedings of the Fourth ACM SIGACT-SIGMOD Symposium on Principles of Database Systems (PODS '85)},
Isbn = {0-89791-153-9},
Month = mar # {~25--27},
Publisher = {ACM},
Title = {Proceedings of the Fourth ACM SIGACT-SIGMOD Symposium on Principles of Database Systems (PODS '85)},
Year = {1985}}
 
@proceedings{Rosenfeld.J-1974a-IFIP,
Address = {Stockholm, Sweden},
Booktitle = {Proceedings of the IFIP Congress '74 (Information Processing '74)},
Editor = {Jack L. Rosenfeld},
Isbn = {978-0-7204-2803-3},
Month = aug # {~5--10},
Publisher = {North-Holland},
Title = {Proceedings of the IFIP Congress '74 (Information Processing '74)},
Year = {1974}}
 
@book{Rustin.R-1972a-Data,
Address = {Englewood Cliffs, New Jersey, USA},
Booktitle = {Data Base Systems},
Editor = {Randall Rustin},
Publisher = {Prentice-Hall},
Series = {Courant Computer Science Symposia Series 6},
Title = {Data Base Systems},
Year = {1972}}
View
1240
APCCM_2017/APCCM2017_Stanger.tex 0 → 100644
% APCCM2017_Stanger.tex
% Author: Nigel Stanger
%
% Built using Tex Live 2016 distribution.
% All packages except perhaps PGF should be in the standard TeX Live packages.
% REQUIRES PGF v3.0 or later for diagrams (custom arrow tips).
% REQUIRES TeX Gyre fonts (newtxmath package).
% NOTE: the last two figures use a small amount of colour.
%
% Revisions: 22 Aug 2016 Initial submission.
% 07 Nov 2016 Camera-ready version.
 
%%
%% MAX 10 PAGES (all material)
%%
 
\documentclass{sig-alternate-05-2015}
 
\usepackage{balance}
\usepackage{newtxtext}
\usepackage{newtxmath}
\usepackage{bm}
\usepackage{subfig}
\usepackage{booktabs}
 
\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{graphs}
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{calc}
\usetikzlibrary{arrows}
 
 
% Relational algebra operators
\newcommand{\RelRestrict}{\ensuremath{\sigma}}
\newcommand{\RelProject}{\ensuremath{\pi}}
\newcommand{\RelUnion}{\ensuremath{\cup}}
\newcommand{\RelIntersect}{\ensuremath{\cap}}
 
 
% "empty" arrow tip
\pgfarrowsdeclare{:}{:}{}{}
% custom bar arrow tip, offset from end of line (use "empty" tip at line ends if no >)
\tikzset{crossbar/.tip={|[scale width=1.75,sep=0.25em]}}
% various edge styles for SIG diagrams in TikZ
\tikzset{
function/.style={arrows={->}},
injection/.style={arrows={<-}},
total/.style={arrows={:{crossbar}-}},
surjection/.style={arrows={-{crossbar}:}},
bijection/.style={arrows={<{crossbar}-{crossbar}>}},
projection/.style={arrows={:{crossbar}-{crossbar}>}},
projection left/.style={arrows={:{crossbar}-{crossbar}>},edge label={\scriptsize\(\RelProject\)}},
projection right/.style={arrows={:{crossbar}-{crossbar}>},edge label'={\scriptsize\(\RelProject\)}},
selection left/.style={arrows={<-{crossbar}>},edge label={\scriptsize\(\RelRestrict\)}},
selection right/.style={arrows={<-{crossbar}>},edge label'={\scriptsize\(\RelRestrict\)}},
funcdep left/.style={arrows={:{crossbar}-{crossbar}>},edge node={node[sloped,midway,above] {\scriptsize\emph{key}}}},
funcdep right/.style={arrows={:{crossbar}-{crossbar}>},edge node={node[sloped,midway,below] {\scriptsize\emph{key}}}},
surtotal/.style={arrows={:{crossbar}-{crossbar}:}},
input keep/.style={blue,thick},
input delete/.style={blue!40,thick,dashed},
output/.style={red,thick},
output temp/.style={red,thick,dashed},
path 1/.style={green!60!black,thick},
path 2/.style={orange,thick},
}
% projection and selection edge annotations for TikZ
\newcommand{\ProjectionAnnotation}[3][]{%
\path (#2) to node[above,#1] {\scriptsize\(\RelProject\)} (#3);%
}
\newcommand{\SelectionAnnotation}[3][]{%
\path (#2) to node[above,#1] {\scriptsize\(\RelRestrict\)} (#3);%
}
 
 
\newcounter{constraint}
 
% misc
% \newcommand{\todo}[1]{\textbf{!!TODO!!} {[#1]}}
 
% commonly used elements
\newcommand{\LS}{\ensuremath{\mathit{LS}}}
\newcommand{\NLS}{\ensuremath{\mathit{NLS}}}
\newcommand{\LSsub}{\ensuremath{\mathit{L}}}
\newcommand{\NLSsub}{\ensuremath{\mathit{N}}}
\newcommand{\Sno}{\ensuremath{\mathit{Sno}}}
\newcommand{\Sname}{\ensuremath{\mathit{Sname}}}
\newcommand{\Status}{\ensuremath{\mathit{Status}}}
\newcommand{\City}{\ensuremath{\mathit{City}}}
 
\newcommand{\Type}[1]{\ensuremath{T_{#1}}}
\newcommand{\TT}[1]{\ensuremath{T_{\{#1\}}}}
 
\newcommand{\CityLondon}{\ensuremath{\{\City\colon\allowbreak\text{`\emph{London}'}\}}}
\newcommand{\TCityMinusLondon}{\ensuremath{\Type{\City} \setminus \CityLondon}}
\newcommand{\TSSC}{\ensuremath{\Type{\Sname} \times \Type{\Status} \times \Type{\City}}}
\newcommand{\TSSL}{\ensuremath{\Type{\Sname} \times \Type{\Status} \times \CityLondon}}
\newcommand{\TSSNL}{\ensuremath{\Type{\Sname} \times \Type{\Status} \times (\TCityMinusLondon)}}
 
\newcommand{\TLSPlusNLS}{\ensuremath{\Type{\LS} + \Type{\NLS}}}
\newcommand{\TTLSPlusNLS}{\ensuremath{\TT{\LS} + \TT{\NLS}}}
\newcommand{\TLSPlusNLSsub}{\ensuremath{\Type{\LSsub} + \Type{\NLSsub}}}
\newcommand{\TTLSPlusNLSsub}{\ensuremath{\TT{\LSsub} + \TT{\NLSsub}}}
 
\newcommand{\StackTLSPlusNLS}{\ensuremath{\begin{array}{c}\Type{\LS}\,+ \\ \Type{\NLS}\end{array}}}
\newcommand{\StackTTLSPlusNLS}{\ensuremath{\begin{array}{c}\TT{\LS}\,+ \\ \TT{\NLS}\end{array}}}
\newcommand{\StackTLSPlusNLSsub}{\ensuremath{\begin{array}{c}\Type{\LSsub}\,+ \\ \Type{\NLSsub}\end{array}}}
\newcommand{\StackTTLSPlusNLSsub}{\ensuremath{\begin{array}{c}\TT{\LSsub}\,+ \\ \TT{\NLSsub}\end{array}}}
\newcommand{\StackTSSC}{\ensuremath{\begin{array}{c}\Type{\Sname}\,\times \\ \Type{\Status} \times \Type{\City}\end{array}}}
\newcommand{\StackTSSL}{\ensuremath{\begin{array}{c}\Type{\Sname} \times \Type{\Status}\,\times \\ \CityLondon\end{array}}}
\newcommand{\StackTSSNL}{\ensuremath{\begin{array}{c}\Type{\Sname} \times \Type{\Status}\,\times \\ (\TCityMinusLondon)\end{array}}}
\newcommand{\StackTCityMinusLondon}{\ensuremath{\begin{array}{c}\Type{\City}\,\setminus \\ \CityLondon\end{array}}}
 
\newcommand{\SC}[1]{\ensuremath{\mathcal{S}_{#1}}}
 
% dominates
\newcommand{\Dominates}[2]{\ensuremath{#2 \preceq #1}}
\newcommand{\Equivalent}[2]{\ensuremath{#1 \equiv #2}}
 
% SIG notation (in text)
\newcommand{\Sedge}[1]{\ensuremath{\sigma_{\textrm{#1}}}}
\newcommand{\SedgeP}[1]{\ensuremath{\sigma_{\textrm{#1}}^{'}}}
 
\newcommand{\medmid}{\raise.125ex\hbox{\scalebox{1}[0.75]{$\mid$}}}
 
% General SIG edges for use in formulas.
% Adapted from: http://tex.stackexchange.com/questions/96330/adding-symbols-at-the-ends-of-a-horizontal-line
\makeatletter
\newlength{\@annotskipleft}
\newlength{\@annotskipright}
% #1 = left edge component
% #2 = right edge component
% #3 = left bar annotation
% #4 = right bar annotation
\newcommand\@sig@edge[4]{%
\let\@middle\joinrel%
\ifx#1\relbar%
\@annotskipleft=.3em%
% scrunch up the bare line so it's similar length to \long...arrow
\ifx#2\relbar\def\@middle{\joinrel\joinrel\relbar\joinrel\joinrel}\fi%
\else%
% arrows need a little more clearance
\@annotskipleft=.4em%
\fi%
\ifx#2\relbar\@annotskipright=.3em\else\@annotskipright=.4em\fi%
\mathrel{\ooalign{$#1\@middle#2$\cr\hskip\@annotskipleft$#3$\hfil$#4$\hskip\@annotskipright\cr}}%
}
 
% 0 = nothing
% 1 = bar
% 2 = arrowhead
% 3 = both
\def\@sigedge#1#2{%
\ifcase\numexpr#1*4+#2\relax%
\@sig@edge{\relbar}{\relbar}{}{}\or % 00 = -----
\@sig@edge{\relbar}{\relbar}{}{\medmid}\or % 01 = ---+-
\@sig@edge{\relbar}{\rightarrow}{}{}\or % 02 = ---->
\@sig@edge{\relbar}{\rightarrow}{}{\medmid}\or % 03 = ---+>
\@sig@edge{\relbar}{\relbar}{\medmid}{}\or % 10 = -+---
\@sig@edge{\relbar}{\relbar}{\medmid}{\medmid}\or % 11 = -+-+-
\@sig@edge{\relbar}{\rightarrow}{\medmid}{}\or % 12 = -+-->
\@sig@edge{\relbar}{\rightarrow}{\medmid}{\medmid}\or % 13 = -+-+>
\@sig@edge{\leftarrow}{\relbar}{}{}\or % 20 = <----
\@sig@edge{\leftarrow}{\relbar}{}{\medmid}\or % 21 = <--+-
\@sig@edge{\leftarrow}{\rightarrow}{}{}\or % 22 = <--->
\@sig@edge{\leftarrow}{\rightarrow}{}{\medmid}\or % 23 = <--+>
\@sig@edge{\leftarrow}{\relbar}{\medmid}{}\or % 30 = <+---
\@sig@edge{\leftarrow}{\relbar}{\medmid}{\medmid}\or % 31 = <+-+-
\@sig@edge{\leftarrow}{\rightarrow}{\medmid}{}\or % 32 = <+-->
\@sig@edge{\leftarrow}{\rightarrow}{\medmid}{\medmid} % 33 = <+-+>
\fi%
}
 
\newcommand{\sigedge}[1]{\ensuremath{\@sigedge#1}}
\makeatother
 
\newcommand{\Edge}{\sigedge{00}}
\newcommand{\Total}{\sigedge{10}}
\newcommand{\Surjective}{\sigedge{01}}
\newcommand{\SurTotal}{\sigedge{11}}
\newcommand{\Functional}{\sigedge{02}}
\newcommand{\Injective}{\sigedge{20}}
\newcommand{\Bijective}{\sigedge{33}}
 
% Hack to get the overset symbols to appear at the right height.
% \smash removes the spacing around the operator, hence \mathop.
\newcommand{\LabelledEdge}[2]{\mathop{\overset{\raisebox{0.3em}{\scriptsize\ensuremath{#2}}}{\smash[t]{#1}}}}
\newcommand{\ProjectionEdge}{\LabelledEdge{\sigedge{13}}{\RelProject}}
\newcommand{\SelectionEdge}{\LabelledEdge{\sigedge{23}}{\RelRestrict}}
\newcommand{\TrivialProjection}{\ensuremath{\LabelledEdge{\Bijective}{\RelProject}}}
\newcommand{\TrivialSelection}{\ensuremath{\LabelledEdge{\Bijective}{\RelRestrict}}}
\newcommand{\KeyEdge}{\ensuremath{\LabelledEdge{\sigedge{13}}{\mathit{key}}}}
 
% Constraints.
\newcommand{\Constraint}[2][]{C\ensuremath{_{#2}\ifx&#1&\else^{#1}\fi}}
\newenvironment{ConstraintList}[1][]{%
\begin{list}{%
\bfseries%
\ifx&#1&%
\Constraint{\ensuremath{\bm{\arabic{constraint}}}}%
\else%
\Constraint[\ensuremath{\bm{#1}}]{\ensuremath{\bm{\arabic{constraint}}}}%
\fi%
}%
{\usecounter{constraint}}%
}{\end{list}}
 
 
\hyphenation{co-pied sche-ma}
 
\pagestyle{empty}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\begin{document}
 
\CopyrightYear{2017}
\setcopyright{acmlicensed}
\conferenceinfo{ACSW '17,}{January 31-February 03, 2017, Geelong, Australia}
\isbn{978-1-4503-4768-6/17/01}\acmPrice{\$15.00}
\doi{http://dx.doi.org/10.1145/3014812.3014847}
 
\title{Characterising relational view updates \\ using relative information capacity}
 
\numberofauthors{1}
\author{
\alignauthor Nigel Stanger \\
\affaddr{Department of Information Science, University of Otago}\\
\affaddr{Dunedin, New Zealand}\\
\email{nigel.stanger@otago.ac.nz}
}
 
\begin{CCSXML}
<ccs2012>
<concept>
<concept_id>10002951.10002952.10002953.10002955</concept_id>
<concept_desc>Information systems~Relational database model</concept_desc>
<concept_significance>500</concept_significance>
</concept>
<concept>
<concept_id>10002951.10002952.10003190.10003205</concept_id>
<concept_desc>Information systems~Database views</concept_desc>
<concept_significance>500</concept_significance>
</concept>
<concept>
<concept_id>10003752.10010070.10010111.10010112</concept_id>
<concept_desc>Theory of computation~Data modeling</concept_desc>
<concept_significance>300</concept_significance>
</concept>
<concept>
<concept_id>10003752.10010070.10010111.10011733</concept_id>
<concept_desc>Theory of computation~Data integration</concept_desc>
<concept_significance>300</concept_significance>
</concept>
</ccs2012>
\end{CCSXML}
 
\ccsdesc[500]{Information systems~Relational database model}
\ccsdesc[500]{Information systems~Database views}
\ccsdesc[300]{Theory of computation~Data modeling}
\ccsdesc[300]{Theory of computation~Data integration}
 
\maketitle
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\begin{abstract}
In 2013, Chris Date published a book about the view update problem in the context of the Relational Model. He presented several detailed examples of different varieties of view updates and characterised their behaviour, in the process deriving a set of principles for updating views based on the notion of \emph{information equivalence} of view schemas. In this paper we discuss work in progress that examines how Date's operational definition of information equivalence can be formally characterised using Hull's concept of \emph{relative information capacity}. As a proof of concept, we use an extension of Miller's \emph{schema intension graph} formalism to model the information equivalence of Date's restriction view example.
\end{abstract}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\keywords{view update problem, information equivalence, relative information capacity, schema intension graph, schema transformation}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\section{Introduction}
 
\noindent The view update problem is a long-standing problem of great practical significance in the database field. Date \cite{Date.C-2013a-View} likens it to significant unsolved problems in other fields such as the Riemann Hypothesis in mathematics or ``\(P = \mathit{NP}\)?'' in computational complexity theory. In his 2013 book \cite{Date.C-2013a-View} Date developed a set of principles for updating relational views, based on the notion of \emph{information equivalence}. However, that notion was defined more operationally than formally.
 
View updating is a special case of schema translation: we have one schema comprising a set of views, another schema comprising a set of base relations, and we need to translate updates from one to the other.\footnote{These schemas may be actually separate, or more likely may be sub-schemas of a larger database schema, with effective separation achieved via the access privilege mechanism.} It therefore makes sense that formalisms developed to characterise schema translations are also applicable to view updates. We propose to use Hull's notion of \emph{relative information capacity} \cite{Hull.R-1986a-Relative} as a means to formally characterise the information equivalence of the schemas that make up a given view configuration.
 
In particular, we develop an extension of Miller's \emph{schema intension graph} (SIG) formalism, which was originally designed to facilitate the comparison of relative information capacity across schemas. We first extend the SIG formalism with relevant relational concepts such as relation types, tuple types, and key constraints. We then show a proof of concept of how this extended formalism can be used to model the information equivalence of a view configuration, by applying it to Date's example of disjoint restriction views \cite{Date.C-2013a-View}. Our results are consistent with Date's operational characterisation of information equivalence for this example.
 
In Section~\ref{sec-view-update-problem}, we briefly review the view update problem and relevant research, and in Section~\ref{sec-relations-types} we introduce some core concepts that are used throughout the remainder of the paper. In Section~\ref{sec-info-capacity} we discuss relative information capacity and the SIG formalism, then explain in Section~\ref{sec-relational-sigs} how to extend the SIG formalism to more precisely model a relational schema. In Section~\ref{sec-characterising} we analyse Date's restriction view example \cite{Date.C-2013a-View} in detail, and characterise the information equivalence of its various sub-schemas. We discuss conclusions and future work in Section~\ref{sec-conclusion}.
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\section{The view update problem}
\label{sec-view-update-problem}
 
\noindent The view update problem was first discussed in the relational context by Codd in 1974 \cite{Codd.E-1974a-Recent}. When an update operation is applied to a view, it needs to be translated into corresponding updates on the base relations from which the view is derived \cite{Keller.A-1985a-Algorithms}. Sometimes there are multiple translations that can produce the desired view update, but produce different---possibly incompatible---changes in the base relations. Worse, there may be translations that have side effects (e.g., for some views based on joins), which produce a different result in the view than if the updates were applied directly to an equivalent base relation \cite{Keller.A-1985a-Algorithms}. The problem then is how to choose the most appropriate translation. As yet there has been no solution that completely and automatically resolves this ambiguity.
 
There has been considerable research into this problem over the last four decades, and numerous different approaches have been suggested in the context of relational, non-relational (e.g., \cite{Liefke.H-2000a-View,Pan.W-1996a-Object,Scholl.M-1991a-Updatable,Wang.L-2006a-Updating}), and deductive databases (e.g., \cite{Behrend.A-2008a-Transformation-based,Caroprese.L-2012a-View-update,Console.L-1995a-Abduction,Mayol.E-2003a-Consistency}). We shall now briefly review some key developments in the relational context. We leave consideration of non-relational and deductive contexts for future work.
 
Banchilhon and Spyratos proposed the concept of \emph{constant complement} \cite{Bancilhon.F-1981a-Update} in 1981. The \emph{complement} of a view describes all the information from the original database that does not appear in the view, so composing a view with its complement provides enough information to reconstruct the original database. Keeping the complement invariant under view update facilitates translation construction. This is a useful approach that has been developed further by other authors \cite{Hegner.S-2004a-Order-based,Lechtenborger.J-2003a-Impact}, but it has been shown that there are reasonable translations that cannot be carried out under constant complement \cite{Keller.A-1987a-Comment}. Computing the complement of a view is also difficult, and several authors have worked on more efficient algorithms \cite{Cosmadakis.S-1984a-Updates,Laurent.D-2001a-Monotonic,Lechtenborger.J-2003a-Computation}. Finally, this approach is purely structural in nature and does not consider the semantics of the schema, which is necessary to properly resolve translation ambiguity \cite{Keller.A-1986a-Role}.
 
Gottlob et al.\ generalised the idea of constant complement into the class of \emph{consistent views} \cite{Gottlob.G-1988a-Properties}. They define consistent views as having the property that ``if the effect of a view update on a view state is determined, then the effect of the corresponding database update is unambiguously determined'' \cite{Gottlob.G-1988a-Properties}. However, there are still reasonable views that are not consistent under this definition, and this approach again does not consider schema semantics.
 
Keller noted that semantic information is essential in order to choose an appropriate translation \cite{Keller.A-1986a-Role}, and suggested that the da\-ta\-base administrator (DBA) could provide this at view definition time \cite{Keller.A-1985a-Algorithms}. Masunaga argued, however, that this would be insufficient to completely resolve ambiguity, and suggested collecting further semantic information from end users at update time \cite{Masunaga.Y-1984a-Relational}. Shu \cite{Shu.H-2000a-Using} discussed an interesting approach to this kind of information gathering, by treating the problem of generating suitable view translations as a constraint satisfaction problem. This enabled constraints to be added incrementally at view update time. However, while collecting such information from the DBA seems reasonable, collecting it from the end user at update time could be seen as too burdensome, and could impact the usability of query interfaces. It is also unclear which information needs to be captured, and how best to capture it.
 
Kotidis et al.\ \cite{Kotidis.Y-2006a-Updates} discussed a different approach to avoiding side effects in view translations. They proposed creating a materialised copy of the view that could be updated directly, rather than mapping updates from the (virtual) view onto its underlying base tables. Clearly this enables the view to be updated without translation side effects, but does imply that the physical manifestation (extension) of the view may no longer match its defining query (intension).
 
Finally, Date has published several books on the theoretical foundations of the Relational Model over the last decade, including one specifically targeting the view update problem \cite{Date.C-2013a-View} (indeed, the book is ambitiously subtitled ``Solving the View Update Problem''). He developed a comprehensive set of rules for updating views in a relational context, supported by an array of worked examples. Date advocated explicitly stating all relevant constraints at view creation time, similar to the information gathering approaches discussed above \cite{Keller.A-1985a-Algorithms,Masunaga.Y-1984a-Relational,Shu.H-2000a-Using}. He argued that if a complete set of constraints was available, then ambiguity would be diminished or eliminated, and it would then be possible to automatically generate a set of appropriate \emph{compensatory rules} to automatically manage the view update process. (Compensatory rules are similar in principle to database triggers, except that they are intended to be declarative so that their definitions can made explicitly visible to end users.)
 
Date's work is interesting and compelling, and raises several questions worthy of further investigation. However, there are still situations where the correct view translation may be ambiguous, e.g., views based on certain types of join, as previously noted \cite{Keller.A-1985a-Algorithms}. Somewhat disappointingly, given his stated goal of ``solving'' the view update problem, Date took a pragmatic approach in such cases. While his justification was well argued and logical, even he acknowledged that it involved ``a certain degree of pragma'' \cite{Date.C-2013a-View}.
 
Date characterises the ability to define an appropriate and effective view translation using the notion of \emph{information equivalence}. Two schemas \(\SC{1}\) and \(\SC{2}\) are said to be information equivalent ``if and only if the constraints that apply to [\(\SC{1}\)] and [\(\SC{2}\)] are such that every proposition that can be represented by [\(\SC{1}\)] can be represented by [\(\SC{2}\)] and vice versa'' \cite{Date.C-2013a-View}. Date's information equivalence is a formal concept, but its definition and characterisation in \cite{Date.C-2013a-View} are more operational in nature. This is what we explore in this paper.
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\section{Relations and types}
\label{sec-relations-types}
 
\noindent We generally follow Date's \cite{Date.C-2012a-SQL-and-Relational} notation and terminology regarding the Relational Model. We do not use Date's Tutorial D notation, however, preferring instead a more classical algebraic style.
 
In this paper, \(A\) represents an attribute (comprising a \emph{name}:\emph{type} pair), \(R\) represents a relation variable (\emph{relvar}), and \(v\) represents a value of an attribute, tuple, relation, etc. Attribute values may be disambiguated where necessary by prefixing the value with the attribute name, i.e., \(\mathit{name}\colon\mathit{value}\).
 
Date defines a \emph{type} \(\Type{i}\) as ``essentially a \emph{named, finite set of values}'' \cite{Date.C-2012a-SQL-and-Relational}, representing every possible value of some specific kind, e.g., every possible ASCII string of length 5, every possible city name, or every possible relation value with a particular heading. That is:
\begin{equation}\label{eqn-type}
\Type{i} = \{v_{1}, v_{2}, \dotsc, v_{m}\}, 0 < m < k
\end{equation}
where \(k\) is some finite upper bound. Thus, the type of attribute \(A_{i}\) (denoted \(\Type{A_{i}}\)) is by definition the set of all possible values of \(A_{i}\).
 
Consider a relvar \(R\) with heading \(\{A_{1}, A_{2}, \dotsc, A_{n}\}\). Following from equation~\ref{eqn-type}, the \emph{relation type} of \(R\), which we denote here as \(\Type{R}\), is the set of all possible relation values with \(R\)'s heading. Similarly, the \emph{tuple type} of \(R\)'s tuples, which we denote here as \TT{R}, is the set of all possible tuple values with \(R\)'s heading, which equates to the Cartesian product of \(R\)'s attribute types, i.e.:
\begin{equation}\label{eqn-tuple-type}
\TT{R} = \Type{A_{1}} \times \Type{A_{2}} \times\dotsb\times \Type{A_{n}}\text{.}
\end{equation}
(This construction can be applied to any tuple type, including projections of other tuple types.)
 
By definition any given value of a relvar \(R\) must comprise a set (possibly empty) of tuples \(\{t_{1}, t_{2}, \dotsc, t_{m}\} \subseteq \TT{R}\). \(\Type{R}\) therefore comprises every possible \(k\)-combination of the elements of \TT{R}, for \(0 \le k \le \left|\TT{R}\right|\).
 
For example, Date's usual suppliers-and-parts schema \cite{Date.C-2013a-View} includes a relvar \(S\) with heading \(\{\Sno, \Sname, \Status, \City\}\), which contains details of suppliers. From equation~\ref{eqn-tuple-type}, the tuples of \(S\) have type \(\TT{S} = \Type{\Sno} \times \TSSC\).
 
This notion of type as a set of possible values is synonymous with Codd's original definition of domains in the Relational Model \cite{Codd.E-1970a-Relational,Date.C-2012a-SQL-and-Relational}, and also with the notion of domains as ``sets of values'' in schema intension graphs \cite{Miller.R-1994a-Schema,Miller.R-1994a-SIG}. The implications of the latter point will be explored further in Section~\ref{sec-relational-sigs}, after we have introduced relative information capacity and schema intension graphs in Section~\ref{sec-info-capacity}.
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Nulls}
 
\noindent We also follow Date's prohibition of nulls. Philosophical objections aside, however, this makes little practical difference to our approach, as we are dealing exclusively with types rather than attributes anyway. While an attribute could be null, it makes little sense to say that a \emph{type} could be ``null''. It could be claimed that a type ``includes'' nulls, but it is unclear what this would even mean in practice, and runs the risk of treating nulls like ``normal'' values rather than the special markers that they are. In any case, this would effectively be no different from the situation without nulls, so we omit further consideration of nulls in the interest of clarity.
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
% \newpage
 
\section{Relative information capacity}
\label{sec-info-capacity}
 
\noindent A schema conveys information about the phenomenon it models. Hull \cite{Hull.R-1986a-Relative} defined the concept of \emph{relative information capacity} to describe the information content of different schemas. The relative information capacity of a schema determines the set of all valid instances of that schema \cite{Hull.R-1986a-Relative,Miller.R-1994a-PhD,Miller.R-1993a-Information}. Relative information capacity, as its name implies, is not a quantitative measure; rather it is an indicator of the relative information content of different schemas.
 
Relative information capacity provides a means to identify the differences between schema instances, and can therefore be used as an aid to schema integration and translation \cite{Miller.R-1994a-PhD}. As noted earlier, view updating is a special case of this, so it follows that information capacity can also be used to characterise the information content of views compared to the base relvar(s) from which they are derived.
 
Miller et al.\ \cite{Miller.R-1993a-Information} defined relative information capacity in terms of two types of mapping. An \emph{information (capacity) preserving mapping} from schema \(\SC{1}\) to schema \(\SC{2}\) maps every element of \(\SC{1}\) to an element of \(\SC{2}\), but only some elements of \(\SC{2}\) to elements of \(\SC{1}\). \(\SC{2}\) has an information capacity greater than \(\SC{1}\), and is said to \emph{dominate} \(\SC{1}\), denoted \Dominates{\SC{2}}{\SC{1}}. An \emph{equivalence preserving mapping} from \(\SC{1}\) to \(\SC{3}\) maps every element of \(\SC{1}\) to an element of \(\SC{3}\) and vice versa (i.e., both the mapping and its inverse are information preserving). The information capacity of \(\SC{1}\) is identical to \(\SC{3}\), and the schemas are said to be \emph{equivalent}, denoted \Equivalent{\SC{1}}{\SC{3}}.
 
(Note that Miller et al.\ \cite{Miller.R-1994a-Schema} use stricter definitions of equivalence and dominance than those used here; strictly speaking, the discussion in this section should refer to \emph{absolute} dominance and equivalence, whereas the following discussion on SIG transformations should refer to \emph{internal} dominance and equivalence \cite{Miller.R-1994a-Schema}. The distinction, however, is not crucial to the discussion in this paper.)
 
Relative information capacity can only be used comparatively. To this end, Miller et al.\ \cite{Miller.R-1994a-SIG} defined the \emph{schema intension graph} formalism as a tool for comparing the information capacity of schemas. A schema intension graph (SIG) describes the associations between domains in a schema, and provides a way to ``reason about constraints on \emph{collections of entities} in an instance of the entity set, rather than about the internal structure of a single entity'' \cite{Miller.R-1994a-SIG}. In particular, SIGs provide a useful abstract formalism within which to perform schema transformations, as transforming the SIG for a schema is effectively the same as transforming the schema itself.
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Constructing SIGs}
\label{sec-sig-build}
 
\noindent A SIG is a graph \(G = (N, E)\) \cite{Miller.R-1994a-Schema}. The nodes \(n_{i} \in N\) represent typed domains (i.e., sets of values). Nodes may be \emph{simple} (atomic) or \emph{constructed} (composite). Simple nodes are denoted by the name of the domain that they represent. Constructed nodes represent a collection of domains and are built using the \(\times\) (Cartesian product) and \(+\) (union) operators.
 
The edges \(e_{i} \in E\) represent binary relations (in the mathematical sense) between domains. Edges are denoted by lines with an optional label, and may be composed to form a \emph{path} between two nodes (the notation \(e_{2} \circ e_{1}\) means ``edge \(e_{1}\) followed by edge \(e_{2}\)''). Some edges may be designated as \emph{selection} edges, labelled \(\RelRestrict\), or \emph{projection} edges, labelled \(\RelProject\). These correspond to the relational algebra operators of the same names \cite{Codd.E-1972a-Completeness}.
 
Edges may also be annotated with up to four properties denoting simple constraints on the binary relation represented by the edge: totality, surjectivity, functionality and injectivity. These properties are defined as follows \cite{Miller.R-1994a-Schema}:
\begin{quotation}
\noindent Let \(A\) and \(B\) be two sets. A binary relation \(r : A \sigedge{00} B\) is \emph{total} (denoted \(e : A \Total B\)) if it is defined for all elements of \(A\); \emph{surjective} (\(e : A \Surjective B\)) if it is defined for all elements of \(B\); \emph{functional} (\(e : A \Functional B\)) if an element of \(A\) determines at most one element of \(B\); and \emph{injective} (\(e : A \Injective B\)) if an element of \(B\) determines at most one element of \(A\).
\end{quotation}
A \emph{bijection} is a binary relation that has all four properties \cite{Miller.R-1994a-SIG}.
 
The use of the term ``binary relation'' here, while mathematically correct, is potentially confusing in any discussion that also involves the Relational Model. From now on, we shall therefore refer to the binary relations represented by SIG edges as ``associations''.
 
A selection edge \(e : A \LabelledEdge{\sigedge{00}}{\RelRestrict} B\) indicates that the elements of \(B\) comprise a subset or specialisation of the elements of \(A\). If \(B = A\), we have what we term a \emph{trivial} selection. Every element of B must appear in A, and vice versa, and every element of \(A\) is associated with exactly one element of \(B\), and vice versa. Trivial selection edges are therefore bijective, i.e., \(A \TrivialSelection B\). If \(B \subset A\), we have what we term a \emph{non-trivial} selection. Every element of \(B\) must appear in \(A\), but not vice versa. The mapping remains one-to-one, as before. From the perspective of the superset \(A\), non-trivial selection edges are therefore surjective, functional, and injective, i.e., \(A \SelectionEdge B\).
 
A projection edge \(e : A \LabelledEdge{\sigedge{00}}{\RelProject} B\) indicates that the elements of \(B\) are a projection of \(A\), where \(A\) is a constructed node of the form \(C \times D \times \dotsb\) (i.e., a tuple type). A bijective projection edge \(A \TrivialProjection B\) indicates that \(B\) is unique with respect to \(A\). For non-unique projections, every element of \(A\) must match an element in \(B\), and vice versa. Every element of \(A\) is also associated with at most one element of \(B\), but not vice versa. Non-unique projection edges are therefore total, surjective, and functional, i.e., \(A \ProjectionEdge B\).
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Comparing SIGs}
\label{sec-sig-compare}
 
\noindent It is possible to determine the relationship between the relative information capacities of two schemas by comparing SIGs for the two schemas. Consider two schemas \(\SC{1}\) and \(\SC{2}\), with corresponding SIGs \(G_{\SC{1}}\) and \(G_{\SC{2}}\). Intuitively, if \(G_{\SC{1}}\) and \(G_{\SC{2}}\) are isomorphic, then \(\SC{1}\) and \(\SC{2}\) are equivalent \cite{Miller.R-1994a-SIG}. \(G_{\SC{1}}\) and \(G_{\SC{2}}\) are considered isomorphic if they have identical structure and semantics, i.e., the same nodes, edges, node types, constraints, and annotations.
 
Miller et al.\ \cite{Miller.R-1994a-SIG} identify three possible results from comparing two SIGs \(G_{\SC{1}}\) and \(G_{\SC{2}}\):
\begin{enumerate}
\item \(G_{\SC{1}}\) and \(G_{\SC{2}}\) are either immediately isomorphic, or one can be manipulated by a series of equivalence preserving transformations (described below) until it is isomorphic to the other. The two schemas are equivalent, i.e., \(\SC{1} \equiv \SC{2}\).
\item \(G_{\SC{1}}\) and \(G_{\SC{2}}\) are not immediately isomorphic, but one can be manipulated by a series of information capacity augmenting transformations (described below) until it is isomorphic to the other. The transformed schema is dominated by the other, e.g., if we transform \(G_{\SC{1}}\), then \(\Dominates{\SC{2}}{\SC{1}}\).
\item \(G_{\SC{1}}\) and \(G_{\SC{2}}\) are not immediately isomorphic and cannot be transformed to be isomorphic. The information capacities of \(\SC{1}\) and \(\SC{2}\) cannot be compared.
\end{enumerate}
 
Miller et al.\ \cite{Miller.R-1994a-Schema} describe the following equivalence preserving and information capacity augmenting transformations on SIGs:
\begin{description}
\item[Annotation transformations] allow the removal of annotations or projection and selection constraints from edges (e.g., \(n_{1} \sigedge{23} n_{2} \Rightarrow n_{1} \sigedge{03} n_{2}\), or \(n_{3} \TrivialSelection n_{4} \Rightarrow n_{3} \Bijective n_{4}\)). If an annotation transformation on \(G_{\SC{1}}\) makes it isomorphic to \(G_{\SC{2}}\), then the information capacity of \(\SC{2}\) dominates that of \(\SC{1}\) (i.e., \Dominates{\SC{2}}{\SC{1}}).
\item[Composition transformations] allow edges to be moved and copied around the graph. Consider an edge \(e : n_{1} \sigedge{00} n_{2}\), as shown in Figure~\ref{fig-sig-composition}\subref{fig-sig-composition-original}. If there is a path \(P = e_{m} \circ \dotsb \circ e_{k}\) of functional edges from some other node \(n_{k}\) to \(n_{2}\), \(e\) may be copied to a new edge \(e' : n_{1} \sigedge{00} n_{k}\), as shown in Figure~\ref{fig-sig-composition}\subref{fig-sig-composition-copy}. The original \(e\) can then be deleted if desired, effectively moving \(e\) to \(e'\) as shown in Figure~\ref{fig-sig-composition}\subref{fig-sig-composition-move}.
The annotation of \(e'\) is determined by composing \(P\) with \(e\), i.e., \(e \circ P\). If an edge with a particular annotation (such as surjectivity) is composed with an edge without that annotation, the resulting edge also does not have the annotation. For example, the composition of the edges \(\Functional\) and \(\Surjective\) would be an edge with no annotations (\(\Edge\)), whereas the composition of \(\Functional\) and \(\sigedge{03}\) would be \(\Functional\).
If a composition transformation on \(G_{\SC{1}}\) makes it isomorphic to \(G_{\SC{2}}\), then \Dominates{\SC{2}}{\SC{1}}.
 
%%%%%%%%%%%%%%%%%%%%
 
\begin{figure}[htb]
\centering
\subfloat[Original state\label{fig-sig-composition-original}]{
\begin{tikzpicture}
\node (n1) {\(n_{1}\)};
\node (n2) [below=1cm of n1] {\(n_{2}\)};
\node (n3) [left=1cm of n2] {\(n_{3}\)};
\node (ee) [left=0.75cm of n3] {\ldots};
\node (nk) [left=0.75cm of ee] {\(n_{k}\)};
\graph{
(n1) -- [edge label={\(e\)}] (n2);
(nk) -> [edge label={\(e_{k}\)},swap] (ee) -> [edge label={\(e_{m+1}\)},swap] (n3) -> [edge label={\(e_{m}\)},swap] (n2);
};
\node (Pleft) [above=2mm of nk.north east] {};
\node (Pright) [above=2mm of n2.north west] {};
\node (P) at ($(Pleft)!0.5!(Pright)$) {\(P\)};
\draw[decorate,decoration=brace] (nk.north east) -- (n2.north west);
\end{tikzpicture}
}
\subfloat[Copy edge \(e\) to \(e'\) across path \(P\)\label{fig-sig-composition-copy}]{
\begin{tikzpicture}
\node (n1) {\(n_{1}\)};
\node (n2) [below=1cm of n1] {\(n_{2}\)};
\node (n3) [left=1cm of n2] {\(n_{3}\)};
\node (ee) [left=0.75cm of n3] {\ldots};
\node (nk) [left=0.75cm of ee] {\(n_{k}\)};
\graph{
(n1) -- [edge label={\(e\)}] (n2);
(n1) -- [edge label={\(e'\)},swap] (nk);
(nk) -> [edge label={\(e_{k}\)},swap] (ee) -> [edge label={\(e_{m+1}\)},swap] (n3) -> [edge label={\(e_{m}\)},swap] (n2);
};
\end{tikzpicture}
}
\subfloat[Move edge \(e\) to \(e'\) across path \(P\)\label{fig-sig-composition-move}]{
\begin{tikzpicture}
\node (n1) {\(n_{1}\)};
\node (n2) [below=1cm of n1] {\(n_{2}\)};
\node (n3) [left=1cm of n2] {\(n_{3}\)};
\node (ee) [left=0.75cm of n3] {\ldots};
\node (nk) [left=0.75cm of ee] {\(n_{k}\)};
\graph{
(n1) -- [edge label={\(e'\)},swap] (nk);
(nk) -> [edge label={\(e_{k}\)},swap] (ee) -> [edge label={\(e_{m+1}\)},swap] (n3) -> [edge label={\(e_{m}\)},swap] (n2);
};
\end{tikzpicture}
}
\caption{Composition transformations.}
\label{fig-sig-composition}
\end{figure}
 
%%%%%%%%%%%%%%%%%%%%
 
\item[Selection transformations] allow the creation and deletion of new nodes and edges as follows:
\begin{enumerate}
\item An existing node \(n\) may be duplicated to create a new node \(n'\!\). A trivial selection edge \(e:n \TrivialSelection n'\) is added to enforce the constraint that \(n'\) is a duplicate of \(n\).
\item A node \(n_{1}\) may be deleted if it is associated with exactly one other node \(n_{2}\) by a single trivial selection edge \(e:n_{1} \TrivialSelection n_{2}\) (implying \(n_{1}\) is a duplicate of \(n_{2}\)). This also deletes the trivial selection edge.
\item A trivial selection edge \(e:n \TrivialSelection n\) may be created that connects a node \(n\) to itself.
\item A trivial selection edge \(e:n_{1} \TrivialSelection n_{2}\) may be deleted, removing the association between \(n_{1}\) and \(n_{2}\).
\end{enumerate}
If we can make \(G_{\SC{1}}\) isomorphic to \(G_{\SC{2}}\) using any of the first three selection transformations, then \Equivalent{\SC{1}}{\SC{2}}. If we can make \(G_{\SC{1}}\) isomorphic to \(G_{\SC{2}}\) using the fourth selection transformation, then \Dominates{\SC{2}}{\SC{1}}. The latter may seem somewhat counter-intuitive \cite{Qian.X-1995a-Correct}, but is nonetheless correct \cite{Miller.R-1994a-Schema}. A trivial selection edge \(e:n_{1} \TrivialSelection n_{2}\) denotes that \(n_{1}\) and \(n_{2}\) correspond to the same domain, so removing the edge also removes this constraint. The information capacity of \(\SC{2}\) must therefore be greater than \(\SC{1}\).
\end{description}
 
These SIG transformations and their effects are summarised in Table~\ref{Tab.SIG.Transformations}.
 
%%%%%%%%%%%%%%%%%%%%
 
\begin{table}[htb]
\centering
\small
\begin{tabular}{lcc}
\toprule
& & \textbf{Effect on infor-} \\
\textbf{Transformation} & \textbf{Type} & \textbf{mation capacity} \\
\midrule
Delete annotation or \(\RelProject\)/\(\RelRestrict\) constraint & annotation & augmented \\
Move or copy edge & composition & augmented \\
Create or delete duplicate node & selection & no change \\
Create trivial selection edge & selection & no change \\
Delete trivial selection edge & selection & augmented \\
\bottomrule
\end{tabular}
\caption{Summary of SIG transformations.}
\label{Tab.SIG.Transformations}
\end{table}
 
%%%%%%%%%%%%%%%%%%%%
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\section{Extending SIGs to model relational concepts}
\label{sec-relational-sigs}
 
\noindent The direct correspondence between relational types and SIG domains noted in Section~\ref{sec-relations-types} enables us to use SIGs to represent the structure and constraints of relational schemas. Equating tuple types to the Cartesian product of their attributes (equation \ref{eqn-tuple-type}) means that these can also be mapped directly to a constructed SIG node.
 
Let us again consider the relvar \(S\{\Sno, \Sname, \Status, \City\}\) from Date's suppliers-and-parts schema \cite{Date.C-2013a-View}. In addition to type constraints on the attributes, tuples, and the relvar as a whole, \(S\) is subject to a (primary) key constraint on \Sno. Taken together with the collection of types \(\Type{\Sno}\), \(\Type{\Sname}\), \(\Type{\Status}\), \(\Type{\City}\), \(\TT{S}\), and \(\Type{S}\), and assuming that \(S\) is the only relvar in the schema, we can construct the SIG shown in Figure~\ref{fig-sig-s-alone} as explained below.
 
%%%%%%%%%%%%%%%%%%%%
 
\begin{figure}[htb]
\centering
\begin{tikzpicture}[level distance=12mm]
\node (TS) {\(\Type{S}\)};
\node (TTS) [right=1cm of TS] {\(\TT{S}\)}
[sibling distance=3cm]
child[arrows={<{crossbar}-{crossbar}>}] {node (TSno) {\(\Type{\Sno}\)}}
child[arrows={:{crossbar}-{crossbar}>}] {node (TSSC) {\(\TSSC\)}
[sibling distance=15mm]
child[arrows={:{crossbar}-{crossbar}>}] {node (TSname) {\(\Type{\Sname}\)}}
child[arrows={:{crossbar}-{crossbar}>}] {node (TStatus) {\(\Type{\Status}\)}}
child[arrows={:{crossbar}-{crossbar}>}] {node (TCity) {\(\Type{\City}\)}}};
% TS to T{S}
\draw[arrows={:{crossbar}-{crossbar}:}] (TS) to (TTS);
% FD
\draw[arrows={:{crossbar}-{crossbar}>}] (TSno) to node[below=-2pt] {\scriptsize\emph{key}} (TSSC);
% projection edges
\ProjectionAnnotation[above left=-2pt and -4pt]{TTS}{TSno}
\ProjectionAnnotation[above right=-2pt and -4pt]{TTS}{TSSC}
 
\ProjectionAnnotation[above left=-2pt and -4pt]{TSSC}{TSname}
\ProjectionAnnotation[right=-2pt]{TSSC}{TStatus}
\ProjectionAnnotation[above right=-2pt and -4pt]{TSSC}{TCity}
\end{tikzpicture}
\caption{SIG for relvar \(S\{\Sno, \Sname, \Status, \City\}\).}
\label{fig-sig-s-alone}
\end{figure}
 
%%%%%%%%%%%%%%%%%%%%
 
As discussed in Section~\ref{sec-relations-types}, any given value of \(S\) must comprise a subset of \(\TT{S}\), so the association between \(\Type{S}\) and \(\TT{S}\) is total. Similarly, every tuple in \(\TT{S}\) must appear in at least one value of \(S\), so the association is also surjective. The association is neither functional nor injective, however, as a value of \(S\) in general may contain multiple tuples, and each tuple in \(\TT{S}\) can appear in multiple values of \(S\). This gives us \(\Type{S}\SurTotal\TT{S}\).
The key constraint on \Sno\ implies that the functional dependency \(\{\Sno\} \rightarrow \{\Sname, \Status, \City\}\) holds in \(S\). From equation \ref{eqn-tuple-type}, we can infer the type of \(\{\Sname, \Status, \City\}\) as \(\TSSC\). The association is functional and not injective by definition. Every supplier number (when used in a value of \(S\)) must be associated with an element of \(\TSSC\), and vice versa. This implies that the association is both total and surjective. Indeed, this holds for every edge that represents a key constraint \cite{Miller.R-1994a-SIG}. We introduce the edge label \(\mathit{key}\) to denote an edge representing a key constraint, which gives us \(\Type{\Sno} \KeyEdge \TSSC\) in Figure~\ref{fig-sig-s-alone}.
Both \(\Type{\Sno}\) and \(\TSSC\) are projections of \(\TT{S}\), so we can add a non-unique projection edge \(\TT{S} \ProjectionEdge \Type{\Sname} \times \Type{\Status} \times T_{\City}\) and a unique projection edge \(\TT{S} \TrivialProjection \Type{\Sno}\). Similarly, \(\Type{\Sname}\), \(\Type{\Status}\), and \(\Type{\City}\) are all projections of \(\TSSC\), so we can add further non-unique projection edges to these nodes, as shown in Figure~\ref{fig-sig-s-alone}.
 
Looking at Figure~\ref{fig-sig-s-alone}, it could be argued that the \(T_{\dots}\) type notation is redundant and unnecessarily complicates the diagram. Why not just use, e.g., \(S\) instead of \(\Type{S}\), \(\Sno\) instead of \(\Type{\Sno}\), and \(\Sno \times \Sname \times \Status \times \City\) instead of \(\TT{S}\)? It is important to remember, however, that SIGs like that shown in Figure~\ref{fig-sig-s-alone} refer to multiple elements of quite different kinds, including relations, tuples, and various combinations of attributes. Discarding the type notation might be reasonable in informal situations, but could lead to confusion between the different kinds of elements represented. The explicit type notation protects the semantics of the various elements of the schema and makes it clear what is being represented.
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\section{Characterising view updates}
\label{sec-characterising}
 
\noindent In this section we show how the extended SIG formalism can be used to model the information equivalence of relational view updates, using Date's restriction view example as a proof of concept \cite{Date.C-2013a-View}.
 
Views and the base relvars they are derived from normally exist within the same ``base'' database schema (although this is not strictly required), which we shall refer to as \(\SC{0}\). However, an end user may be granted access only to the views, and thus not be aware of the existence of the base relvar(s), or vice versa. This effectively partitions the schema into logical sub-schemas \(\SC{1}, \SC{2}, \dotsc, \SC{n}\).
 
There are explicit and implicit constraints in \(\SC{0}\) that should also apply to the sub-schemas \cite{Date.C-2013a-View}. Ignoring these constraints in a sub-schema \(\SC{k}\) will affect its information capacity, and could negatively impact the information equivalence of view updates involving \(\SC{k}\). In the next section we will show how such constraints can be propagated into sub-schemas by rewriting them in terms of the sub-schema alone, which enables us to explicitly incorporate into the sub-schema semantic information implicit in \(\SC{0}\) that would otherwise be lost. We will then discuss the construction of SIGs for Date's restriction view example (Section~\ref{sec-date-sigs}), and show how to transform and compare these (Section~\ref{sec-transforming}).
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Constraint derivation and propagation}
\label{sec-constraints}
 
\noindent Date's motivating example in Chapter 4 of \cite{Date.C-2013a-View} explores what is arguably the simplest case of view updating: disjoint restriction views. The example includes a base relvar \(S\) and two views \(\LS\) and \(\NLS\) derived\footnote{Although as Date notes \cite{Date.C-2013a-View}, we could just as easily define \(\LS\) and \(\NLS\) as base relvars and then derive \(S = \LS \RelUnion \NLS\), or even define all three as base relvars. The constraints remain the same regardless.} from \(S\):
\begin{align}
\LS &= \RelRestrict_{\City = \mathit{'London'}}S \label{eqn-ls} \\
\NLS &= \RelRestrict_{\City \ne \mathit{'London'}}S \label{eqn-nls}
\end{align}
 
Informally, \(\LS\) and \(\NLS\) contain details of London and non-London suppliers, respectively. They represent disjoint restrictions of \(S\) with the same heading, and have the following tuple types:
\begin{align}
\TT{\LS} &= \Type{\Sno} \times \Type{\Sname} \times \Type{\Status} \times \CityLondon \nonumber \\
\TT{\NLS} &= \Type{\Sno} \times \Type{\Sname} \times \Type{\Status} \times (\TCityMinusLondon) \nonumber
\end{align}
 
The base schema for this example is \(\SC{0} = \{S, \LS, \NLS\}\). This is subject to type constraints as specified by the various types noted previously, and the following additional constraints:
\begin{ConstraintList}
 
\item\label{constraint-key} \Sno\ is a key for each of \(S\), \(\LS\), and \(\NLS\), therefore the functional dependency \(\{\Sno\} \rightarrow \{\Sname, \Status, \City\}\) also holds in each of (a) \(S\); (b) \(\LS\); and (c) \(\NLS\).
% not sure how relevant the FK constraints are?
% how to represent? FK is a subset of the original key, so selection edge between S.Sno and each of LS.Sno and NLS.Sno
% or perhaps a selection edge from Sno to itself? (labelled FK)
% Notation: \Type{\Sno}, \Type{\LS.\Sno}, \Type{\NLS.\Sno}?
\item\label{constraint-lsfk} \(\RelProject_{\{\Sno\}}\LS \subseteq \RelProject_{\{\Sno\}}S\) [foreign key from \(\LS\) to \(S\)]
\item\label{constraint-nlsfk} \(\RelProject_{\{\Sno\}}\NLS \subseteq \RelProject_{\{\Sno\}}S\) [foreign key from \(\NLS\) to \(S\)]
\item\label{constraint-union} \(S = \LS \RelUnion \NLS\) [from (\ref{eqn-ls}) and (\ref{eqn-nls}) above]
\item\label{constraint-notlondon} \(\RelRestrict_{\City \ne \mathit{'London'}}\LS = \emptyset\) [from (\ref{eqn-ls}) above]
\item\label{constraint-london} \(\RelRestrict_{\City = \mathit{'London'}}\NLS = \emptyset\) [from (\ref{eqn-nls}) above]
\item\label{constraint-disjoint} \(\LS \RelIntersect \NLS = \emptyset\) [from \Constraint{\ref{constraint-notlondon}} and \Constraint{\ref{constraint-london}}]
\item\label{constraint-relation-type-union} (a) \(\Type{S} = \Type{\LS} \RelUnion \Type{\NLS}\); (b) \(\TT{S} = \TT{\LS} \RelUnion \TT{\NLS}\) [from \Constraint{\ref{constraint-union}}]
\item\label{constraint-relation-types} (a) \(\Type{\LS} \subset \Type{S}\); (b) \(\TT{\LS} \subset \TT{S}\) [from (\ref{eqn-ls}) above]
\item\label{constraint-tuple-types} (a) \(\Type{\NLS} \subset \Type{S}\); (b) \(\TT{\NLS} \subset \TT{S}\) [from (\ref{eqn-nls}) above]
\item\label{constraint-implied-types-london} \(\CityLondon \subset \Type{\City}\)
\item\label{constraint-implied-types-nonlondon} \((\TCityMinusLondon) \subset \Type{\City}\)
\item\label{constraint-implied-types-TSSL} \(\TSSL \subset \TSSC\)
\item\label{constraint-implied-types-TSSNL} \(\TSSNL \subset \TSSC\)
\end{ConstraintList}
 
Constraints \Constraint{\ref{constraint-union}}--\Constraint{\ref{constraint-disjoint}} enforce that \(\LS\) and \(\NLS\) are disjoint restrictions of \(S\), while \Constraint{\ref{constraint-relation-type-union}}--\Constraint{\ref{constraint-implied-types-TSSNL}} are additional type constraints that enforce specialisation associations implied by the subtypes and supertypes occurring in \(\SC{0}\).
 
In most typical database schemas, only constraints \Constraint{\ref{constraint-key}}, \Constraint{\ref{constraint-lsfk}}, and \Constraint{\ref{constraint-nlsfk}} will be explicitly declared. Some database schemas may also explicitly declare constraints \Constraint{\ref{constraint-union}} and \Constraint{\ref{constraint-disjoint}}, but it is more likely that these and all the remaining constraints will be implicit in the definition of \(\SC{0}\). It is important for the purposes of this analysis to clearly identify all such implicit constraints, so that nothing is missed when constructing corresponding SIGs.
 
Let us partition \(\SC{0}\) into three sub-schemas: \(\SC{1} = \{S\}\), \(\SC{2} = \{\LS, \NLS\}\), and \(\SC{3} = \{LS\}\). We wish to compare the relative information capacities of \((\SC{1}, \SC{2})\) and \((\SC{1}, \SC{3})\), in order to characterise the view update compatibility of the schemas in each pair.
 
Note that in the following analysis, we omit the foreign key constraints \Constraint{\ref{constraint-lsfk}} and \Constraint{\ref{constraint-nlsfk}}, as we have yet to determine the best way to represent inclusion dependencies of this nature in a SIG\footnote{Miller et al.\ \cite{Miller.R-1994a-SIG} briefly mention inclusion dependencies, but do not discuss how to represent them in a SIG.}, or indeed whether such dependencies are significant.
 
%%%%%%%%%%%%%%%%%%%%
 
\begin{table*}
\centering
\begin{tabular}{cl}
\toprule
\textbf{Constraint} & \textbf{Implied edge(s)} \\
\midrule
{\Constraint[\SC{1}]{\ref{constraint-key}}}(b) & \(\Type{\Sno} \KeyEdge \TSSL\) \\
\phantom{\Constraint[\SC{1}]{\ref{constraint-key}}}(c) & \(\Type{\Sno} \KeyEdge \TSSNL\) \\
\midrule
{\Constraint[\SC{1}]{\ref{constraint-relation-types}}} & \(\Type{\LSsub} \SurTotal \TT{\LSsub}\) \quad\quad \(\Type{S} \SelectionEdge \Type{\LSsub}\) \quad\quad \(\TT{S} \SelectionEdge \TT{\LSsub}\) \\
\midrule
{\Constraint[\SC{1}]{\ref{constraint-tuple-types}}} & \(\Type{\NLSsub} \SurTotal \TT{\NLSsub}\) \quad\quad \(\Type{S} \SelectionEdge \Type{\NLSsub}\) \quad\quad \(\TT{S} \SelectionEdge \TT{\NLSsub}\) \\
\midrule
{\Constraint{\ref{constraint-implied-types-london}}} & \(\Type{\City} \SelectionEdge \CityLondon\) \\
\midrule
{\Constraint{\ref{constraint-implied-types-nonlondon}}} & \(\Type{\City} \SelectionEdge (\TCityMinusLondon)\) \\
\midrule
{\Constraint{\ref{constraint-implied-types-TSSL}}} & \(\TSSC \SelectionEdge \TSSL\) \\
& \(\TT{\LSsub} \ProjectionEdge \TSSL\) \\
& \(\TSSL \ProjectionEdge \Type{\Sname}\) \\
& \(\TSSL \ProjectionEdge \Type{\Status}\) \\
& \(\TSSL \ProjectionEdge\,\CityLondon\) \\
\midrule
{\Constraint{\ref{constraint-implied-types-TSSNL}}} & \(\TSSC \SelectionEdge \TSSNL\) \\
& \(\TT{\NLSsub} \ProjectionEdge \TSSNL\) \\
& \(\TSSNL \ProjectionEdge \Type{\Sname}\) \\
& \(\TSSNL \ProjectionEdge \Type{\Status}\) \\
& \(\TSSNL \ProjectionEdge \TCityMinusLondon\) \\
\bottomrule
\end{tabular}
\caption{Constraints and the SIG edges they imply for schema \(\SC{1}\).}
\label{Tab.SIG.Implied.Edges}
\end{table*}
 
%%%%%%%%%%%%%%%%%%%%
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{Schema \(\SC{1}\)}
\label{sec-constraints-s-i}
 
\noindent A user granted access only to \(\SC{1}\) can see only relvar \(S\). Constraint \Constraint{\ref{constraint-key}}(a) can be propagated directly from \(\SC{0}\) into \(\SC{1}\) as it is already expressed in terms of \(S\) only. Constraints \Constraint{\ref{constraint-implied-types-london}}--\Constraint{\ref{constraint-implied-types-TSSNL}} do not include any named relvars in \(\SC{0}\), and thus can also be propagated directly from \(\SC{0}\) into \(\SC{1}\). Constraints \Constraint{\ref{constraint-key}}(b), \Constraint{\ref{constraint-key}}(c), and \Constraint{\ref{constraint-union}}--\Constraint{\ref{constraint-tuple-types}} cannot be propagated directly from \(\SC{0}\) into \(\SC{1}\), but can all be rewritten in terms of \(S\) only, by substituting the definitions of \(\LS\) (equation~\ref{eqn-ls}) and \(\NLS\) (equation~\ref{eqn-nls}). To simplify expressions in the following discussion, we shall use \(\LSsub\) to denote \(\RelRestrict_{\City = \mathit{'London'}}S\) (\ref{eqn-ls}) and \(\NLSsub\) to denote \(\RelRestrict_{\City \ne \mathit{'London'}}S\) (\ref{eqn-nls}). (This also clearly distinguishes the substitutions from the \(\LS\) and \(\NLS\) relvars in \(\SC{0}\), \(\SC{2}\), and \(\SC{3}\).) A constraint that has been rewritten so that it can be propagated from \(\SC{0}\) into \(\SC{1}\) is denoted by, e.g., \Constraint[\SC{1}]{\ref{constraint-union}}. Consequently we can derive the following set of rewritten constraints for \(\SC{1}\):
\begin{ConstraintList}[\SC{1}]
\item \Sno\ is a key for each of \(\LSsub\) and \(\NLSsub\), therefore the functional dependency \(\{\Sno\} \rightarrow \{\Sname, \Status, \City\}\) also holds in each of (b) \(\LSsub\); and (c) \(\NLSsub\). [The fact that we are dealing with two disjoint subsets of \(\City\) does not change this.]
\setcounter{constraint}{3}
\item \(S = \LSsub \RelUnion \NLSsub\) [or even just \(S = S\)]
\item \(\RelRestrict_{\City \ne \mathit{'London'}}\LSsub = \emptyset\)
\item \(\RelRestrict_{\City = \mathit{'London'}}\NLSsub = \emptyset\)
\item \(\LSsub \RelIntersect \NLSsub = \emptyset\)
 
\item (a) \(\Type{S} = \Type{\LSsub} \RelUnion \Type{\NLSsub}\); (b) \(\TT{S} = \TT{\LSsub} \RelUnion \TT{\NLSsub}\) \newline
{[or even just \(\Type{S} = \Type{S}\) and \(\TT{S} = \TT{S}\)]}
\item (a) \(\Type{\LSsub} \subset \Type{S}\); (b) \(\TT{\LSsub} \subset \TT{S}\) [from (\ref{eqn-ls}) above]
\item (a) \(\Type{\NLSsub} \subset \Type{S}\); (b) \(\TT{\NLSsub} \subset \TT{S}\) [from (\ref{eqn-nls}) above]
\end{ConstraintList}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{Schema \(\SC{2}\)}
\label{sec-constraints-s-ii}
 
\noindent A user granted access only to \(\SC{2}\) can see only relvars \(\LS\) and \(\NLS\). Constraints \Constraint{\ref{constraint-key}}(b), \Constraint{\ref{constraint-key}}(c), and \Constraint{\ref{constraint-notlondon}}--\Constraint{\ref{constraint-disjoint}} can be propagated directly from \(\SC{0}\) into \(\SC{2}\) as they are defined only in terms of \(\LS\) and \(\NLS\). \Constraint{\ref{constraint-implied-types-london}}--\Constraint{\ref{constraint-implied-types-TSSNL}} can be propagated directly into \(\SC{2}\) as they are not expressed in terms of any named relvars in \(\SC{0}\). \Constraint{\ref{constraint-key}}(a), \Constraint{\ref{constraint-union}}, \Constraint{\ref{constraint-relation-type-union}}, \Constraint{\ref{constraint-relation-types}}, and \Constraint{\ref{constraint-tuple-types}} can be rewritten in terms of \(\LS\) and \(\NLS\) only, giving us:
\begin{ConstraintList}[\SC{2}]
 
\item \Sno\ is a key for \(\LS \RelUnion \NLS\), therefore the functional dependency \(\{\Sno\} \rightarrow \{\Sname, \Status, \City\}\) also holds in (a) \(\LS \RelUnion \NLS\).
\setcounter{constraint}{3}
\item \(\LS \RelUnion \NLS = \LS \RelUnion \NLS\)
\setcounter{constraint}{7}
\item (a) \(\Type{\LS} \RelUnion \Type{\NLS} = \Type{\LS} \RelUnion \Type{\NLS}\); \newline
(b) \(\TT{\LS} \RelUnion \TT{\NLS} = \TT{\LS} \RelUnion \TT{\NLS}\)
\item (a) \(\Type{\LS} \subset \Type{\LS} \RelUnion \Type{\NLS}\); (b) \(\TT{\LS} \subset \TT{\LS} \RelUnion \TT{\NLS}\)
\item (a) \(\Type{\NLS} \subset \Type{\LS} \RelUnion \Type{\NLS}\); (b) \(\TT{\NLS} \subset \TT{\LS} \RelUnion \TT{\NLS}\)
\end{ConstraintList}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{Schema \(\SC{3}\)}
\label{sec-constraints-s-iii}
 
\noindent A user granted access only to \(\SC{3}\) can see only relvar \(\LS\). Constraints \Constraint{\ref{constraint-key}}(b) and \Constraint{\ref{constraint-notlondon}} can be propagated directly into \(\SC{3}\), as they are defined in terms of \(\LS\) only. \Constraint{\ref{constraint-implied-types-london}}--\Constraint{\ref{constraint-implied-types-TSSNL}} can also be propagated directly into \(\SC{3}\) as previously discussed. The remaining constraints cannot be rewritten in terms of \(\LS\) only, and so cannot be propagated into \(\SC{3}\). As we were able to propagate all constraints into \(\SC{1}\), this indicates a qualitative difference between \(\SC{1}\) and \(\SC{3}\). It therefore seems likely that the relative information capacities of \(\SC{1}\) and \(\SC{3}\) will also differ.
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Constructing the SIGs}
\label{sec-date-sigs}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{Schema \(\SC{1}\)}
\label{sec-sigs-s-i}
 
\noindent The SIG for \(\SC{1}\) will not just be that for relvar \(S\) as shown in Figure~\ref{fig-sig-s-alone}, as that schema did not incorporate all the constraints implicit in \(\SC{0}\). The process for constructing the SIG will be similar to that for the earlier example, however. The constraints appearing in \(\SC{1}\) are \Constraint{\ref{constraint-key}}(a), \Constraint[\SC{1}]{\ref{constraint-key}}(b), \Constraint[\SC{1}]{\ref{constraint-key}}(c), \Constraint[\SC{1}]{\ref{constraint-union}}--\Constraint[\SC{1}]{\ref{constraint-tuple-types}}, and \Constraint{\ref{constraint-implied-types-london}}--\Constraint{\ref{constraint-implied-types-TSSNL}}.
 
The SIG will include all of the edges that appear in Figure~\ref{fig-sig-s-alone}. The constraints within the schema also imply the existence of several subtype nodes (e.g., the two subtypes of \(\Type{City}\) implied by \Constraint{\ref{constraint-implied-types-london}} and \Constraint{\ref{constraint-implied-types-nonlondon}}), along with corresponding selection and projection edges, which are listed in Table~\ref{Tab.SIG.Implied.Edges} above. \Constraint[\SC{1}]{\ref{constraint-union}}, \Constraint[\SC{1}]{\ref{constraint-relation-type-union}}(a), and \Constraint[\SC{1}]{\ref{constraint-relation-type-union}}(b) are effectively tautologies that add no new information, and can thus be safely ignored. The completed SIG for \(\SC{1}\) is shown in Figure~\ref{fig-sig-s}.
 
%%%%%%%%%%%%%%%%%%%%
 
\begin{figure*}
\centering
\begin{tikzpicture}
\matrix[row sep=0.5cm]
{
\node (TLS) {\(\Type{\LSsub}\)}; &[7mm] \node (TTLS) {\(\TT{\LSsub}\)}; &[7mm] &[4mm] &[-4mm] \node (TSSL) {\(\StackTSSL\)}; & & \node (LSCity) {\(\CityLondon\)}; \\
& & & \node (TSname) {\(\Type{\Sname}\)}; \\
\node (TLSPlusNLS) {\(\Type{S}\)}; & \node (TTLSPlusNLS) {\(\TT{S}\)}; & \node (TSno) {\(\Type{\Sno}\)}; & & \node (TSSC) {\(\StackTSSC\)}; & & \node (TCity) {\(\Type{City}\)}; \\
& & & & & \node (TStatus) {\(\Type{\Status}\)}; \\
\node (TNLS) {\(\Type{\NLSsub}\)}; & \node (TTNLS) {\(\TT{\NLSsub}\)}; & & & \node (TSSNL) {\(\StackTSSNL\)}; & & \node (NLSCity) {\(\StackTCityMinusLondon\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
{ (TLS), (TNLS), (TLSPlusNLS) } -- { (TTLS), (TTNLS), (TTLSPlusNLS) },
};
% FDs
(TSno) -- [funcdep left,bend left] (TSSL);
(TSno) -- [funcdep right] (TSSNL);
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
{ (TTLSPlusNLS), (TTLS) } -- (TSno)
};
{ [edges=bijection,edge label'={\scriptsize\(\RelProject\)}]
(TTNLS) -- (TSno)
};
{ [edges=projection left]
(TTLS) -- (TSSL),
(TSSL) -- { (TStatus), (LSCity) },
};
{ [edges=projection right]
(TTNLS) -- (TSSNL),
(TSSC) -- { (TSname), (TStatus) },
(TSSL) -- (TSname),
(TSSNL) -- { (TStatus), (NLSCity), (TSname) },
};
% selection edges
{ [edges=selection left]
{ (TLSPlusNLS), (TTLSPlusNLS) } -- { (TLS), (TTLS) },
(TSSC) -- { (TSSL), (TSSNL) },
(TCity) -- (NLSCity),
};
{ [edges=selection right]
{ (TLSPlusNLS), (TTLSPlusNLS) } -- { (TNLS), (TTNLS) },
(TCity) -- (LSCity),
};
% insert "gaps" into crossed edges
{ [edges={white,line width=1.5mm}]
(TSno) -- (TSSC),
(TSSC) -- (TCity),
(TTLSPlusNLS) -- [bend right] (TSSC),
};
(TSno) -- [funcdep right] (TSSC);
(TSSC) -- [projection left] (TCity);
(TTLSPlusNLS) -- [projection right,bend right] (TSSC),
};
\end{tikzpicture}
\caption{SIG for schema \(\SC{1} = \{S\}\).}
\label{fig-sig-s}
\end{figure*}
 
%%%%%%%%%%%%%%%%%%%%
 
%%%%%%%%%%%%%%%%%%%%
 
\begin{figure*}
\centering
\begin{tikzpicture}
\matrix[row sep=0.5cm]
{
\node (TLS) {\(\Type{\LS}\)}; &[7mm] \node (TTLS) {\(\TT{\LS}\)}; &[7mm] &[4mm] &[-4mm] \node (TSSL) {\(\StackTSSL\)}; & & \node (LSCity) {\(\CityLondon\)}; \\
& & & \node (TSname) {\(\Type{\Sname}\)}; \\
\node (TLSPlusNLS) {\(\StackTLSPlusNLS\)}; & \node (TTLSPlusNLS) {\(\StackTTLSPlusNLS\)}; & \node (TSno) {\(\Type{\Sno}\)}; & & \node (TSSC) {\(\StackTSSC\)}; & & \node (TCity) {\(\Type{City}\)}; \\
& & & & & \node (TStatus) {\(\Type{\Status}\)}; \\
\node (TNLS) {\(\Type{\NLS}\)}; & \node (TTNLS) {\(\TT{\NLS}\)}; & & & \node (TSSNL) {\(\StackTSSNL\)}; & & \node (NLSCity) {\(\StackTCityMinusLondon\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
{ (TLS), (TNLS), (TLSPlusNLS) } -- { (TTLS), (TTNLS), (TTLSPlusNLS) },
};
% FDs
(TSno) -- [funcdep left,bend left] (TSSL);
(TSno) -- [funcdep right] (TSSNL);
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
{ (TTLSPlusNLS), (TTLS) } -- (TSno)
};
{ [edges=bijection,edge label'={\scriptsize\(\RelProject\)}]
(TTNLS) -- (TSno)
};
{ [edges=projection left]
(TTLS) -- (TSSL),
(TSSL) -- { (TStatus), (LSCity) },
};
{ [edges=projection right]
(TTNLS) -- (TSSNL),
(TSSC) -- { (TSname), (TStatus) },
(TSSL) -- (TSname),
(TSSNL) -- { (TStatus), (NLSCity), (TSname) },
};
% selection edges
{ [edges=selection left]
{ (TLSPlusNLS), (TTLSPlusNLS) } -- { (TLS), (TTLS) },
(TSSC) -- { (TSSL), (TSSNL) },
(TCity) -- (NLSCity),
};
{ [edges=selection right]
{ (TLSPlusNLS), (TTLSPlusNLS) } -- { (TNLS), (TTNLS) },
(TCity) -- (LSCity),
};
% insert "gaps" into crossed edges
{ [edges={white,line width=1.5mm}]
(TSno) -- (TSSC),
(TSSC) -- (TCity),
(TTLSPlusNLS) -- [bend right] (TSSC),
};
(TSno) -- [funcdep right] (TSSC);
(TSSC) -- [projection left] (TCity);
(TTLSPlusNLS) -- [projection right,bend right] (TSSC),
};
\end{tikzpicture}
\caption{SIG for schema \(\SC{2} = \{\LS, \NLS\}\).}
\label{fig-sig-ls-nls}
\end{figure*}
 
%%%%%%%%%%%%%%%%%%%%
 
%%%%%%%%%%%%%%%%%%%%
 
\begin{figure*}
\centering
\begin{tikzpicture}
\matrix[row sep=0.5cm]
{
\node (TLS) {\(\Type{\LS}\)}; &[7.5mm] \node (TTLS) {\(\TT{\LS}\)}; &[7mm] &[4mm] &[-4mm] \node (TSSL) {\(\StackTSSL\)}; & & \node (LSCity) {\(\CityLondon\)}; \\
& & & \node (TSname) {\(\Type{\Sname}\)}; \\
& & \node (TSno) {\(\Type{\Sno}\)}; & & \node (TSSC) {\(\StackTSSC\)}; & & \node (TCity) {\(\Type{City}\)}; \\
& & & & & \node (TStatus) {\(\Type{\Status}\)}; \\
& & & & \node (TSSNL) {\(\StackTSSNL\)}; & & \node (NLSCity) {\(\StackTCityMinusLondon\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
(TLS) -- (TTLS),
};
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
(TTLS) -- (TSno)
};
{ [edges=projection left]
(TTLS) -- (TSSL),
(TSSL) -- { (TStatus), (LSCity) },
};
{ [edges=projection right]
(TSSC) -- { (TSname), (TStatus) },
(TSSL) -- (TSname),
(TSSNL) -- { (TStatus), (NLSCity), (TSname) },
};
% selection edges
{ [edges=selection left]
(TSSC) -- { (TSSL), (TSSNL) },
(TCity) -- (NLSCity),
};
{ [edges=selection right]
(TCity) -- (LSCity),
};
% insert "gaps" into crossed edges
{ [edges={white,line width=1.5mm}]
(TSno) -- (TSSC),
(TSSC) -- (TCity),
};
(TSno) -- [funcdep right] (TSSC);
(TSSC) -- [projection left] (TCity);
};
\end{tikzpicture}
\caption{SIG for schema \(\SC{3} = \{\LS\}\).}
\label{fig-sig-ls}
\end{figure*}
 
%%%%%%%%%%%%%%%%%%%%
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{Schema \(\SC{2}\)}
\label{sec-sigs-s-ii}
 
\noindent The constraints appearing in \(\SC{2}\) are \Constraint[\SC{2}]{\ref{constraint-key}}(a), \Constraint{\ref{constraint-key}}(b), \Constraint{\ref{constraint-key}}(c), \Constraint[\SC{2}]{\ref{constraint-union}}, \Constraint{\ref{constraint-notlondon}}--\Constraint{\ref{constraint-disjoint}}, \Constraint[\SC{2}]{\ref{constraint-relation-type-union}}--\Constraint[\SC{2}]{\ref{constraint-tuple-types}}, and \Constraint{\ref{constraint-implied-types-london}}--\Constraint{\ref{constraint-implied-types-TSSNL}}. This is essentially the same set of constraints as \(\SC{1}\), but with different rewritings. This means that the SIG for \(\SC{2}\) can be built in the same manner as for \(\SC{1}\), with some nodes named differently. In particular, \Constraint[\SC{2}]{\ref{constraint-relation-type-union}} implies that there will be nodes \(\TLSPlusNLS\) and \(\TTLSPlusNLS\) instead of \(\Type{S}\) and \(\TT{S}\), respectively. There will also be \(\Type{\LS}\) instead of \(\Type{\LSsub}\), etc. The complete SIG for \(\SC{2}\) is shown in Figure~\ref{fig-sig-ls-nls}.
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{Schema \(\SC{3}\)}
\label{sec-sigs-s-iii}
 
\noindent The constraints appearing in \(\SC{3}\) are \Constraint{\ref{constraint-key}}(b), \Constraint{\ref{constraint-notlondon}}, and \Constraint{\ref{constraint-implied-types-london}}--\Constraint{\ref{constraint-implied-types-TSSNL}}. The SIG will only include edges and nodes that relate either directly to \(\LS\) or are independent of any relvar, such as the subtype node \(\TSSNL\). The complete SIG for \(\SC{3}\) is shown in Figure~\ref{fig-sig-ls} on the previous page.
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Transforming the SIGs}
\label{sec-transforming}
 
\noindent Now that we have constructed SIGs for all three schemas, we can compare the relative information capacities of the schema pairs \((\SC{1}, \SC{2})\) and \((\SC{1}, \SC{3})\). We do this by attempting to transform the SIG for one of the schemas until it is isomorphic with the other.
 
Looking at the SIGs for \(\SC{1}\) and \(\SC{2}\), we can see almost immediately that both SIGs have the same node and edge structure; indeed the only difference is in the names of some of the nodes. However, we already know from the discussion in Sections~\ref{sec-constraints-s-i} and~\ref{sec-constraints-s-ii} that these differently named nodes are just rewritings that represent the same domains. We therefore have an immediate isomorphism between the two SIGs and can conclude that the information capacities of \(\SC{1}\) and \(\SC{2}\) are equivalent, i.e., \(\Equivalent{\SC{1}}{\SC{2}}\).
 
The comparison between \(\SC{1}\) and \(\SC{3}\) is more interesting. There are some shared structures, but the two SIGs are clearly different. Since the SIG transformations discussed in Section~\ref{sec-sig-compare} only ever preserve or enhance information capacity, intuitively we should attempt to transform the ``smaller'' SIG for \(\SC{3}\) into the ``larger'' SIG for \(\SC{1}\). SIG transformations can generally be carried out in two broad phases (using the \(\SC{3} \rightarrow \SC{1}\) transformation as an example):
\begin{description}
 
\item[Duplicate nodes] in \(\SC{3}\) (producing \(\SC{3}'\)) that correspond to supertypes in \(\SC{1}\), in order to create nodes corresponding to the extra nodes that \(\SC{1}\) has over \(\SC{3}\). The goal is to produce a node structure similar to \(\SC{1}\). The duplicated nodes are connected to their original nodes by trivial selection edges. These transformations (if applicable) do not alter the information capacity of \(\SC{3}'\) (i.e., \(\Equivalent{\SC{3}}{\SC{3}'}\)).
\item[Copy and move edges] around the SIG to produce an edge structure similar to \(\SC{1}\). The annotations of each moved or copied edge are determined by the path it is composed with, as discussed in Section~\ref{sec-sig-compare}. These transformations (if applicable) \emph{increase} the information capacity of \(\SC{3}'\) (i.e., \(\Dominates{\SC{3}'}{\SC{3}}\)).
\end{description}
 
These two phases generally occur in order, but may be interspersed throughout with the following:
\begin{description}
 
\item[Delete duplicate nodes] in \(\SC{3}'\) that are no longer needed, especially those that do not exist in \(\SC{1}\). These transformations (if applicable) do not alter the information capacity of \(\SC{3}'\) (\(\equiv\)).
\item[Remove totality annotations] from trivial selection edges in \(\SC{3}'\) to change them into non-trivial selection edges. This decouples duplicate nodes into subtypes and supertypes, ensuring that they represent different domains. These transformations (if applicable) \emph{increase} the information capacity of \(\SC{3}'\) (\(\preceq\)).
\end{description}
For example, we might duplicate some nodes, remove some totality annotations, move or copy some edges, delete some no longer needed nodes, move or copy some more edges, then remove some more totality annotations.
 
Applying this process to \(\SC{3}\), we first duplicate node \(\Type{\LS}\) to \(\Type{S}\) and node \(\TT{\LS}\) to \(\TT{S}\). To obtain a node structure similar to that of \(\SC{1}\), we also need to further duplicate \(\Type{S}\) to \(\Type{\NLS}\) and \(\TT{S}\) to \(\TT{\NLS}\). The result of these duplications is shown in Figure~\ref{fig-transform-all-duplicates}. The transformed SIG now has the same node structure as that for \(\SC{1}\).
 
%%%%%%%%%%%%%%%%%%%%
 
\begin{figure*}[t]
\centering
\begin{tikzpicture}
\matrix[row sep=0.5cm]
{
\node [input keep] (TLS) {\(\Type{\LS}\)}; &[7mm] \node [input keep] (TTLS) {\(\TT{\LS}\)}; &[7mm] &[4mm] &[-4mm] \node (TSSL) {\(\StackTSSL\)}; & & \node (LSCity) {\(\CityLondon\)}; \\
& & & \node (TSname) {\(\Type{\Sname}\)}; \\
\node [output] (TLSPlusNLS) {\(\Type{S}\)}; & \node [output] (TTLSPlusNLS) {\(\TT{S}\)}; & \node (TSno) {\(\Type{\Sno}\)}; & & \node (TSSC) {\(\StackTSSC\)}; & & \node (TCity) {\(\Type{City}\)}; \\
& & & & & \node (TStatus) {\(\Type{\Status}\)}; \\
\node [output] (TNLS) {\(\Type{\NLS}\)}; & \node [output] (TTNLS) {\(\TT{\NLS}\)}; & & & \node (TSSNL) {\(\StackTSSNL\)}; & & \node (NLSCity) {\(\StackTCityMinusLondon\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
(TLS) -- (TTLS),
};
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
(TTLS) -- (TSno)
};
{ [edges=projection left]
(TTLS) -- (TSSL),
(TSSL) -- { (TStatus), (LSCity) },
};
{ [edges=projection right]
(TSSC) -- { (TSname), (TStatus) },
(TSSL) -- (TSname),
(TSSNL) -- { (TStatus), (NLSCity), (TSname) },
};
% selection edges
{ [edges=selection left]
(TSSC) -- { (TSSL), (TSSNL) },
(TCity) -- (NLSCity),
};
{ [edges=selection right]
(TCity) -- (LSCity),
};
{ [edges={bijection,output},edge label'={\scriptsize\(\RelRestrict\)}]
{ (TLS), (TTLS) } -- { (TLSPlusNLS), (TTLSPlusNLS) },
{ (TLSPlusNLS), (TTLSPlusNLS) } -- { (TNLS), (TTNLS) },
};
% insert "gaps" into crossed edges
{ [edges={white,line width=1.5mm}]
(TSno) -- (TSSC),
(TSSC) -- (TCity),
};
(TSno) -- [funcdep right] (TSSC);
(TSSC) -- [projection left] (TCity);
% transformation indicators
{ [edges={->,gray,dashed,bend left=45}]
(TLS) -- [edge node={node[sloped,above]{\small\emph{copy}}}] (TLSPlusNLS),
(TLSPlusNLS) -- [edge node={node[sloped,above,rotate=180]{\small\emph{copy}}}] (TNLS)
};
};
\end{tikzpicture}
\caption{SIG for transformed schema \(\SC{3}'\) after duplicating \Type{\LS} and \TT{\LS} to produce analogues of the additional nodes in \(\SC{1}\). Inputs to the transformations are coloured \textcolor{blue}{blue}, outputs are coloured \textcolor{red}{red}. [\(\equiv\)]}
\label{fig-transform-all-duplicates}
\end{figure*}
 
%%%%%%%%%%%%%%%%%%%%
 
The next phase is to copy and move edges. To produce the edge \(\Type{S} \SurTotal \TT{S}\), we can first \emph{copy} \(\Type{\LS} \SurTotal \TT{\LS}\) across the path \(\TT{S} \TrivialSelection \TT{\LS}\) (giving \(\Type{\LS} \SurTotal \TT{S}\)), then \emph{move} it across \(\Type{S} \TrivialSelection \Type{\LS}\). We can carry out a similar series of transformations to copy and move \(\Type{S} \SurTotal \TT{S}\) to \(\Type{\NLS} \SurTotal \TT{\NLS}\) (see Figure~\ref{fig-transform-edge-moves}).
 
We next copy and move the unique projection edge \(\TT{\LS} \TrivialProjection \Type{\Sno}\) to produce the edges \(\TT{S} \TrivialProjection \Type{\Sno}\) and \(\TT{\NLS} \TrivialProjection \Type{\Sno}\). Similarly, we copy and move \(\TT{\LS} \ProjectionEdge \TSSL\) to produce \(\TT{S} \LabelledEdge{\sigedge{12}}{\RelProject} \TSSC\) and \(\TT{\NLS} \LabelledEdge{\sigedge{02}}{\RelProject} \TSSNL\). Note that the first edge in the latter pair of transformations loses its totality annotation, and the second edge its surjectivity annotation, as a result of composition with the pre-existing non-bijective selection edges between the constructed tuple types running vertically down the centre of the SIG.
 
Finally, we carry out similar copy and move transformations to copy the key edge \(\Type{\Sno} \KeyEdge \TSSC\) to \(\Type{\Sno} \LabelledEdge{\sigedge{03}}{\mathit{key}} \TSSL\), and \(\Type{\Sno} \LabelledEdge{\sigedge{03}}{\mathit{key}} \TSSNL\). Both new edges lose their totality annotations for the same reason as the projection edges above. The final result of all these edge transformations is shown in Figure~\ref{fig-transform-edge-moves}.
 
%%%%%%%%%%%%%%%%%%%%
 
\begin{figure*}[t]
\centering
\begin{tikzpicture}
\matrix[row sep=0.5cm]
{
\node (TLS) {\(\Type{\LS}\)}; &[7mm] \node (TTLS) {\(\TT{\LS}\)}; &[7mm] &[4mm] &[-4mm] \node (TSSL) {\(\StackTSSL\)}; & & \node (LSCity) {\(\CityLondon\)}; \\
& & & \node (TSname) {\(\Type{\Sname}\)}; \\
\node (TLSPlusNLS) {\(\Type{S}\)}; & \node (TTLSPlusNLS) {\(\TT{S}\)}; & \node (TSno) {\(\Type{\Sno}\)}; & & \node (TSSC) {\(\StackTSSC\)}; & & \node (TCity) {\(\Type{City}\)}; \\
& & & & & \node (TStatus) {\(\Type{\Status}\)}; \\
\node (TNLS) {\(\Type{\NLS}\)}; & \node (TTNLS) {\(\TT{\NLS}\)}; & & & \node (TSSNL) {\(\StackTSSNL\)}; & & \node (NLSCity) {\(\StackTCityMinusLondon\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
(TLS) -- [input keep,edge node={node (c1a) {}}] (TTLS),
(TLSPlusNLS) -- [output,edge node={node (c1b) {}}] (TTLSPlusNLS),
(TNLS) -- [output,edge node={node (c1c) {}}] (TTNLS),
};
% FDs
(TSno) -- [funcdep left,arrows={-{crossbar}>},bend left,output] (TSSL);
(TSno) -- [funcdep right,arrows={-{crossbar}>},output] (TSSNL);
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
(TTLS) -- [input keep] (TSno),
(TTLSPlusNLS) -- [output] (TSno),
};
{ [edges=bijection,edge label'={\scriptsize\(\RelProject\)}]
(TTNLS) -- [output] (TSno),
};
{ [edges=projection left]
(TTLS) -- [input keep,edge node={node (c2a) {}}] (TSSL),
(TSSL) -- { (TStatus), (LSCity) },
};
{ [edges=projection right]
(TSSC) -- { (TSname), (TStatus) },
(TSSL) -- (TSname),
(TSSNL) -- { (TStatus), (NLSCity), (TSname) },
(TTNLS) -- [arrows={:->},output,edge node={node (c2c) {}}] (TSSNL),
};
 
% selection edges
{ [edges=selection left]
(TSSC) -- { (TSSL), (TSSNL) },
(TCity) -- (NLSCity),
};
{ [edges=selection right]
(TCity) -- (LSCity),
};
{ [edges=bijection,edge label'={\scriptsize\(\RelRestrict\)}]
{ (TLS), (TTLS) } -- { (TLSPlusNLS), (TTLSPlusNLS) },
{ (TLSPlusNLS), (TTLSPlusNLS) } -- { (TNLS), (TTNLS) },
};
% insert "gaps" into crossed edges
{ [edges={white,line width=1.5mm}]
(TSno) -- (TSSC),
(TSSC) -- (TCity),
(TTLSPlusNLS) -- [bend right] (TSSC),
};
(TSno) -- [funcdep right,input keep] (TSSC);
(TSSC) -- [projection left] (TCity);
(TTLSPlusNLS) -- [projection right,arrows={:{crossbar}->},bend right,output,edge node={node (c2b) {}}] (TSSC),
% transformation indicators
{ [edges={->,gray,dashed}]
(c1a) -- (c1b),
(c1a) -- [bend right=12,edge node={node[above,sloped,pos=0.175]{\small\emph{copy \& move}}}] (c1c),
(c2a) -- [bend right=12] (c2b),
(c2a) -- [bend right=12,edge node={node[above,sloped,pos=0.175]{\small\emph{copy \& move}}}] (c2c)
};
};
\end{tikzpicture}
\caption{SIG for transformed schema \(\SC{3}'\) after copying and moving various edges. [\(\preceq\)]}
\label{fig-transform-edge-moves}
\end{figure*}
 
%%%%%%%%%%%%%%%%%%%%
 
If we compare Figure~\ref{fig-sig-s} with Figure~\ref{fig-transform-edge-moves}, we can see that the transformed SIG for \(\SC{3}'\) now has the same topology as the SIG for \(\SC{1}\). We still need to remove the totality annotations from the newly created trivial selection edges between the relation and tuple types on the left, but even when this is done, we do not achieve the desired isomorphism, as the edges \(\TT{S} \LabelledEdge{\sigedge{12}}{\RelProject} \TSSC\), \(\TT{\NLS} \LabelledEdge{\sigedge{02}}{\RelProject} \TSSNL\), \(\Type{\Sno} \LabelledEdge{\sigedge{03}}{\mathit{key}} \TSSL\), and \(\Type{\Sno} \LabelledEdge{\sigedge{03}}{\mathit{key}} \TSSNL\) all have different annotations from the corresponding edges in the SIG for \(\SC{1}\). This clearly shows that the information capacities of \(\SC{1}\) and \(\SC{3}\) are incomparable, and that view updates based on this pair of schemas will be problematic.
 
If we were to create a fourth sub-schema \(\SC{4} = \{\NLS\}\) and compare this with \(\SC{1}\), the result would be similar to that for \(\SC{3}\).
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\section{Conclusion \& future work}
\label{sec-conclusion}
 
\noindent In this paper we have shown how to use the concept of relative information capacity and an extension of the schema intension graph (SIG) formalism to more formally model Date's notion of information equivalence with respect to relational view updates. Our analysis of Date's restriction view example \cite{Date.C-2013a-View} using these techniques is consistent with his findings, so the approach shows promise. The information capacities of \(\SC{1} = \{S\}\) and \(\SC{2} = \{\LS,\NLS\}\) are equivalent, so it should be possible to effectively propagate view updates between \(\SC{1}\) and \(\SC{2}\), regardless of the configuration of views and base relvars. Conversely, the information capacity of \(\SC{3} = \{\LS\}\) is not comparable with that of \(\SC{1}\), implying that there are updates that cannot be propagated between \(\SC{1}\) and \(\SC{3}\).
 
Our analysis reinforces the importance of explicitly identifying all constraints that can be propagated from the base schema \(\SC{0}\) to its sub-schemas. Omission of constraints could produce a different SIG structure that might lead to an erroneous conclusion about a schema's information capacity relative to another.
 
There are several avenues for future work. First, the proof of concept discussed in this paper only deals with disjoint restriction views, which are arguably the simplest case of view updating. Further work needs to be done to characterise other types of view configuration, such as projection views, union views, and in particular, join views. This will enable us to test and refine the application of SIGs in this context.
 
The discussion in this paper focused only on the relational context, but relative information capacity and the SIG formalism are data model agnostic. It would therefore be interesting to investigate the application of these techniques to view updating contexts beyond the Relational Model (e.g., deductive databases).
 
It is unclear at present whether the omission of inclusion dependencies such as foreign keys is significant. If they are significant, the question then is how best to represent them in the SIG formalism. Adding such constraints will clearly change the structure of a SIG, but we suspect that this will not change the relationship between the relative information capacities of different schemas.
 
It is interesting to note that with the equivalent schemas \(\SC{1}\) and \(\SC{2}\), we were able to propagate all of the constraints from the base schema \(\SC{0}\) (Section~\ref{sec-constraints-s-ii}), whereas with the incomparable schemas \(\SC{1}\) and \(\SC{3}\), only a subset of the constraints could be propagated (Section~\ref{sec-constraints-s-iii}). A reasonable conjecture is that the degree to which constraints can be propagated from \(\SC{0}\) to its sub-schemas could be a direct indicator of information equivalence among the sub-schemas, but this needs to be further investigated.
 
Finally, we have recently discovered further work that explores and expands upon the concepts of information capacity and meaning within data and database schemas (e.g., \cite{Mantri.R-2010a-Data,Wang.X-2005a-SIG,Xu.K-2009a-Defining}). Some of these ideas may be applicable to our work, and need to be investigated in more detail.
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\balance
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\bibliographystyle{abbrv}
\bibliography{APCCM2017_Stanger}
 
\end{document}
View
1830
APCCM_2017/Presentation/View_Updating.tex 0 → 100644
\documentclass{beamer}
 
 
\usepackage[no-math]{fontspec}
\usepackage{xunicode}
\usepackage{xltxtra}
\usepackage{bm}
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{relalg}
\usepackage{booktabs}
\usepackage{mathtools}
\usepackage{hyperref}
 
 
% Beamer setup
\usefonttheme{structurebold}
\useinnertheme{rectangles}
\usenavigationsymbolstemplate{}
\setbeamertemplate{footline}[frame number]
 
 
% TikZ setup
\usetikzlibrary{positioning}
\usetikzlibrary{graphs}
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{calc}
\usetikzlibrary{arrows}
 
 
% fontspec setup
\defaultfontfeatures{Mapping=tex-text}
\setmainfont{Minion Pro}
\setsansfont[Scale=MatchUppercase,BoldFont={Open Sans}]{Open Sans Light}
\setmonofont[Scale=MatchLowercase]{Letter Gothic 12 Pitch}
 
 
% graphicx setup
\graphicspath{{images/}}
 
 
% custom macros
% "empty" arrow tip
\pgfarrowsdeclare{:}{:}{}{}
% custom bar arrow tip, offset from end of line (use "empty" tip at line ends if no >)
\tikzset{crossbar/.tip={|[scale width=1.75,sep=0.25em]}}
% various edge styles for TikZ
\tikzset{
function/.style={arrows={->}},
injection/.style={arrows={<-}},
total/.style={arrows={:{crossbar}-}},
surjection/.style={arrows={-{crossbar}:}},
bijection/.style={arrows={<{crossbar}-{crossbar}>}},
projection/.style={arrows={:{crossbar}-{crossbar}>}},
projection left/.style={arrows={:{crossbar}-{crossbar}>},edge label={\scriptsize\(\RelProject\)}},
projection right/.style={arrows={:{crossbar}-{crossbar}>},edge label'={\scriptsize\(\RelProject\)}},
selection left/.style={arrows={<-{crossbar}>},edge label={\scriptsize\(\RelRestrict\)}},
selection right/.style={arrows={<-{crossbar}>},edge label'={\scriptsize\(\RelRestrict\)}},
funcdep left/.style={arrows={:{crossbar}-{crossbar}>},edge node={node[sloped,midway,above] {\scriptsize\emph{key}}}},
funcdep right/.style={arrows={:{crossbar}-{crossbar}>},edge node={node[sloped,midway,below] {\scriptsize\emph{key}}}},
surtotal/.style={arrows={:{crossbar}-{crossbar}:}},
input keep/.style={structure,thick},
input delete/.style={structure!40,thick,dashed},
output/.style={alert,thick},
output temp/.style={alert,thick,dashed},
path 1/.style={green!60!black,thick},
path 2/.style={orange,thick},
invisible/.style={opacity=0},
visible on/.style={alt=#1{}{invisible}},
input on/.style={alt=#1{input keep}{}},
output on/.style={alt=#1{output}{}},
alt/.code args={<#1>#2#3}{\alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}}}
}
% projection and selection edge annotations for TikZ
\newcommand{\ProjectionAnnotation}[3][]{%
\path (#2) to node[above,#1] {\scriptsize\(\RelProject\)} (#3);%
}
\newcommand{\SelectionAnnotation}[3][]{%
\path (#2) to node[above,#1] {\scriptsize\(\RelRestrict\)} (#3);%
}
 
 
\newcounter{constraint}
 
% misc
\newcommand{\todo}[1]{\textbf{!!TODO!!} {[#1]}}
 
% commonly used elements
\newcommand{\identifier}[1]{\ensuremath{\mathit{#1}}}
\newcommand{\LS}{\identifier{LS}}
\newcommand{\NLS}{\identifier{NLS}}
\newcommand{\LSsub}{\identifier{L}}
\newcommand{\NLSsub}{\identifier{N}}
\newcommand{\ST}{\identifier{ST}}
\newcommand{\SC}{\identifier{SC}}
\newcommand{\STsub}{\identifier{T}}
\newcommand{\SCsub}{\identifier{C}}
\newcommand{\TC}{\identifier{TC}}
\newcommand{\TCsub}{\identifier{C}}
\newcommand{\Sno}{\identifier{Sno}}
\newcommand{\Sname}{\identifier{Sname}}
\newcommand{\Status}{\identifier{Status}}
\newcommand{\City}{\identifier{City}}
 
\newcommand{\Type}[1]{\ensuremath{T_{#1}}}
\newcommand{\TT}[1]{\ensuremath{T_{\{#1\}}}}
 
\newcommand{\CityLondon}{\ensuremath{\{\City\colon\allowbreak\text{`\emph{London}'}\}}}
\newcommand{\TCityMinusLondon}{\ensuremath{\Type{\City} \setminus \CityLondon}}
\newcommand{\TSSC}{\ensuremath{\Type{\Sname} \times \Type{\Status} \times \Type{\City}}}
\newcommand{\TSSL}{\ensuremath{\Type{\Sname} \times \Type{\Status} \times \CityLondon}}
\newcommand{\TSSNL}{\ensuremath{\Type{\Sname} \times \Type{\Status} \times (\TCityMinusLondon)}}
 
\newcommand{\TLSPlusNLS}{\ensuremath{\Type{\LS} + \Type{\NLS}}}
\newcommand{\TTLSPlusNLS}{\ensuremath{\TT{\LS} + \TT{\NLS}}}
\newcommand{\TLSPlusNLSsub}{\ensuremath{\Type{\LSsub} + \Type{\NLSsub}}}
\newcommand{\TTLSPlusNLSsub}{\ensuremath{\TT{\LSsub} + \TT{\NLSsub}}}
 
\newcommand{\StackTLSPlusNLS}{\ensuremath{\begin{array}{c}\Type{\LS}\,+ \\ \Type{\NLS}\end{array}}}
\newcommand{\StackTTLSPlusNLS}{\ensuremath{\begin{array}{c}\TT{\LS}\,+ \\ \TT{\NLS}\end{array}}}
\newcommand{\StackTLSPlusNLSsub}{\ensuremath{\begin{array}{c}\Type{\LSsub}\,+ \\ \Type{\NLSsub}\end{array}}}
\newcommand{\StackTTLSPlusNLSsub}{\ensuremath{\begin{array}{c}\TT{\LSsub}\,+ \\ \TT{\NLSsub}\end{array}}}
\newcommand{\StackTSSC}{\ensuremath{\begin{array}{c}\Type{\Sname}\,\times \\ \Type{\Status} \times \Type{\City}\end{array}}}
\newcommand{\StackTSSL}{\ensuremath{\begin{array}{c}\Type{\Sname} \times \Type{\Status}\,\times \\ \CityLondon\end{array}}}
\newcommand{\StackTSSNL}{\ensuremath{\begin{array}{c}\Type{\Sname} \times \Type{\Status}\,\times \\ (\TCityMinusLondon)\end{array}}}
\newcommand{\StackTCityMinusLondon}{\ensuremath{\begin{array}{c}\Type{\City}\,\setminus \\ \CityLondon\end{array}}}
 
\newcommand{\schema}[1]{\ensuremath{\mathcal{S}_{#1}}}
 
% dominates
\newcommand{\Dominates}[2]{\ensuremath{#2 \preceq #1}}
\newcommand{\Equivalent}[2]{\ensuremath{#1 \equiv #2}}
 
% SIG notation (in text)
\newcommand{\Sedge}[1]{\ensuremath{\sigma_{\textrm{#1}}}}
\newcommand{\SedgeP}[1]{\ensuremath{\sigma_{\textrm{#1}}^{'}}}
 
\newcommand{\medmid}{\raise.125ex\hbox{\scalebox{1}[0.75]{$\mid$}}}
 
% General SIG edges for use in formulas.
% Adapted from: http://tex.stackexchange.com/questions/96330/adding-symbols-at-the-ends-of-a-horizontal-line
\makeatletter
\newlength{\@annotskipleft}
\newlength{\@annotskipright}
% #1 = left edge component
% #2 = right edge component
% #3 = left bar annotation
% #4 = right bar annotation
\newcommand\@sig@edge[4]{%
\let\@middle\joinrel%
\ifx#1\relbar%
\@annotskipleft=.3em%
% scrunch up the bare line so it's similar length to \long...arrow
\ifx#2\relbar\def\@middle{\joinrel\joinrel\relbar\joinrel\joinrel}\fi%
\else%
% arrows need a little more clearance
\@annotskipleft=.4em%
\fi%
\ifx#2\relbar\@annotskipright=.3em\else\@annotskipright=.4em\fi%
\mathrel{\ooalign{$#1\@middle#2$\cr\hskip\@annotskipleft$#3$\hfil$#4$\hskip\@annotskipright\cr}}%
}
 
% 0 = nothing
% 1 = bar
% 2 = arrowhead
% 3 = both
\def\@sigedge#1#2{%
\ifcase\numexpr#1*4+#2\relax%
\@sig@edge{\relbar}{\relbar}{}{}\or % 00 = -----
\@sig@edge{\relbar}{\relbar}{}{\medmid}\or % 01 = ---+-
\@sig@edge{\relbar}{\rightarrow}{}{}\or % 02 = ---->
\@sig@edge{\relbar}{\rightarrow}{}{\medmid}\or % 03 = ---+>
\@sig@edge{\relbar}{\relbar}{\medmid}{}\or % 10 = -+---
\@sig@edge{\relbar}{\relbar}{\medmid}{\medmid}\or % 11 = -+-+-
\@sig@edge{\relbar}{\rightarrow}{\medmid}{}\or % 12 = -+-->
\@sig@edge{\relbar}{\rightarrow}{\medmid}{\medmid}\or % 13 = -+-+>
\@sig@edge{\leftarrow}{\relbar}{}{}\or % 20 = <----
\@sig@edge{\leftarrow}{\relbar}{}{\medmid}\or % 21 = <--+-
\@sig@edge{\leftarrow}{\rightarrow}{}{}\or % 22 = <--->
\@sig@edge{\leftarrow}{\rightarrow}{}{\medmid}\or % 23 = <--+>
\@sig@edge{\leftarrow}{\relbar}{\medmid}{}\or % 30 = <+---
\@sig@edge{\leftarrow}{\relbar}{\medmid}{\medmid}\or % 31 = <+-+-
\@sig@edge{\leftarrow}{\rightarrow}{\medmid}{}\or % 32 = <+-->
\@sig@edge{\leftarrow}{\rightarrow}{\medmid}{\medmid} % 33 = <+-+>
\fi%
}
 
\newcommand{\sigedge}[1]{\ensuremath{\@sigedge#1}}
\makeatother
 
\newcommand{\Edge}{\sigedge{00}}
\newcommand{\Total}{\sigedge{10}}
\newcommand{\Surjective}{\sigedge{01}}
\newcommand{\SurTotal}{\sigedge{11}}
\newcommand{\Functional}{\sigedge{02}}
\newcommand{\Injective}{\sigedge{20}}
\newcommand{\Bijective}{\sigedge{33}}
 
% Hack to get the overset symbols to appear at the right height.
% \smash removes the spacing around the operator, hence \mathop.
\newcommand{\LabelledEdge}[2]{\mathop{\overset{\raisebox{0.3em}{\scriptsize\ensuremath{#2}}}{\smash[t]{#1}}}}
\newcommand{\ProjectionEdge}{\LabelledEdge{\sigedge{13}}{\RelProject}}
\newcommand{\SelectionEdge}{\LabelledEdge{\sigedge{23}}{\RelRestrict}}
\newcommand{\TrivialProjection}{\ensuremath{\LabelledEdge{\Bijective}{\RelProject}}}
\newcommand{\TrivialSelection}{\ensuremath{\LabelledEdge{\Bijective}{\RelRestrict}}}
\newcommand{\KeyEdge}{\ensuremath{\LabelledEdge{\sigedge{13}}{\mathit{key}}}}
 
% Constraints.
\newcommand{\Constraint}[2][]{C\ensuremath{_{#2}\ifx&#1&\else^{#1}\fi}}
\newenvironment{ConstraintList}[1][]{%
\begin{list}{%
\bfseries%
\ifx&#1&%
\Constraint{\ensuremath{\bm{\arabic{constraint}}}}%
\else%
\Constraint[\ensuremath{\bm{#1}}]{\ensuremath{\bm{\arabic{constraint}}}}%
\fi%
}%
{\usecounter{constraint}}%
}{\end{list}}
 
 
% Draw a grid to aid TikZ picture drawing/debugging.
\newcommand{\DrawGridTikZ}[2]{%
\begin{scope}[color=lightgray]
\draw[thin,step=1mm] (0.0,0.0) grid (#1,#2);%
\draw[thick,step=1cm] (-0.1,-0.1) grid (#1+0.1,#2+0.1);%
\pgftext[top,at={\pgfxy(0.0,-0.2)}]{\tiny 0}%
\pgftext[right,at={\pgfxy(-0.2,0.0)}]{\tiny 0}%
\foreach \x in {1,...,#1} {\pgftext[top,at={\pgfxy(\x,-0.2)}]{\tiny\x}}%
\foreach \y in {1,...,#2} {\pgftext[right,at={\pgfxy(-0.2,\y)}]{\tiny\y}}%
\end{scope}
}
 
 
% Sometimes we want to put a comment in tiny text on the next line, but the default line skip
% will insert too much vertical space. Put a \tinyskip at the end of the line instead.
\def\tinyskip{\\[-0.33\baselineskip]}
 
 
% Bold-face text using the structure colour.
\newcommand<>{\structurebf}[1]{\structure#2{\textbf{#1}}}
 
 
% preamble
\title{Characterising relational view updates \\ using relative information capacity}
\author{\large Nigel Stanger \\[0.75cm]
\hspace*{0.5cm}
\includegraphics[scale=0.2]{Business_School_LS_ID_crop}
\hspace*{0.57cm}
\rule{1pt}{1.482cm}
\hspace*{0.46cm}
\rmfamily\small
\raisebox{0.4cm}{\shortstack[l]{Department of \\ Information Science}}
}
\date{February 1, 2017}
 
 
\begin{document}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame
{
\thispagestyle{empty}
\titlepage
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame
{
\centering
\begin{tikzpicture}
\node (book) {\includegraphics[height=8cm,keepaspectratio]{Date-ViewUpdatingandRelationalTheory-large.png}};
\node[anchor=north] (url) at (book.south) {\tiny\href{http://shop.oreilly.com/product/0636920028437.do}{http://shop.oreilly.com/product/0636920028437.do} (2013)};
\node (date) [below=0.8cm of book.east] {\includegraphics[height=2.2cm,keepaspectratio]{date.png}};
\only<2->{\fill[fill,yellow,semitransparent] (-0.25,-0.75) rectangle (2.55,-0.4);}
% \DrawGridTikZ{7.0}{8.0}
\end{tikzpicture}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame
{
\frametitle{Some quick terminology}
\begin{columns}
\begin{column}{0.4\textwidth}
\centering
\includegraphics[width=0.95\columnwidth,keepaspectratio]{Date-SQLandRelationalTheory.png}
\tiny\href{http://shop.oreilly.com/product/0636920022879.do}{http://shop.oreilly.com/product/0636920022879.do} \\
(second edition, 2011)
\note<1>[item]{This is the second edition; the third edition is now available.}
\end{column}
\begin{column}{0.6\textwidth}
\structurebf{Value vs.\ variable}
\begin{itemize}
\item a value is immutable (“2”)
\item a variable contains a value
\item[\(\Rightarrow\)] \emph{relation} value, variable (\emph{relvar})
\end{itemize}
\medskip
\structurebf{Relation \alert<2>{heading} \& \alert<3>{body}}
\medskip
{\scriptsize
\begin{tabular}{c|l|l|r|l|}
\cline{2-5}
\textbf{S} & \textbf{\alert<2>{Sno}} & \textbf{\alert<2>{Sname}} & \textbf{\alert<2>{Status}} & \textbf{\alert<2>{City}} \\
\cline{2-5}
& \alert<3>{S1} & \alert<3>{Smith} & \alert<3>{20} & \alert<3>{London} \\
& \alert<3>{S2} & \alert<3>{Jones} & \alert<3>{30} & \alert<3>{Paris} \\
\cline{2-5}
\end{tabular}}
\bigskip
\structurebf{Type (\(\bm{\Type{x}}\))}
\begin{itemize}
\item (finite) set of values that something (\(x\)) can take
\end{itemize}
\medskip
\structurebf{Date doesn’t believe in nulls}\tinyskip
{\tiny (but it doesn’t really matter here)}
\end{column}
\end{columns}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame
{
\frametitle{More on types}
\structurebf{Attribute type (\(\bm{\Type{A}}\))}
\begin{itemize}
\item set of all possible values that \(A\) can take
\item[=] \(\{v_{1}\text{,}\, v_{2}\text{,}\, \dotsc\text{,}\, v_{m}\}\) {\tiny (for finite \(m\))}
\end{itemize}
\medskip
\structurebf{Tuple type (\(\bm{\TT{R}}\)) of relvar \(\bm{R}\)}
\begin{itemize}
\item set of all possible tuple values with \(R\)’s heading
\item[=] Cartesian product of \(R\)’s attribute types
\item[=] \(\Type{A_{1}} \times \Type{A_{2}} \times \dotsb \times \Type{A_{n}}\)
\end{itemize}
\medskip
\structurebf{Relation type (\(\bm{\Type{R}}\)) of relvar \(\bm{R}\)}
\begin{itemize}
\item set of all possible relation values with \(R\)’s heading
\item[=] every possible combination of elements of \(\TT{R}\)
\end{itemize}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame
{
\frametitle{Date’s (hoary and clichéd) suppliers-and-parts schema}
\structurebf{\(\bm{S\{\Sno\text{,}\, \Sname\text{,}\, \Status\text{,}\, \City\}}\)}
\begin{quote}
\upshape
Supplier \(\Sno\) is under contract, is named \(\Sname\), has status \(\Status\), and is located in city \(\City\)
\end{quote}
\bigskip
\structurebf{\(\bm{P\{\mathit{Pno}\text{,}\, \mathit{Pname}\text{,}\, \mathit{Colour}\text{,}\, \mathit{Weight}\text{,}\, \City\}}\)}
\begin{quote}
\upshape
Part \(\mathit{Pno}\) is used in the enterprise, is named \(\mathit{Pname}\), has colour \(\mathit{Colour}\), and weight \(\mathit{Weight}\)
\end{quote}
\bigskip
\structurebf{\(\bm{SP\{\Sno\text{,}\, \mathit{Pno}\text{,}\, \mathit{Qty}\}}\)}
\begin{quote}
\upshape
Supplier \(\Sno\) supplies (ships) part \(\mathit{Pno}\) in quantity \(\mathit{Qty}\)
\end{quote}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame
{
\frametitle{The view update problem}
 
\centering
\Large
\begin{tikzpicture}[every edge/.style={draw,semithick}]
\node (vdb) {\(V(\mathit{DB})\)};
\node (db) [below=18mm of vdb] {\(\mathit{DB}\vphantom{(')}\)};
 
\node (vdbp) [right=4cm of vdb] {\(V(\mathit{DB}')\)};
\node (uvdb) [left=-1mm of vdbp] {\(U(V(\mathit{DB})) \stackrel{?}{=}\)};
 
\node (dbp) at (db -| vdbp) {\(\mathit{DB}\smash[t]{'}\vphantom{()}\)};
\node (tudb) [left=-1mm of dbp] {\(T(U)(\mathit{DB}) =\)};
 
\graph{
{ (db), (dbp) } -> [edge label={\(V\)},swap] { (vdb), (vdbp) };
 
(vdb) -> [edge node={node (u) [above=-0.6mm] {\(U\)}}] (uvdb);
(db) -> [edge node={node (tu) [above=-0.6mm] {\(T(U)\)}}] (tudb);
 
(u) -> [double equal sign distance=2pt,-implies,edge label={\(T\)}] (tu);
};
\end{tikzpicture}
\\
\tiny Keller (1985) \emph{Algorithms for translating view updates to database updates for views involving selections, projections, and joins}
\note<1>{Keller: “The user specifies update \(U\) against the view of the database, \(V(\mathit{DB})\). The view update translator \(T\) supplies the database update \(T(U)\), which results in \(DB'\) when applied to the database. The new view state is \(V(\mathit{DB}')\). This translation has no side effects in the view if \(V(\mathit{DB}') = U(V(\mathit{DB}))\), that is, if the view has changed precisely in accordance with the user’s request.”}
\bigskip
\normalsize
\begin{uncoverenv}<2->
\structurebf{Problem:} there are often multiple update translations \(T(U)\) that produce the effect of \(U\) but have quite different effects on \(\mathit{DB}\).
\bigskip
How do we choose?
\end{uncoverenv}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame
{
\frametitle{The view update problem}
\begin{columns}
\begin{column}[T]{0.45\textwidth}
\footnotesize\color{gray!70}
\begin{tabular}{|l|l|r|l|}
\multicolumn{4}{l}{\textbf{S}} \\
\hline
\textbf{Sno} & \textbf{Sname} & \textbf{Status} & \textbf{City} \\
\hline
S1 & Smith & 20 & London \\
S2 & Jones & 30 & Paris \\
S3 & Blake & 30 & Paris \\
\only<1-2,4->{S4} & \only<1-2,4->{Clark} & \only<1-2,4->{20} & \only<1-2,4,6>{London}\only<5>{\alert{???}}\only<7->{\alert{Paris}} \\
S5 & Adams & 30 & Athens \\
\hline
\end{tabular}
\end{column}
\begin{column}[T]{0.45\textwidth}
\footnotesize
\begin{tabular}{|l|l|r|l|}
\multicolumn{4}{l}{\(\bm{\text{\textbf{LS}} = \RelRestrict_{\text{\textbf{City}} = \text{\textbf{`London'}}} \,\text{\textbf{S}}}\)} \\
\hline
\textbf{Sno} & \textbf{Sname} & \textbf{Status} & \textbf{City} \\
\hline
S1 & Smith & 20 & London \\
\only<1-2,4,6>{S4} & \only<1-2,4,6>{Clark}& \only<1-2,4,6>{20} & \only<1-2,4,6>{London} \\
\hline
\end{tabular}
\end{column}
\end{columns}
\bigskip
\structurebf{Delete S4 from LS?}
\begin{enumerate}
\item<2-> Delete S4 from S.
\item<4-> Change S4’s city to anything other than London.
\end{enumerate}
\bigskip
\begin{uncoverenv}<6->
\structurebf{What if we instead \emph{change} S4’s city to Paris in LS?}
\begin{itemize}
\item<7->[\(\Rightarrow\)] changing S4’s city to Paris in S
\item<7-> side effect: some changes behave like deletes!
\end{itemize}
\end{uncoverenv}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame
{
\frametitle{The view update problem}
\tiny
\begin{columns}
\begin{column}[T]{0.35\textwidth}
\color{gray!70}
\begin{tabular}{|l|l|r|l|}
\multicolumn{4}{l}{\textbf{S}} \\
\hline
\textbf{Sno} & \textbf{Sname} & \textbf{Status} & \textbf{City} \\
\hline
\only<1-6,8-9>{S1}\only<7>{\alert{S6}} & \only<1-9>{Smith} & \only<1-9>{20} & \only<1-9>{London} \\
S2 & Jones & 30 & Paris \\
S3 & Blake & 30 & Paris \\
S4 & Clark & 20 & London \\
S5 & Adams & 30 & Athens \\
\hline
\end{tabular}
\bigskip
\begin{tabular}{|l|l|r|}
\multicolumn{3}{l}{\textbf{SP}} \\
\hline
\textbf{Sno} & \textbf{Pno} & \textbf{Qty} \\
\hline
\only<1-2,4,6,8-9>{S1}\only<5>{\alert{S3}}\only<7>{\alert{S6}} & \only<1-2,4-9>{P1} & \only<1-2,4-9>{300} \\
S1 & P2 & 200 \\
S1 & P3 & 400 \\
S1 & P4 & 200 \\
S1 & P5 & 100 \\
S1 & P6 & 100 \\
S2 & P1 & 300 \\
S2 & P2 & 400 \\
S3 & P2 & 200 \\
S4 & P2 & 300 \\
S4 & P4 & 300 \\
S4 & P5 & 400 \\
\hline
\end{tabular}
\bigskip\medskip
\color{black}
\end{column}
\begin{column}[T]{0.55\textwidth}
\begin{tabular}{|l|l|r|l|l|r|}
\multicolumn{4}{l}{\(\bm{\mathsf{SSP} = \mathsf{S} \RelNaturalJoin \mathsf{SP}}\)} \\
\hline
\textbf{Sno} & \textbf{Sname} & \textbf{Status} & \textbf{City} & \textbf{Pno} & \textbf{Qty} \\
\hline
\only<1-2,4,6,8-9>{S1}\only<5>{\alert{S3}}\only<7>{\alert{S6}} & \only<1-2,4,6-9>{Smith}\only<5>{\alert{Blake}} & \only<1-2,4,6-9>{20}\only<5>{\alert{30}} & \only<1-2,4,6-9>{London}\only<5>{\alert{Paris}} & \only<1-2,4-9>{P1} & \only<1-2,4-9>{300} \\
\only<1-6,8-9>{S1}\only<7>{\alert{S6}} & \only<1-9>{Smith} & \only<1-9>{20} & \only<1-9>{London} & \only<1-9>{P2} & \only<1-9>{200} \\
\only<1-6,8-9>{S1}\only<7>{\alert{S6}} & \only<1-9>{Smith} & \only<1-9>{20} & \only<1-9>{London} & \only<1-9>{P3} & \only<1-9>{400} \\
\only<1-6,8-9>{S1}\only<7>{\alert{S6}} & \only<1-9>{Smith} & \only<1-9>{20} & \only<1-9>{London} & \only<1-9>{P4} & \only<1-9>{200} \\
\only<1-6,8-9>{S1}\only<7>{\alert{S6}} & \only<1-9>{Smith} & \only<1-9>{20} & \only<1-9>{London} & \only<1-9>{P5} & \only<1-9>{100} \\
\only<1-6,8-9>{S1}\only<7>{\alert{S6}} & \only<1-9>{Smith} & \only<1-9>{20} & \only<1-9>{London} & \only<1-9>{P6} & \only<1-9>{100} \\
S2 & Jones & 30 & Paris & P1 & 300 \\
S2 & Jones & 30 & Paris & P2 & 400 \\
S3 & Blake & 30 & Paris & P2 & 200 \\
S4 & Clark & 20 & London & P4 & 300 \\
S4 & Clark & 20 & London & P5 & 400 \\
S4 & Clark & 20 & London & P2 & 200 \\
\hline
\end{tabular}
\bigskip
\scriptsize
\structurebf{Delete first row of SSP?}
\begin{enumerate}
\item<2-> Delete \(\text{SP}\{\text{S1}\text{,}\, \text{P1}\text{,}\, \text{300}\}\).
\item<4-|alert@8> Change supplier number in \(\text{SP}\{\text{S1}\text{,}\, \text{P1}\text{,}\, \text{300}\}\).
\item<6-|alert@8> Change S1’s supplier number in S.
\item<9-> Delete S1 from S. {\tiny (nuclear option)}
\end{enumerate}
\uncover<8>{\tiny\alert{\beamerbutton{technically correct}}}
\uncover<11>{\structurebf{Changes are even more problematic}}
\end{column}
\end{columns}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame
{
\frametitle{Date's solution}
\begin{itemize}
\item Explicitly specify \emph{all} constraints in advance.\tinyskip
{\tiny (``metadata approach'' with similar issues to many earlier attempts)}
\item Automatically generate \emph{compensatory rules} from constraints.\tinyskip
{\tiny (kind of like declarative triggers)}
\item No problem if original and view schemas are \emph{information equivalent}.
{\tiny (no hidden information)}
\begin{itemize}
\item[] ``if and only if the constraints that apply to [schema \(\schema{1}\)] and [schema \(\schema{2}\)] are such that every proposition that can be represented by [\(\schema{1}\)] can be represented by [\(\schema{2}\)] and vice versa''\\
\hfill{\tiny Date (2013) \emph{View Updating \& Relational Theory}}
\end{itemize}
\medskip
\item[BUT:] Still potential for ambiguity when views hide information.\tinyskip
{\tiny(i.e., no longer information equivalent)}
\medskip
\item Dates approach involves \emph{…a clear element of pragma…}”.\tinyskip
{\tiny (essentially he argues for common sense ambiguity resolution)}
\end{itemize}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame
{
\frametitle{Relative information capacity}
\framesubtitle{}
\begin{itemize}
\item Information content of a schema. {\tiny (including constraints)}
\item Determines set of all valid instances of a schema.
\item Can only be compared, not quantitatively measured.
\begin{description}
\item[equivalence] \(\Equivalent{\schema{1}}{\schema{2}}\)
\item[dominance] \(\Dominates{\schema{2}}{\schema{1}}\)
\end{description}
\item Mappings between schemas can preserve:
\begin{description}
\item[information] information capacity increases (\(\Rightarrow\Dominates{\schema{2}}{\schema{1}}\))
\item[equivalence] information capacity stays the same (\(\Rightarrow\Equivalent{\schema{1}}{\schema{2}}\))
\end{description}
\end{itemize}
\flushright\tiny
Hull (1986) \emph{Relative information capacity of simple relational database schemata} \\
Miller (1993) \emph{The use of information capacity in schema integration and translation}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame
{
\frametitle{Schema intension graphs (SIGs)}
\structurebf{Nodes = typed domains (sets of values)}
\begin{itemize}
\item simple
\item constructed (\(\times\), \(+\))
\end{itemize}
\medskip
\structurebf{Edges = associations between domains} {\tiny (binary relations)}
\begin{itemize}
\item Simple constraints:
\begin{itemize}
\item total (\(A \Total B\)): defined for all \(a \in A\)
\item surjective (\(A \Surjective B\)): defined for all \(b \in B\)
\item functional (\(A \Functional B\)): \(a\) maps to at most one \(b\)
\item injective (\(A \Injective B\)): \(b\) maps to at most one \(a\)
\item bijective (\(A \Bijective B\)): all four
\end{itemize}
\item Selection (\(A \SelectionEdge B\)): \(B\) is a subset of \(A\). {\tiny (\(\Rightarrow B\) is a specialisation or subtype of \(A\))}
\item Projection (\(A \ProjectionEdge B\)): \(B\) is a projection of \(A\). {\tiny (\(\Rightarrow A\) is a constructed tuple type)}
\end{itemize}
 
\flushright\tiny
Miller (1994) \emph{Schema equivalence in heterogeneous systems: Bridging theory and practice} \\
Miller (1994) \emph{Schema intension graphs: A formal model for the study of schema equivalence}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame<1-2>[label=frame.SIG.example]
{
\frametitle{Example SIG for relvar \(\bm{S\{\Sno\text{,}\, \Sname\text{,}\, \Status\text{,}\, \City\}}\)}
\framesubtitle{\uncover<3>{\hyperlink{frame.SIG.Sone}{\beamerreturnbutton{Back}}}}
\centering\Large
\begin{tikzpicture}[level distance=18mm]
\node (TS) {\(\Type{S}\)};
\node (TTS) [right=1.5cm of TS] {\(\TT{S}\)}
[sibling distance=4.5cm]
child[arrows={<{crossbar}-{crossbar}>}] {node (TSno) {\(\Type{\Sno}\)}}
child[arrows={:{crossbar}-{crossbar}>}] {node (TSSC) {\(\TSSC\)}
[sibling distance=22mm]
child[arrows={:{crossbar}-{crossbar}>}] {node (TSname) {\(\Type{\Sname}\)}}
child[arrows={:{crossbar}-{crossbar}>}] {node (TStatus) {\(\Type{\Status}\)}}
child[arrows={:{crossbar}-{crossbar}>}] {node (TCity) {\(\Type{\City}\)}}};
\node (TTSexpansion) [right=-2mm of TTS,visible on=<2>,alert] {\tiny\(= \Type{\Sno} \times \Type{\Sname} \times \Type{\Status} \times \Type{\City}\)};
% TS to T{S}
\draw[arrows={:{crossbar}-{crossbar}:}] (TS) to (TTS);
% FD
\draw[arrows={:{crossbar}-{crossbar}>}] (TSno) to node[below=-2pt] {\scriptsize\emph{key}} (TSSC);
% projection edges
\ProjectionAnnotation[above left=-2pt and -4pt]{TTS}{TSno}
\ProjectionAnnotation[above right=-2pt and -4pt]{TTS}{TSSC}
 
\ProjectionAnnotation[above left=-2pt and -4pt]{TSSC}{TSname}
\ProjectionAnnotation[right=-2pt]{TSSC}{TStatus}
\ProjectionAnnotation[above right=-2pt and -4pt]{TSSC}{TCity}
\end{tikzpicture}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\begin{frame}[fragile]
\frametitle{SIGs for relational schemas}
\centering
\begin{tabular}{lll}
\toprule
\textbf{Relational} & \textbf{SIG} & \textbf{Notation} \\
\midrule
attribute type & simple domain & \(\Type{A}\) \\
tuple type & constructed domain (\(\times\)) & \(\TT{R}\) or \(\Type{A} \times \Type{B} \times \dotsc\) \\
relation type & simple domain\footnote{Or possibly a complex constructed type involving union?} & \(\Type{R}\) \\
\midrule
key\footnote{Implied by functional dependency.} & func., total, surj.\ edge & \(\Type{A} \KeyEdge \Type{B}\) \\
foreign key\footnote{Inclusion dependency.} & & \\
\midrule
restrict (\(\RelRestrict\)) & selection edge & \(A \SelectionEdge B\) or \(A \TrivialSelection B\)\footnote{Trivial case.} \\
project (\(\RelProject\)) & projection edge & \(A \ProjectionEdge B\) or \(A \TrivialProjection B\) \\
\bottomrule
\end{tabular}
\end{frame}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame
{
\frametitle{Comparing and transforming SIGs}
\begin{itemize}
\item Isomorphism between SIGs for \(\schema{1}\) and \(\schema{2}\) (both structure and semantics) indicates information equivalence:
\begin{itemize}
\item \(\Equivalent{\schema{1}}{\schema{2}}\) if we can make \(\schema{1}\) isomorphic to \(\schema{2}\) using equivalence preserving transformations {\tiny (or vice versa)}
\item \(\Dominates{\schema{2}}{\schema{1}}\) if we can make \(\schema{1}\) isomorphic to \(\schema{2}\) using information preserving transformations {\tiny (or vice versa)}
\item \(\schema{1}\) \& \(\schema{2}\) non-comparable if we cant make them isomorphic
\end{itemize}
\medskip
\item Transforming a SIG effectively transforms the schema.
\begin{itemize}
\item delete annotation, \(\RelRestrict\), \(\RelProject\) (\(\preceq\))
\item move and/or copy edge (\(\preceq\))
\item create/delete duplicate node: \(A \Rightarrow A \TrivialSelection A'\) (\(\equiv\))
\item delete bijective (trivial) selection edge: \(A \TrivialSelection A' \Rightarrow A \quad A'\) (\(\preceq\))
\item create recursive bijective selection edge: \(A \Rightarrow\)\smash{\tikz[baseline={(A.base)},every loop/.style={out=-25,in=25,bijection}]{\node (A) {\(A\)}; \path (A) edge [loop right] node {\scriptsize\(\RelRestrict\)} ();}}(\(\equiv\))
\end{itemize}
\end{itemize}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame
{
\frametitle{Gotta catch ’em all…}
\framesubtitle{(constraints, that is)}
\begin{columns}
\begin{column}[T]{0.5\textwidth}
\structurebf{Consider {\tiny (disjoint restriction views, Date Ch. 4)}}
\small
\begin{itemize}
\item \(S\{\Sno\text{,}\,\Sname\text{,}\,\Status\text{,}\,\City\}\)
\item view \(\LS = \RelRestrict_{\City = \text{`\emph{London}'}}S\)
\item view \(\NLS = \RelRestrict_{\City \ne \text{`\emph{London}'}}S\)
\item Base schema \(\schema{0} = \{S\text{,}\, \LS\text{,}\, \NLS\}\)
\item Sub-schemas \(\schema{1} = \{S\}\), \(\schema{2} = \{\LS\text{,}\, \NLS\}\), \(\schema{3} = \{LS\}\)
\item Date says \((\schema{1}\text{,}\, \schema{2})\) are informa- tion equivalent, \((\schema{1}\text{,}\, \schema{3})\) aren’t.\tinyskip
{\tiny (due to information hiding)}
\end{itemize}
\alert{To construct truly comparable SIGs, we need to propagate all the constraints that we can from \(\schema{0}\) to \(\schema{1}\), \(\schema{2}\), and \(\schema{3}\).}
\end{column}
\begin{column}[T]{0.5\textwidth}
\begin{uncoverenv}<2->
\structurebf{Constraints in \(\bm{\schema{0}}\)}
\tiny
\begin{ConstraintList}
\item \(\{\Sno\} \rightarrow \{\Sname\text{,}\, \Status\text{,}\, \City\}\) holds in (a) \(S\); (b) \(\LS\); and (c) \(\NLS\)\quad [key]
\item \(\RelProject_{\{\Sno\}}\LS \subseteq \RelProject_{\{\Sno\}}S\)\quad [FK \(\LS \rightarrow S\)]
\item \(\RelProject_{\{\Sno\}}\NLS \subseteq \RelProject_{\{\Sno\}}S\)\quad [FK \(\NLS \rightarrow S\)]
\item \(S = \LS \RelUnion \NLS\)
\item \(\RelRestrict_{\City \ne \text{`\emph{London}'}}\LS = \emptyset\)
\item \(\RelRestrict_{\City = \text{`\emph{London}'}}\NLS = \emptyset\)
\item \(\LS \RelIntersect \NLS = \emptyset\)
\item (a) \(\Type{S} = \Type{\LS} \RelUnion \Type{\NLS}\); (b) \(\TT{S} = \TT{\LS} \RelUnion \TT{\NLS}\)
\item (a) \(\Type{\LS} \subset \Type{S}\); (b) \(\TT{\LS} \subset \TT{S}\)
\item (a) \(\Type{\NLS} \subset \Type{S}\); (b) \(\TT{\NLS} \subset \TT{S}\)
\item \(\CityLondon \subset \Type{\City}\)
\item \((\TCityMinusLondon) \subset \Type{\City}\)
\item \(\TSSL \subset \TSSC\)
\item \(\TSSNL \subset \TSSC\)
\end{ConstraintList}
\end{uncoverenv}
\end{column}
\end{columns}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame
{
\frametitle{Propagating constraints to sub-schemas}
\framesubtitle{(ignoring \(\bm{\text{C}_{2}}\) and \(\bm{\text{C}_{3}}\) for now)}
\small
\structurebf{Directly propagate constraints that reference no relvars}
\begin{itemize}
\item[] \(\text{C}_{11}\), \(\text{C}_{12}\), \(\text{C}_{13}\), \(\text{C}_{14}\)
\end{itemize}
\medskip
\structurebf{Directly propagate constraints that reference sub-schema relvars only}
\begin{itemize}
\item[\(\schema{1}\)] \(\text{C}_{1}\)(a)
\item[\(\schema{2}\)] \(\text{C}_{1}\)(b), \(\text{C}_{1}\)(c), \(\text{C}_{5}\), \(\text{C}_{6}\), \(\text{C}_{7}\)
\item[\(\schema{3}\)] \(\text{C}_{1}\)(b), \(\text{C}_{5}\)
\end{itemize}
\medskip
\structurebf{Rewrite remaining constraints in terms of sub-schema relvars {\tiny (if possible)}}
\begin{itemize}
\item[\(\schema{1}\)] Replace \(\LS\) with \(\RelRestrict_{\City = \text{`\emph{London}'}}\,S\) and \(\NLS\) with \(\RelRestrict_{\City \ne \text{`\emph{London}'}}\,S\) in \(\text{C}_{1}\)(b), \(\text{C}_{1}\)(c), \(\text{C}_{4}\), \(\text{C}_{5}\), \(\text{C}_{6}\), \(\text{C}_{7}\), \(\text{C}_{8}\), \(\text{C}_{9}\), \(\text{C}_{10}\).
\item[\(\schema{2}\)] Replace \(S\) with \(\LS \RelUnion \NLS\) in \(\text{C}_{1}\)(a), \(\text{C}_{4}\), \(\text{C}_{8}\), \(\text{C}_{9}\), \(\text{C}_{10}\).
\item[\(\schema{3}\)] Can’t rewrite any remaining constraints.
\end{itemize}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame
{
\frametitle{Propagating constraints to sub-schemas}
\structurebf{Example}
\medskip
\begin{tabular}{lll}
\textcolor{structure}{\(\schema{0}\)} & \(\text{C}_{4}\) & \(S = \LS \RelUnion \NLS\) \\[4pt]
& & \Large\quad\(\Downarrow\) \\[4pt]
\textcolor{structure}{\(\schema{1}\)} & \(\text{C}_{4}^{\schema{1}}\) & \(S = (\RelRestrict_{\City = \text{`\emph{London}'}}\,S) \RelUnion (\RelRestrict_{\City \ne \text{`\emph{London}'}}\,S)\) \\[8pt]
\textcolor{structure}{\(\schema{2}\)} & \(\text{C}_{4}^{\schema{2}}\) & \(\LS \RelUnion \NLS = \LS \RelUnion \NLS\) \\[8pt]
\textcolor{structure}{\(\schema{3}\)} & — & (can’t be propagated) \\
\end{tabular}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame<1>[label=frame.SIG.Sone]
{
\frametitle{The SIGs: \(\bm{\schema{1} = \{S\}}\)}
\framesubtitle{\alt<1>{\hyperlink{frame.SIG.example<3>}{\beamergotobutton{Compare}}}{\hyperlink{frame.SIG.transform<9>}{\beamerreturnbutton{Back}}}}
\centering
\begin{tikzpicture}[ampersand replacement=\&,transform canvas={scale=0.8}]
\matrix[row sep=0.5cm]
{
\node (TLS) {\(\mathrlap{\,\Type{\LSsub}}\hphantom{\Type{\LS}}\)}; \&[7mm] \node (TTLS) {\(\mathrlap{\,\TT{\LSsub}}\hphantom{\TT{\LS}}\)}; \&[7mm] \&[4mm] \&[-4mm] \node (TSSL) {\(\StackTSSL\)}; \& \& \node (LSCity) {\(\CityLondon\)}; \\
\& \& \& \node (TSname) {\(\Type{\Sname}\)}; \\
\node (TLSPlusNLS) {\(\Type{S}\)}; \& \node (TTLSPlusNLS) {\(\TT{S}\)}; \& \node (TSno) {\(\Type{\Sno}\)}; \& \& \node (TSSC) {\(\StackTSSC\)}; \& \& \node (TCity) {\(\Type{City}\)}; \\
\& \& \& \& \& \node (TStatus) {\(\Type{\Status}\)}; \\
\node (TNLS) {\(\mathrlap{\,\:\Type{\NLSsub}}\hphantom{\Type{\NLS}}\)}; \& \node (TTNLS) {\(\mathrlap{\,\:\TT{\NLSsub}}\hphantom{\TT{\NLS}}\)}; \& \& \& \node (TSSNL) {\(\StackTSSNL\)}; \& \& \node (NLSCity) {\(\StackTCityMinusLondon\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
{ (TLS), (TNLS), (TLSPlusNLS) } -- { (TTLS), (TTNLS), (TTLSPlusNLS) },
};
% FDs
(TSno) -- [funcdep left,bend left] (TSSL);
(TSno) -- [funcdep right] (TSSNL);
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
{ (TTLSPlusNLS), (TTLS) } -- (TSno)
};
{ [edges=bijection,edge label'={\scriptsize\(\RelProject\)}]
(TTNLS) -- (TSno)
};
{ [edges=projection left]
(TTLS) -- (TSSL),
(TSSL) -- { (TStatus), (LSCity) },
};
{ [edges=projection right]
(TTNLS) -- (TSSNL),
(TSSC) -- { (TSname), (TStatus) },
(TSSL) -- (TSname),
(TSSNL) -- { (NLSCity), (TStatus) },
(TSSNL) -- [bend left=10] (TSname),
};
% selection edges
{ [edges=selection left]
{ (TLSPlusNLS), (TTLSPlusNLS) } -- { (TLS), (TTLS) },
(TSSC) -- { (TSSL), (TSSNL) },
(TCity) -- (NLSCity),
};
{ [edges=selection right]
{ (TLSPlusNLS), (TTLSPlusNLS) } -- { (TNLS), (TTNLS) },
(TCity) -- (LSCity),
};
% insert "gaps" into crossed edges
{ [edges={white,line width=1.5mm}]
(TSno) -- (TSSC),
(TSSC) -- (TCity),
(TTLSPlusNLS) -- [bend right] (TSSC),
};
(TSno) -- [funcdep right] (TSSC);
(TSSC) -- [projection left] (TCity);
(TTLSPlusNLS) -- [projection right,bend right] (TSSC),
};
\node[below=5mm of NLSCity,alert] (caption) {\scriptsize\shortstack[r]{\textbf{Note:} \(\LSsub = \RelRestrict_{\City = \text{`\emph{London}'}}\,S\) \\ \(\NLSsub = \RelRestrict_{\City \ne \text{`\emph{London}'}}\,S\)}};
\end{tikzpicture}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame
{
\frametitle{The SIGs: \(\bm{\schema{2} = \{\LS\text{,}\, \NLS\}}\)}
\framesubtitle{\invisible{\beamergotobutton{Compare}}}
\centering
\begin{tikzpicture}[ampersand replacement=\&,transform canvas={scale=0.8}]
\matrix[row sep=0.5cm]
{
\node (TLS) {\(\Type{\LS}\)}; \&[7mm] \node (TTLS) {\(\TT{\LS}\)}; \&[7mm] \&[4mm] \&[-4mm] \node (TSSL) {\(\StackTSSL\)}; \& \& \node (LSCity) {\(\CityLondon\)}; \\
\& \& \& \node (TSname) {\(\Type{\Sname}\)}; \\
\node (TLSPlusNLS) {\(\StackTLSPlusNLS\)}; \& \node (TTLSPlusNLS) {\(\StackTTLSPlusNLS\)}; \& \node (TSno) {\(\Type{\Sno}\)}; \& \& \node (TSSC) {\(\StackTSSC\)}; \& \& \node (TCity) {\(\Type{City}\)}; \\
\& \& \& \& \& \node (TStatus) {\(\Type{\Status}\)}; \\
\node (TNLS) {\(\Type{\NLS}\)}; \& \node (TTNLS) {\(\TT{\NLS}\)}; \& \& \& \node (TSSNL) {\(\StackTSSNL\)}; \& \& \node (NLSCity) {\(\StackTCityMinusLondon\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
{ (TLS), (TNLS), (TLSPlusNLS) } -- { (TTLS), (TTNLS), (TTLSPlusNLS) },
};
% FDs
(TSno) -- [funcdep left,bend left] (TSSL);
(TSno) -- [funcdep right] (TSSNL);
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
{ (TTLSPlusNLS), (TTLS) } -- (TSno)
};
{ [edges=bijection,edge label'={\scriptsize\(\RelProject\)}]
(TTNLS) -- (TSno)
};
{ [edges=projection left]
(TTLS) -- (TSSL),
(TSSL) -- { (TStatus), (LSCity) },
};
{ [edges=projection right]
(TTNLS) -- (TSSNL),
(TSSC) -- { (TSname), (TStatus) },
(TSSL) -- (TSname),
(TSSNL) -- { (NLSCity), (TStatus) },
(TSSNL) -- [bend left=10] (TSname),
};
% selection edges
{ [edges=selection left]
{ (TLSPlusNLS), (TTLSPlusNLS) } -- { (TLS), (TTLS) },
(TSSC) -- { (TSSL), (TSSNL) },
(TCity) -- (NLSCity),
};
{ [edges=selection right]
{ (TLSPlusNLS), (TTLSPlusNLS) } -- { (TNLS), (TTNLS) },
(TCity) -- (LSCity),
};
% insert "gaps" into crossed edges
{ [edges={white,line width=1.5mm}]
(TSno) -- (TSSC),
(TSSC) -- (TCity),
(TTLSPlusNLS) -- [bend right] (TSSC),
};
(TSno) -- [funcdep right] (TSSC);
(TSSC) -- [projection left] (TCity);
(TTLSPlusNLS) -- [projection right,bend right] (TSSC),
};
\node[below=4cm of current page.south west,structure] (caption) {\Large This is already isomorphic to the SIG for \(\schema{1}\), so \(\Equivalent{\schema{1}}{\schema{2}}\).};
\end{tikzpicture}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame
{
\frametitle{The SIGs: \(\bm{\schema{3} = \{\LS\}}\)}
\framesubtitle{\invisible{\beamergotobutton{Compare}}}
\centering
\begin{tikzpicture}[ampersand replacement=\&,transform canvas={scale=0.8}]
\matrix[row sep=0.5cm]
{
\node (TLS) {\(\Type{\LS}\)}; \&[7mm] \node (TTLS) {\(\TT{\LS}\)}; \&[7mm] \&[4mm] \&[-4mm] \node (TSSL) {\(\StackTSSL\)}; \& \& \node (LSCity) {\(\CityLondon\)}; \\
\& \& \& \node (TSname) {\(\Type{\Sname}\)}; \\
\node[invisible] (TLSPlusNLS) {\(\Type{S}\)}; \& \node[invisible] (TTLSPlusNLS) {\(\TT{S}\)}; \& \node (TSno) {\(\Type{\Sno}\)}; \& \& \node (TSSC) {\(\StackTSSC\)}; \& \& \node (TCity) {\(\Type{City}\)}; \\
\& \& \& \& \& \node (TStatus) {\(\Type{\Status}\)}; \\
\node[invisible] (TNLS) {\(\Type{\NLS}\)}; \& \node[invisible] (TTNLS) {\(\TT{\NLS}\)}; \& \& \& \node (TSSNL) {\(\StackTSSNL\)}; \& \& \node (NLSCity) {\(\StackTCityMinusLondon\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
(TLS) -- (TTLS),
(TLSPlusNLS) --[invisible] (TTLSPlusNLS),
(TNLS) --[invisible] (TTNLS),
};
% FDs
(TSno) -- [funcdep left,bend left,invisible] (TSSL);
(TSno) -- [funcdep right,invisible] (TSSNL);
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
(TTLS) -- (TSno)
};
{ [edges=projection left]
(TTLS) -- (TSSL),
(TSSL) -- { (TStatus), (LSCity) },
(TTLSPlusNLS) --[invisible] (TSno),
};
{ [edges=projection right]
(TSSC) -- { (TSname), (TStatus) },
(TSSL) -- (TSname),
(TSSNL) -- { (NLSCity), (TStatus) },
(TSSNL) -- [bend left=10] (TSname),
(TTNLS) --[invisible] (TSno),
(TTNLS) -- [arrows={:->},invisible] (TSSNL),
};
% selection edges
{ [edges=selection left]
(TSSC) -- { (TSSL), (TSSNL) },
(TCity) -- (NLSCity),
};
{ [edges=selection right]
(TCity) -- (LSCity),
};
{ [edges=bijection,edge label={\scriptsize\(\RelRestrict\)}]
{ (TLS), (TTLS) } -- [invisible] { (TLSPlusNLS), (TTLSPlusNLS) },
{ (TLSPlusNLS), (TTLSPlusNLS) } -- [invisible] { (TNLS), (TTNLS) },
};
{ [edges=selection right]
{ (TLSPlusNLS), (TTLSPlusNLS) } --[invisible] { (TLS), (TTLS) },
};
{ [edges=selection left]
{ (TLSPlusNLS), (TTLSPlusNLS) } --[invisible] { (TNLS), (TTNLS) },
};
% insert "gaps" into crossed edges
{ [edges={white,line width=1.5mm}]
(TSno) -- (TSSC),
(TSSC) -- (TCity),
(TTLSPlusNLS) -- [bend right,invisible] (TSSC),
};
(TSno) -- [funcdep right] (TSSC);
(TSSC) -- [projection left] (TCity);
(TTLSPlusNLS) -- [projection right,arrows={:{crossbar}->},bend right,invisible] (TSSC);
};
\node[below=4cm of current page.south west,structure] (caption) {\Large Similarities with \(\schema{1}\) but not identical, so we need to transform…};
\end{tikzpicture}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame[label=frame.SIG.transform]
{
\frametitle{Transforming \(\bm{\schema{3} \Rightarrow \schema{1}}\)}
\framesubtitle{\alt<1-8>{\textcolor{structure}{blue} = input to transformation, \textcolor{alert}{red} = output\invisible{\beamergotobutton{Compare}}}{\hyperlink{frame.SIG.Sone<2>}{\beamergotobutton{Compare}}}}
\centering
\begin{tikzpicture}[ampersand replacement=\&,transform canvas={scale=0.8}]
\matrix[row sep=0.5cm]
{
\node[input on=<2>] (TLS) {\(\Type{\LS}\)}; \&[7mm] \node[input on=<2>] (TTLS) {\(\TT{\LS}\)}; \&[7mm] \&[4mm] \&[-4mm] \node (TSSL) {\(\StackTSSL\)}; \& \& \node (LSCity) {\(\CityLondon\)}; \\
\& \& \& \node (TSname) {\(\Type{\Sname}\)}; \\
\node[visible on=<2->,output on=<2>,input on=<3>] (TLSPlusNLS) {\(\Type{S}\)}; \& \node[visible on=<2->,output on=<2>,input on=<3>] (TTLSPlusNLS) {\(\TT{S}\)}; \& \node (TSno) {\(\Type{\Sno}\)}; \& \& \node (TSSC) {\(\StackTSSC\)}; \& \& \node (TCity) {\(\Type{City}\)}; \\
\& \& \& \& \& \node (TStatus) {\(\Type{\Status}\)}; \\
\node[visible on=<3->,output on=<3>] (TNLS) {\(\Type{\NLS}\)}; \& \node[visible on=<3->,output on=<3>] (TTNLS) {\(\TT{\NLS}\)}; \& \& \& \node (TSSNL) {\(\StackTSSNL\)}; \& \& \node (NLSCity) {\(\StackTCityMinusLondon\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
(TLS) --[input on=<4>] (TTLS),
(TLSPlusNLS) --[visible on=<4->,output on=<4>] (TTLSPlusNLS),
(TNLS) --[visible on=<4->,output on=<4>] (TTNLS),
};
% FDs
(TSno) -- [funcdep left,arrows={:-{crossbar}>},bend left,visible on=<7->,output on=<7>] (TSSL);
(TSno) -- [funcdep right,arrows={:-{crossbar}>},visible on=<7->,output on=<7>] (TSSNL);
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
(TTLS) --[input on=<5>] (TSno),
(TTLSPlusNLS) --[visible on=<5->,output on=<5>] (TSno)
};
{ [edges=bijection,edge label'={\scriptsize\(\RelProject\)}]
(TTNLS) --[visible on=<5->,output on=<5>] (TSno)
};
{ [edges=projection left]
(TTLS) --[input on=<6>] (TSSL),
(TSSL) -- { (TStatus), (LSCity) }
};
{ [edges=projection right]
(TTNLS) -- [arrows={:->},visible on=<6->,output on=<6>] (TSSNL),
(TSSC) -- { (TSname), (TStatus) },
(TSSL) -- (TSname),
(TSSNL) -- { (NLSCity), (TStatus) },
(TSSNL) -- [bend left=10] (TSname),
};
 
% selection edges
{ [edges=selection left]
(TSSC) -- { (TSSL), (TSSNL) },
(TCity) -- (NLSCity),
};
{ [edges=selection right]
(TCity) -- (LSCity),
};
{ [edges=bijection,edge label'={\scriptsize\(\RelRestrict\)}]
{ (TLS), (TTLS) } -- [visible on=<2-7>,output on=<2>] { (TLSPlusNLS), (TTLSPlusNLS) },
{ (TLSPlusNLS), (TTLSPlusNLS) } -- [visible on=<3-7>,output on=<3>] { (TNLS), (TTNLS) },
};
{ [edges=selection left]
{ (TLSPlusNLS), (TTLSPlusNLS) } --[visible on=<8->] { (TLS), (TTLS) },
};
{ [edges=selection right]
{ (TLSPlusNLS), (TTLSPlusNLS) } --[visible on=<8->] { (TNLS), (TTNLS) },
};
% insert "gaps" into crossed edges
{ [edges={white,line width=1.5mm}]
(TSno) -- (TSSC),
(TSSC) -- (TCity),
(TTLSPlusNLS) -- [bend right,visible on=<6->] (TSSC),
};
(TSno) -- [funcdep right,input on=<7>] (TSSC);
(TSSC) -- [projection left] (TCity);
(TTLSPlusNLS) -- [projection right,arrows={:{crossbar}->},bend right,visible on=<6->,output on=<6>] (TSSC);
};
\begin{scope}[circle,visible on=<8>,output on=<8>]
\node[draw] (c1) at (TLSPlusNLS) [above=11.5pt] {};
\node[draw] (c2) at (TLSPlusNLS) [below=11.5pt] {};
\node[draw] (c3) at (c1 -| TTLSPlusNLS) {};
\node[draw] (c4) at (c2 -| TTLSPlusNLS) {};
\end{scope}
\node[below=4cm of current page.south west,structure] (caption) {
\Large
\only<1>{Initial state}
\only<2>{Duplicate \(\Type{\LS}\) and \(\TT{\LS}\) [\(\equiv\)]}
\only<3>{Duplicate \(\Type{S}\) and \(\TT{S}\) [\(\equiv\)]}
\only<4>{Copy and move \(\Type{\LS} \SurTotal \TT{\LS}\) edge (\(\times 2\)) [\(\preceq\)]}
\only<5>{Copy and move \(\TT{\LS} \ProjectionEdge \Type{\Sno}\) edge (\(\times 2\)) [\(\preceq\)]}
\only<6>{Copy and move \(\TT{\LS} \ProjectionEdge \TSSL\) edge (\(\times 2\)) [\(\preceq\)]}
\only<7>{Copy and move \(\Type{\Sno} \KeyEdge \TSSC\) edge (\(\times 2\)) [\(\preceq\)]}
\only<8>{Remove totality annotations [\(\preceq\)]}
\only<9>{Final state: \emph{not} isomorphic to SIG for \(\schema{1} \Rightarrow\) non-comparable.}
};
\end{tikzpicture}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame
{
\frametitle{So what does this mean?}
\structurebf{\(\bm{\schema{1}}\) and \(\bm{\schema{2}}\) are information equivalent}
\begin{itemize}
\item[\(\Rightarrow\)] all view updates between them should be OK
\end{itemize}
\bigskip
\structurebf{\(\bm{\schema{1}}\) and \(\bm{\schema{3}}\) aren’t information equivalent}
\begin{itemize}
\item[\(\Rightarrow\)] some view updates between them will cause problems
\end{itemize}
\bigskip
\structurebf{This agrees with what Date found} {\tiny (yay!)}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame
{
\frametitle{More examples}
\framesubtitle{(Nonloss projection views, Date Ch. 5)}
\(S\{\Sno, \Status, \City\}\); views \(\ST = \RelProject_{\{\Sno, \Status\}}S\), \(\SC = \RelProject_{\{\Sno, \City\}}S\)
\medskip\bigskip
\begin{columns}
\begin{column}{0.33\textwidth}
\centering
\scalebox{0.5}{%
\begin{tikzpicture}
\matrix[row sep=1.5cm,ampersand replacement=\&]
{
\node (TST) {\(\Type{\STsub}\)}; \&[7mm] \node (TTST) {\(\TT{\STsub}\)}; \&[10mm] \&[10mm] \node (TStatus) {\(\Type{\Status}\)}; \\
\node (TSTPlusSC) {\(\Type{S}\)}; \& \node (TTSTPlusSC) {\(\TT{S}\)}; \& \node (TSno) {\(\Type{\Sno}\)}; \& \node (TSSC) {\(\Type{\Status} \times \Type{\City}\)}; \\
\node (TSC) {\(\Type{\SCsub}\)}; \& \node (TTSC) {\(\TT{\SCsub}\)}; \& \& \node (TCity) {\(\Type{\City}\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
{ (TST), (TSC), (TSTPlusSC) } -- { (TTST), (TTSC), (TTSTPlusSC) },
};
% FDs
(TSno) -- [funcdep left] (TStatus);
(TSno) -- [funcdep right] (TCity);
(TSno) -- [funcdep right] (TSSC);
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
{ (TTSTPlusSC), (TTST) } -- (TSno),
};
{ [edges=bijection,edge label'={\scriptsize\(\RelProject\)}]
(TTSC) -- (TSno),
};
{ [edges=projection left]
{ (TSTPlusSC), (TTSTPlusSC) } -- { (TST), (TTST) },
(TSSC) -- (TCity),
(TTST) -- (TStatus),
};
{ [edges=projection right]
{ (TSTPlusSC), (TTSTPlusSC) } -- { (TSC), (TTSC) },
(TSSC) -- (TStatus),
(TTSC) -- (TCity),
};
% insert "gaps" into crossed edges
{ [edges={white,line width=1.5mm}]
(TTSTPlusSC) -- [bend right] (TSSC),
};
(TTSTPlusSC) -- [projection right, bend right] (TSSC),
};
\end{tikzpicture}%
} \\
\(\schema{1} = \{S\}\)
\end{column}
\begin{column}{0.33\textwidth}
\centering
\scalebox{0.5}{%
\begin{tikzpicture}
\matrix[row sep=1.5cm,ampersand replacement=\&]
{
\node (TST) {\(\Type{\ST}\)}; \&[7mm] \node (TTST) {\(\TT{\ST}\)}; \&[10mm] \&[10mm] \node (TStatus) {\(\Type{\Status}\)}; \\
\node (TSTPlusSC) {\(\Type{J}\)}; \& \node (TTSTPlusSC) {\(\TT{J}\)}; \& \node (TSno) {\(\Type{\Sno}\)}; \& \node (TSSC) {\(\Type{\Status} \times \Type{\City}\)}; \\
\node (TSC) {\(\Type{\SC}\)}; \& \node (TTSC) {\(\TT{\SC}\)}; \& \& \node (TCity) {\(\Type{\City}\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
{ (TST), (TSC), (TSTPlusSC) } -- { (TTST), (TTSC), (TTSTPlusSC) },
};
% FDs
(TSno) -- [funcdep left] (TStatus);
(TSno) -- [funcdep right] (TCity);
(TSno) -- [funcdep right] (TSSC);
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
{ (TTSTPlusSC), (TTST) } -- (TSno),
};
{ [edges=bijection,edge label'={\scriptsize\(\RelProject\)}]
(TTSC) -- (TSno),
};
{ [edges=projection left]
{ (TSTPlusSC), (TTSTPlusSC) } -- { (TST), (TTST) },
(TSSC) -- (TCity),
(TTST) -- (TStatus),
};
{ [edges=projection right]
{ (TSTPlusSC), (TTSTPlusSC) } -- { (TSC), (TTSC) },
(TSSC) -- (TStatus),
(TTSC) -- (TCity),
};
% insert "gaps" into crossed edges
{ [edges={white,line width=1.5mm}]
(TTSTPlusSC) -- [bend right] (TSSC),
};
(TTSTPlusSC) -- [projection right, bend right] (TSSC),
};
\end{tikzpicture}%
} \\
\(\schema{2} = \{\ST, \SC\}\)
\end{column}
\begin{column}{0.33\textwidth}
\centering
\scalebox{0.5}{%
\begin{tikzpicture}
\matrix[row sep=1.5cm,ampersand replacement=\&]
{
\node (TST) {\(\Type{\ST}\)}; \&[7mm] \node (TTST) {\(\TT{\ST}\)}; \&[10mm] \&[10mm] \node (TStatus) {\(\Type{\Status}\)}; \\
\& \& \node (TSno) {\(\Type{\Sno}\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
(TST) -- (TTST),
};
% FDs
(TSno) -- [funcdep left] (TStatus);
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
(TTST) -- (TSno),
};
{ [edges=projection left]
(TTST) -- (TStatus),
};
};
\end{tikzpicture}%
} \\
\(\schema{3} = \{\ST\}\)
\end{column}
\end{columns}
\medskip\medskip
\begin{tabbing}
\structurebf{Results:} \=\(\Equivalent{\schema{1}}{\schema{2}}\) {\tiny (as expected)} \\
\>\(\schema{1}\) and \(\schema{3}\) incomparable {\tiny (as expected)}
\end{tabbing}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame
{
\frametitle{More examples}
\framesubtitle{(Lossy projection views, Date Ch. 5)}
\small
\(S\{\Sno, \Status, \City\}\); views \(\ST = \RelProject_{\{\Sno, \Status\}}S\), \(\TC = \RelProject_{\{\Status, \City\}}S\)
\medskip
\begin{columns}
\begin{column}{0.5\textwidth}
\centering
\scalebox{0.4}{%
\begin{tikzpicture}
\matrix[row sep=1.5cm,ampersand replacement=\&]
{
\node (TST) {\(\Type{\STsub}\)}; \&[7mm] \node (TTST) {\(\TT{\STsub}\)}; \&[10mm] \&[10mm] \node (TStatus) {\(\Type{\Status}\)}; \\
\node (TSTPlusTC) {\(\Type{S}\)}; \& \node (TTSTPlusTC) {\(\TT{S}\)}; \& \node (TSno) {\(\Type{\Sno}\)}; \& \node (TSSC) {\(\Type{\Status} \times \Type{\City}\)}; \\
\node (TTC) {\(\Type{\TCsub}\)}; \& \node (TTTC) {\(\TT{\TCsub}\)}; \& \& \node (TCity) {\(\Type{\City}\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
{ (TST), (TTC), (TSTPlusTC) } -- { (TTST), (TTTC), (TTSTPlusTC) },
};
% FDs
{ [edges=funcdep right]
(TSno) -- { (TCity), (TSSC) },
(TSSC) -- [bend right] (TStatus),
};
{ [edges=funcdep left]
(TSno) -- (TStatus),
(TSSC) -- [bend left] (TCity),
};
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
{ (TTSTPlusTC), (TTST) } -- (TSno),
};
{ [edges=projection left]
{ (TSTPlusTC), (TTSTPlusTC) } -- { (TST), (TTST) },
(TTST) -- (TStatus),
(TSSC) -- [bend right] (TCity),
};
{ [edges=projection right]
{ (TSTPlusTC), (TTSTPlusTC) } -- { (TTC), (TTTC) },
(TSSC) -- [bend left] (TStatus),
};
% insert "gaps" into crossed edges
{ [edges={white,line width=1.5mm}]
(TTSTPlusTC) -- [bend right] (TSSC),
(TTTC) -- [bend right=10] (TSSC),
};
(TTSTPlusTC) -- [projection right, bend right] (TSSC),
(TTTC) -- [edges=bijection,edge label'={\scriptsize\(\RelProject\)}, bend right=10] (TSSC),
};
\end{tikzpicture}
} \\
\(\schema{1} = \{S\}\) \\[\baselineskip]
\scalebox{0.4}{%
\begin{tikzpicture}
\matrix[row sep=1.5cm,ampersand replacement=\&]
{
\node (TST) {\(\Type{\ST}\)}; \&[7mm] \node (TTST) {\(\TT{\ST}\)}; \&[10mm] \&[10mm] \node (TStatus) {\(\Type{\Status}\)}; \\
\& \& \node (TSno) {\(\Type{\Sno}\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
(TST) -- (TTST),
};
% FDs
(TSno) -- [funcdep left] (TStatus);
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
(TTST) -- (TSno),
};
{ [edges=projection left]
(TTST) -- (TStatus),
};
};
\end{tikzpicture}
} \\
\(\schema{3} = \{\ST\}\)
\end{column}
\begin{column}{0.5\textwidth}
\centering
\scalebox{0.4}{%
\begin{tikzpicture}
\matrix[row sep=1.5cm,ampersand replacement=\&]
{
\node (TST) {\(\Type{\ST}\)}; \&[7mm] \node (TTST) {\(\TT{\ST}\)}; \&[10mm] \&[10mm] \node (TStatus) {\(\Type{\Status}\)}; \\
\& \& \node (TSno) {\(\Type{\Sno}\)}; \& \node (TSSC) {\(\Type{\Status} \times \Type{\City}\)}; \\
\node (TTC) {\(\Type{\TC}\)}; \& \node (TTTC) {\(\TT{\TC}\)}; \& \& \node (TCity) {\(\Type{\City}\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
{ (TST), (TTC) } -- { (TTST), (TTTC) },
};
% FDs
{ [edges=funcdep right]
(TSSC) -- [bend right] (TStatus),
};
{ [edges=funcdep left]
(TSno) -- (TStatus),
(TSSC) -- [bend left] (TCity),
};
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
{ (TTST) } -- (TSno),
};
{ [edges=bijection,edge label'={\scriptsize\(\RelProject\)}]
(TTTC) -- (TSSC),
};
{ [edges=projection left]
(TTST) -- (TStatus),
(TSSC) -- [bend right] (TCity),
};
{ [edges=projection right]
(TSSC) -- [bend left] (TStatus),
};
};
\end{tikzpicture}
} \\
\(\schema{2} = \{\ST, \TC\}\) \\[\baselineskip]
\scalebox{0.4}{%
\begin{tikzpicture}
\matrix[row sep=1.5cm,ampersand replacement=\&]
{
\&[7mm] \&[10mm] \node (TStatus) {\(\Type{\Status}\)}; \\
\node (TTC) {\(\Type{\TC}\)}; \& \node (TTTC) {\(\TT{\TC}\)}; \& \node (TSSC) {\(\Type{\Status} \times \Type{\City}\)}; \\
\& \& \node (TCity) {\(\Type{\City}\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
{ (TTC) } -- { (TTTC) },
};
% FDs
{ [edges=funcdep right]
(TSSC) -- [bend right] (TStatus),
};
{ [edges=funcdep left]
(TSSC) -- [bend left] (TCity),
};
% projection edges
{ [edges=bijection,edge label'={\scriptsize\(\RelProject\)}]
(TTTC) -- (TSSC),
};
{ [edges=projection left]
(TSSC) -- [bend right] (TCity),
};
{ [edges=projection right]
(TSSC) -- [bend left] (TStatus),
};
};
\end{tikzpicture}
} \\
\(\schema{4} = \{\TC\}\)
\end{column}
\end{columns}
\bigskip
\structurebf{Results:} \(\schema{1}\) isn't comparable with any of \(\schema{2}\), \(\schema{3}\), or \(\schema{4}\) {\tiny (as expected)}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame
{
\frametitle{More examples}
\framesubtitle{(Lossy one to one join views, Date Ch. 6)}
\(\ST\{\Sno, \Status\}\), \(\SC\{\Sno, \City\}\); view \(S = \ST \RelNaturalJoin \SC\)
\medskip\bigskip
\begin{columns}
\begin{column}{0.33\textwidth}
\centering
\scalebox{0.5}{%
\begin{tikzpicture}
\matrix[row sep=1.5cm,ampersand replacement=\&]
{
\&[7mm] \&[10mm] \&[10mm] \node (TStatus) {\(\Type{\Status}\)}; \\
\node (TSTPlusSC) {\(\Type{S}\)}; \& \node (TTSTPlusSC) {\(\TT{S}\)}; \& \node (TSno) {\(\Type{\Sno}\)}; \& \node (TSSC) {\(\Type{\Status} \times \Type{\City}\)}; \\
\& \& \& \node (TCity) {\(\Type{\City}\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
(TSTPlusSC) -- (TTSTPlusSC),
};
% FDs
(TSno) -- [funcdep left] (TStatus);
(TSno) -- [funcdep right] (TCity);
(TSno) -- [funcdep right] (TSSC);
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
{ (TTSTPlusSC) } -- (TSno),
};
{ [edges=projection left]
(TSSC) -- (TCity),
};
{ [edges=projection right]
(TSSC) -- (TStatus),
};
% insert "gaps" into crossed edges
{ [edges={white,line width=1.5mm}]
(TTSTPlusSC) -- [bend right] (TSSC),
};
(TTSTPlusSC) -- [projection right, bend right] (TSSC),
};
\end{tikzpicture}
} \\
\(\schema{1} = \{S\}\)
\end{column}
\begin{column}{0.33\textwidth}
\centering
\scalebox{0.5}{%
\begin{tikzpicture}
\matrix[row sep=1.5cm,ampersand replacement=\&]
{
\node (TST) {\(\Type{\ST}\)}; \&[7mm] \node (TTST) {\(\TT{\ST}\)}; \&[10mm] \&[10mm] \node (TStatus) {\(\Type{\Status}\)}; \\
\& \& \node (TSno) {\(\Type{\Sno}\)}; \& \\
\node (TSC) {\(\Type{\SC}\)}; \& \node (TTSC) {\(\TT{\SC}\)}; \& \& \node (TCity) {\(\Type{\City}\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
{ (TST), (TSC) } -- { (TTST), (TTSC) },
};
% FDs
(TSno) -- [funcdep left] (TStatus);
(TSno) -- [funcdep right] (TCity);
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
{ (TTST) } -- (TSno),
};
{ [edges=bijection,edge label'={\scriptsize\(\RelProject\)}]
(TTSC) -- (TSno),
};
{ [edges=projection left]
(TTST) -- (TStatus),
};
{ [edges=projection right]
(TTSC) -- (TCity),
};
};
\end{tikzpicture}
} \\
\(\schema{2} = \{\ST, \SC\}\)
\end{column}
\begin{column}{0.33\textwidth}
\centering
\scalebox{0.5}{%
\begin{tikzpicture}
\matrix[row sep=1.5cm,ampersand replacement=\&]
{
\node (TST) {\(\Type{\ST}\)}; \&[7mm] \node (TTST) {\(\TT{\ST}\)}; \&[10mm] \&[10mm] \node (TStatus) {\(\Type{\Status}\)}; \\
\& \& \node (TSno) {\(\Type{\Sno}\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
(TST) -- (TTST),
};
% FDs
(TSno) -- [funcdep left] (TStatus);
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
(TTST) -- (TSno),
};
{ [edges=projection left]
(TTST) -- (TStatus),
};
};
\end{tikzpicture}%
} \\
\(\schema{3} = \{\ST\}\)
\end{column}
\end{columns}
\bigskip\medskip
\structurebf{Results:} \(\schema{1}\) isn't comparable with either \(\schema{2}\) or \(\schema{3}\) {\tiny (as expected)}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame
{
\frametitle{Now what?}
\begin{itemize}
\item Is this a useful technique? {\tiny (working on analysing more complex examples)}
\item Are inclusion dependencies important? \\
If so, how to represent them?
\item Do we need the whole transformation process? Determining whether or not all constraints can be propagated from the base schema may already be enough.
\item Could it help provide a more formal basis for Date’s “pragma”?
\item Might it reveal some interesting new insights about the view update problem?
\end{itemize}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\frame
{
\centering\Huge
\structurebf{Questions?}
}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\againframe<3>{frame.SIG.example}
 
\againframe<2>{frame.SIG.Sone}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\end{document}
View
1915
APCCM_2017/Presentation/examples.tex 0 → 100644
% APCCM2017_Stanger.tex
% Author: Nigel Stanger
%
% Built using Tex Live 2016 distribution.
% All packages except perhaps PGF should be in the standard TeX Live packages.
% REQUIRES PGF v3.0 or later for diagrams (custom arrow tips).
% REQUIRES TeX Gyre fonts (newtxmath package).
% NOTE: the last two figures use a small amount of colour.
%
% Revisions: 22 Aug 2016 Initial submission.
% 07 Nov 2016 Camera-ready version.
 
%%
%% MAX 10 PAGES (all material)
%%
 
\documentclass{article}
 
\usepackage{newtxtext}
\usepackage{newtxmath}
\usepackage{bm}
\usepackage{subfig}
\usepackage{booktabs}
\usepackage[margin=1in]{geometry}
 
\usepackage{tikz}
\usetikzlibrary{positioning}
\usetikzlibrary{graphs}
\usetikzlibrary{decorations.pathreplacing}
\usetikzlibrary{calc}
\usetikzlibrary{arrows}
 
 
% Relational algebra operators
\newcommand{\RelRestrict}{\ensuremath{\sigma}}
\newcommand{\RelProject}{\ensuremath{\pi}}
\newcommand{\RelUnion}{\ensuremath{\cup}}
\newcommand{\RelIntersect}{\ensuremath{\cap}}
\newcommand{\RelJoin}{\ensuremath{\Join}}
 
 
% "empty" arrow tip
\pgfarrowsdeclare{:}{:}{}{}
% custom bar arrow tip, offset from end of line (use "empty" tip at line ends if no >)
\tikzset{crossbar/.tip={|[scale width=1.75,sep=0.25em]}}
% various edge styles for SIG diagrams in TikZ
\tikzset{
function/.style={arrows={->}},
injection/.style={arrows={<-}},
total/.style={arrows={:{crossbar}-}},
surjection/.style={arrows={-{crossbar}:}},
bijection/.style={arrows={<{crossbar}-{crossbar}>}},
projection/.style={arrows={:{crossbar}-{crossbar}>}},
projection left/.style={arrows={:{crossbar}-{crossbar}>},edge label={\scriptsize\(\RelProject\)}},
projection right/.style={arrows={:{crossbar}-{crossbar}>},edge label'={\scriptsize\(\RelProject\)}},
selection left/.style={arrows={<-{crossbar}>},edge label={\scriptsize\(\RelRestrict\)}},
selection right/.style={arrows={<-{crossbar}>},edge label'={\scriptsize\(\RelRestrict\)}},
funcdep left/.style={arrows={:{crossbar}-{crossbar}>},edge node={node[sloped,midway,above] {\scriptsize\emph{key}}}},
funcdep right/.style={arrows={:{crossbar}-{crossbar}>},edge node={node[sloped,midway,below] {\scriptsize\emph{key}}}},
surtotal/.style={arrows={:{crossbar}-{crossbar}:}},
input keep/.style={blue,thick},
input delete/.style={blue!40,thick,dashed},
output/.style={red,thick},
output temp/.style={red,thick,dashed},
path 1/.style={green!60!black,thick},
path 2/.style={orange,thick},
}
% projection and selection edge annotations for TikZ
\newcommand{\ProjectionAnnotation}[3][]{%
\path (#2) to node[above,#1] {\scriptsize\(\RelProject\)} (#3);%
}
\newcommand{\SelectionAnnotation}[3][]{%
\path (#2) to node[above,#1] {\scriptsize\(\RelRestrict\)} (#3);%
}
 
 
\newcounter{constraint}
 
% misc
% \newcommand{\todo}[1]{\textbf{!!TODO!!} {[#1]}}
 
% commonly used elements
\newcommand{\identifier}[1]{\ensuremath{\mathit{#1}}}
\newcommand{\LS}{\identifier{LS}}
\newcommand{\NLS}{\identifier{NLS}}
\newcommand{\LSsub}{\identifier{L}}
\newcommand{\NLSsub}{\identifier{N}}
\newcommand{\ST}{\identifier{ST}}
\newcommand{\SC}{\identifier{SC}}
\newcommand{\STsub}{\identifier{T}}
\newcommand{\SCsub}{\identifier{C}}
\newcommand{\TC}{\identifier{TC}}
\newcommand{\TCsub}{\identifier{C}}
\newcommand{\Sno}{\identifier{Sno}}
\newcommand{\Sname}{\identifier{Sname}}
\newcommand{\Status}{\identifier{Status}}
\newcommand{\City}{\identifier{City}}
 
\newcommand{\Type}[1]{\ensuremath{T_{#1}}}
\newcommand{\TT}[1]{\ensuremath{T_{\{#1\}}}}
 
\newcommand{\CityLondon}{\ensuremath{\{\City\colon\allowbreak\text{`\emph{London}'}\}}}
\newcommand{\TCityMinusLondon}{\ensuremath{\Type{\City} \setminus \CityLondon}}
\newcommand{\TSSC}{\ensuremath{\Type{\Sname} \times \Type{\Status} \times \Type{\City}}}
\newcommand{\TSSL}{\ensuremath{\Type{\Sname} \times \Type{\Status} \times \CityLondon}}
\newcommand{\TSSNL}{\ensuremath{\Type{\Sname} \times \Type{\Status} \times (\TCityMinusLondon)}}
 
\newcommand{\TLSPlusNLS}{\ensuremath{\Type{\LS} + \Type{\NLS}}}
\newcommand{\TTLSPlusNLS}{\ensuremath{\TT{\LS} + \TT{\NLS}}}
\newcommand{\TLSPlusNLSsub}{\ensuremath{\Type{\LSsub} + \Type{\NLSsub}}}
\newcommand{\TTLSPlusNLSsub}{\ensuremath{\TT{\LSsub} + \TT{\NLSsub}}}
 
\newcommand{\StackTLSPlusNLS}{\ensuremath{\begin{array}{c}\Type{\LS}\,+ \\ \Type{\NLS}\end{array}}}
\newcommand{\StackTTLSPlusNLS}{\ensuremath{\begin{array}{c}\TT{\LS}\,+ \\ \TT{\NLS}\end{array}}}
\newcommand{\StackTLSPlusNLSsub}{\ensuremath{\begin{array}{c}\Type{\LSsub}\,+ \\ \Type{\NLSsub}\end{array}}}
\newcommand{\StackTTLSPlusNLSsub}{\ensuremath{\begin{array}{c}\TT{\LSsub}\,+ \\ \TT{\NLSsub}\end{array}}}
\newcommand{\StackTSSC}{\ensuremath{\begin{array}{c}\Type{\Sname}\,\times \\ \Type{\Status} \times \Type{\City}\end{array}}}
\newcommand{\StackTSSL}{\ensuremath{\begin{array}{c}\Type{\Sname} \times \Type{\Status}\,\times \\ \CityLondon\end{array}}}
\newcommand{\StackTSSNL}{\ensuremath{\begin{array}{c}\Type{\Sname} \times \Type{\Status}\,\times \\ (\TCityMinusLondon)\end{array}}}
\newcommand{\StackTCityMinusLondon}{\ensuremath{\begin{array}{c}\Type{\City}\,\setminus \\ \CityLondon\end{array}}}
 
\newcommand{\schema}[1]{\ensuremath{\mathcal{S}_{#1}}}
 
% dominates
\newcommand{\Dominates}[2]{\ensuremath{#2 \preceq #1}}
\newcommand{\Equivalent}[2]{\ensuremath{#1 \equiv #2}}
 
% SIG notation (in text)
\newcommand{\Sedge}[1]{\ensuremath{\sigma_{\textrm{#1}}}}
\newcommand{\SedgeP}[1]{\ensuremath{\sigma_{\textrm{#1}}^{'}}}
 
\newcommand{\medmid}{\raise.125ex\hbox{\scalebox{1}[0.75]{$\mid$}}}
 
% General SIG edges for use in formulas.
% Adapted from: http://tex.stackexchange.com/questions/96330/adding-symbols-at-the-ends-of-a-horizontal-line
\makeatletter
\newlength{\@annotskipleft}
\newlength{\@annotskipright}
% #1 = left edge component
% #2 = right edge component
% #3 = left bar annotation
% #4 = right bar annotation
\newcommand\@sig@edge[4]{%
\let\@middle\joinrel%
\ifx#1\relbar%
\@annotskipleft=.3em%
% scrunch up the bare line so it's similar length to \long...arrow
\ifx#2\relbar\def\@middle{\joinrel\joinrel\relbar\joinrel\joinrel}\fi%
\else%
% arrows need a little more clearance
\@annotskipleft=.4em%
\fi%
\ifx#2\relbar\@annotskipright=.3em\else\@annotskipright=.4em\fi%
\mathrel{\ooalign{$#1\@middle#2$\cr\hskip\@annotskipleft$#3$\hfil$#4$\hskip\@annotskipright\cr}}%
}
 
% 0 = nothing
% 1 = bar
% 2 = arrowhead
% 3 = both
\def\@sigedge#1#2{%
\ifcase\numexpr#1*4+#2\relax%
\@sig@edge{\relbar}{\relbar}{}{}\or % 00 = -----
\@sig@edge{\relbar}{\relbar}{}{\medmid}\or % 01 = ---+-
\@sig@edge{\relbar}{\rightarrow}{}{}\or % 02 = ---->
\@sig@edge{\relbar}{\rightarrow}{}{\medmid}\or % 03 = ---+>
\@sig@edge{\relbar}{\relbar}{\medmid}{}\or % 10 = -+---
\@sig@edge{\relbar}{\relbar}{\medmid}{\medmid}\or % 11 = -+-+-
\@sig@edge{\relbar}{\rightarrow}{\medmid}{}\or % 12 = -+-->
\@sig@edge{\relbar}{\rightarrow}{\medmid}{\medmid}\or % 13 = -+-+>
\@sig@edge{\leftarrow}{\relbar}{}{}\or % 20 = <----
\@sig@edge{\leftarrow}{\relbar}{}{\medmid}\or % 21 = <--+-
\@sig@edge{\leftarrow}{\rightarrow}{}{}\or % 22 = <--->
\@sig@edge{\leftarrow}{\rightarrow}{}{\medmid}\or % 23 = <--+>
\@sig@edge{\leftarrow}{\relbar}{\medmid}{}\or % 30 = <+---
\@sig@edge{\leftarrow}{\relbar}{\medmid}{\medmid}\or % 31 = <+-+-
\@sig@edge{\leftarrow}{\rightarrow}{\medmid}{}\or % 32 = <+-->
\@sig@edge{\leftarrow}{\rightarrow}{\medmid}{\medmid} % 33 = <+-+>
\fi%
}
 
\newcommand{\sigedge}[1]{\ensuremath{\@sigedge#1}}
\makeatother
 
\newcommand{\Edge}{\sigedge{00}}
\newcommand{\Total}{\sigedge{10}}
\newcommand{\Surjective}{\sigedge{01}}
\newcommand{\SurTotal}{\sigedge{11}}
\newcommand{\Functional}{\sigedge{02}}
\newcommand{\Injective}{\sigedge{20}}
\newcommand{\Bijective}{\sigedge{33}}
 
% Hack to get the overset symbols to appear at the right height.
% \smash removes the spacing around the operator, hence \mathop.
\newcommand{\LabelledEdge}[2]{\mathop{\overset{\raisebox{0.3em}{\scriptsize\ensuremath{#2}}}{\smash[t]{#1}}}}
\newcommand{\ProjectionEdge}{\LabelledEdge{\sigedge{13}}{\RelProject}}
\newcommand{\SelectionEdge}{\LabelledEdge{\sigedge{23}}{\RelRestrict}}
\newcommand{\TrivialProjection}{\ensuremath{\LabelledEdge{\Bijective}{\RelProject}}}
\newcommand{\TrivialSelection}{\ensuremath{\LabelledEdge{\Bijective}{\RelRestrict}}}
\newcommand{\KeyEdge}{\ensuremath{\LabelledEdge{\sigedge{13}}{\mathit{key}}}}
 
% Constraints.
\newcommand{\Constraint}[2][]{C\ensuremath{_{#2}\ifx&#1&\else^{#1}\fi}}
\newenvironment{ConstraintList}[1][]{%
\begin{list}{%
\bfseries%
\ifx&#1&%
\Constraint{\ensuremath{\bm{\arabic{constraint}}}}%
\else%
\Constraint[\ensuremath{\bm{#1}}]{\ensuremath{\bm{\arabic{constraint}}}}%
\fi%
}%
{\usecounter{constraint}}%
}{\end{list}}
 
 
\newcommand{\eqnnumber}{\refstepcounter{equation}(\theequation)}
 
 
\hyphenation{co-pied sche-ma}
 
\pagestyle{empty}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\begin{document}
 
% OUTLINE (20 mins max)
% Quick overview of view update problem and Date's effort
% - problem: Date's approach appears little different from earlier metadata-heavy approaches
% - problem: effectively punts on the hardest and most interesting cases
% - problem: operational definition of information equivalence
% - not focusing on view update problem, but rather how it can be characterised
% Quick overview of information capacity
% - relative measure, not quantitative
% - designed for relational schemas, so ideal
% - basic concepts of SIG transformation and isomorphism
% - my notation extensions
% Examples:
% - quickly go through restriction view example in more detail
% - other examples (summary): projection views, join views?
% Future work?
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\section{Disjoint restriction views (Date, Chapter 4)}
\label{sec-disjoint-restriction}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Relvars}
\begin{itemize}
\item base relvar \(S\{\Sno, \Sname, \Status, \City\}\)
\item view \(\LS = \RelRestrict_{\City = \mathit{'London'}}S\) [London suppliers] \eqnnumber\label{eqn-ls}
\item view \(\NLS = \RelRestrict_{\City \ne \mathit{'London'}}S\) [non-London suppliers] \eqnnumber\label{eqn-nls}
\end{itemize}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Tuple types}
\begin{align}
\TT{S} &= \Type{\Sno} \times \Type{\Sname} \times \Type{\Status} \times \Type{\City} \nonumber \\
\TT{\LS} &= \Type{\Sno} \times \Type{\Sname} \times \Type{\Status} \times \CityLondon \nonumber \\
\TT{\NLS} &= \Type{\Sno} \times \Type{\Sname} \times \Type{\Status} \times (\TCityMinusLondon) \nonumber
\end{align}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Base schema \(\bm{\schema{0} = \{S, \LS, \NLS\}}\)}
\begin{ConstraintList}
 
\item\label{constraint-restrict-key} \Sno\ is a key for each of \(S\), \(\LS\), and \(\NLS\), so the functional dependency \(\{\Sno\} \rightarrow \{\Sname, \Status, \City\}\) also holds in each of (a) \(S\); (b) \(\LS\); and (c) \(\NLS\).
% not sure how relevant the FK constraints are?
% how to represent? FK is a subset of the original key, so selection edge between S.Sno and each of LS.Sno and NLS.Sno
% or perhaps a selection edge from Sno to itself? (labelled FK)
% Notation: \Type{\Sno}, \Type{\LS.\Sno}, \Type{\NLS.\Sno}?
\item\label{constraint-restrict-lsfk} \(\RelProject_{\{\Sno\}}\LS \subseteq \RelProject_{\{\Sno\}}S\) [foreign key from \(\LS\) to \(S\)]
\item\label{constraint-restrict-nlsfk} \(\RelProject_{\{\Sno\}}\NLS \subseteq \RelProject_{\{\Sno\}}S\) [foreign key from \(\NLS\) to \(S\)]
\item\label{constraint-restrict-union} \(S = \LS \RelUnion \NLS\) [from (\ref{eqn-ls}) and (\ref{eqn-nls}) above]
\item\label{constraint-restrict-notlondon} \(\RelRestrict_{\City \ne \mathit{'London'}}\LS = \emptyset\) [from (\ref{eqn-ls}) above]
\item\label{constraint-restrict-london} \(\RelRestrict_{\City = \mathit{'London'}}\NLS = \emptyset\) [from (\ref{eqn-nls}) above]
\item\label{constraint-restrict-disjoint} \(\LS \RelIntersect \NLS = \emptyset\) [from \Constraint{\ref{constraint-restrict-notlondon}} and \Constraint{\ref{constraint-restrict-london}}]
\item\label{constraint-restrict-relation-type-union} (a) \(\Type{S} = \Type{\LS} \RelUnion \Type{\NLS}\); (b) \(\TT{S} = \TT{\LS} \RelUnion \TT{\NLS}\) [from \Constraint{\ref{constraint-restrict-union}}]
\item\label{constraint-restrict-relation-types} (a) \(\Type{\LS} \subset \Type{S}\); (b) \(\TT{\LS} \subset \TT{S}\) [from (\ref{eqn-ls}) above]
\item\label{constraint-restrict-tuple-types} (a) \(\Type{\NLS} \subset \Type{S}\); (b) \(\TT{\NLS} \subset \TT{S}\) [from (\ref{eqn-nls}) above]
\item\label{constraint-restrict-implied-types-london} \(\CityLondon \subset \Type{\City}\)
\item\label{constraint-restrict-implied-types-nonlondon} \((\TCityMinusLondon) \subset \Type{\City}\)
\item\label{constraint-restrict-implied-types-TSSL} \(\TSSL \subset \TSSC\)
\item\label{constraint-restrict-implied-types-TSSNL} \(\TSSNL \subset \TSSC\)
\end{ConstraintList}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Sub-schema \(\bm{\schema{1} = \{S\}}\)}
 
\noindent A user granted access only to \(\schema{1}\) can see only relvar \(S\). Constraint \Constraint{\ref{constraint-restrict-key}}(a) can be propagated directly from \(\schema{0}\) into \(\schema{1}\) as it is already expressed in terms of \(S\) only. Constraints \Constraint{\ref{constraint-restrict-implied-types-london}}--\Constraint{\ref{constraint-restrict-implied-types-TSSNL}} do not include any named relvars in \(\schema{0}\), and thus can also be propagated directly from \(\schema{0}\) into \(\schema{1}\). Constraints \Constraint{\ref{constraint-restrict-key}}(b), \Constraint{\ref{constraint-restrict-key}}(c), and \Constraint{\ref{constraint-restrict-union}}--\Constraint{\ref{constraint-restrict-tuple-types}} cannot be propagated directly from \(\schema{0}\) into \(\schema{1}\), but can all be rewritten in terms of \(S\) only, by substituting the definitions of \(\LS\) (equation~\ref{eqn-ls}) and \(\NLS\) (equation~\ref{eqn-nls}). To simplify expressions, we shall use \(\LSsub\) to denote \(\RelRestrict_{\City = \mathit{'London'}}S\) (\ref{eqn-ls}) and \(\NLSsub\) to denote \(\RelRestrict_{\City \ne \mathit{'London'}}S\) (\ref{eqn-nls}). (This also clearly distinguishes the substitutions from the \(\LS\) and \(\NLS\) relvars in \(\schema{0}\), \(\schema{2}\), and \(\schema{3}\).)
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{Rewritten constraints}
\label{sec-constraints-s-i-restrict}
 
\begin{ConstraintList}[\schema{1}]
\item \Sno\ is a key for each of \(\LSsub\) and \(\NLSsub\), therefore the functional dependency \(\{\Sno\} \rightarrow \{\Sname, \Status, \City\}\) also holds in each of (b) \(\LSsub\); and (c) \(\NLSsub\). [The fact that we are dealing with two disjoint subsets of \(\City\) does not change this.]
\setcounter{constraint}{3}
\item \(S = \LSsub \RelUnion \NLSsub\) [or even just \(S = S\)]
\item \(\RelRestrict_{\City \ne \mathit{'London'}}\LSsub = \emptyset\)
\item \(\RelRestrict_{\City = \mathit{'London'}}\NLSsub = \emptyset\)
\item \(\LSsub \RelIntersect \NLSsub = \emptyset\)
 
\item (a) \(\Type{S} = \Type{\LSsub} \RelUnion \Type{\NLSsub}\); (b) \(\TT{S} = \TT{\LSsub} \RelUnion \TT{\NLSsub}\) \newline
{[or even just \(\Type{S} = \Type{S}\) and \(\TT{S} = \TT{S}\)]}
\item (a) \(\Type{\LSsub} \subset \Type{S}\); (b) \(\TT{\LSsub} \subset \TT{S}\)
\item (a) \(\Type{\NLSsub} \subset \Type{S}\); (b) \(\TT{\NLSsub} \subset \TT{S}\)
\end{ConstraintList}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{SIG}
\label{sec-sigs-s-i-restrict}
 
\noindent The constraints appearing in \(\schema{1}\) are \Constraint{\ref{constraint-restrict-key}}(a), \Constraint[\schema{1}]{\ref{constraint-restrict-key}}(b), \Constraint[\schema{1}]{\ref{constraint-restrict-key}}(c), \Constraint[\schema{1}]{\ref{constraint-restrict-union}}--\Constraint[\schema{1}]{\ref{constraint-restrict-tuple-types}}, and \Constraint{\ref{constraint-restrict-implied-types-london}}--\Constraint{\ref{constraint-restrict-implied-types-TSSNL}}. The constraints within the schema also imply the existence of several subtype nodes (e.g., the two subtypes of \(\Type{City}\) implied by \Constraint{\ref{constraint-restrict-implied-types-london}} and \Constraint{\ref{constraint-restrict-implied-types-nonlondon}}), along with corresponding selection and projection edges. \Constraint[\schema{1}]{\ref{constraint-restrict-union}}, \Constraint[\schema{1}]{\ref{constraint-restrict-relation-type-union}}(a), and \Constraint[\schema{1}]{\ref{constraint-restrict-relation-type-union}}(b) are effectively tautologies that add no new information, and can thus be safely ignored. The completed SIG for \(\schema{1}\) is shown in Figure~\ref{fig-sig-s-i-restrict}.
 
%%%%%%%%%%%%%%%%%%%%
 
\begin{figure}
\centering
\begin{tikzpicture}
\matrix[row sep=0.5cm]
{
\node (TLS) {\(\Type{\LSsub}\)}; &[7mm] \node (TTLS) {\(\TT{\LSsub}\)}; &[7mm] &[4mm] &[-4mm] \node (TSSL) {\(\StackTSSL\)}; & & \node (LSCity) {\(\CityLondon\)}; \\
& & & \node (TSname) {\(\Type{\Sname}\)}; \\
\node (TLSPlusNLS) {\(\Type{S}\)}; & \node (TTLSPlusNLS) {\(\TT{S}\)}; & \node (TSno) {\(\Type{\Sno}\)}; & & \node (TSSC) {\(\StackTSSC\)}; & & \node (TCity) {\(\Type{City}\)}; \\
& & & & & \node (TStatus) {\(\Type{\Status}\)}; \\
\node (TNLS) {\(\Type{\NLSsub}\)}; & \node (TTNLS) {\(\TT{\NLSsub}\)}; & & & \node (TSSNL) {\(\StackTSSNL\)}; & & \node (NLSCity) {\(\StackTCityMinusLondon\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
{ (TLS), (TNLS), (TLSPlusNLS) } -- { (TTLS), (TTNLS), (TTLSPlusNLS) },
};
% FDs
(TSno) -- [funcdep left,bend left] (TSSL);
(TSno) -- [funcdep right] (TSSNL);
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
{ (TTLSPlusNLS), (TTLS) } -- (TSno)
};
{ [edges=bijection,edge label'={\scriptsize\(\RelProject\)}]
(TTNLS) -- (TSno)
};
{ [edges=projection left]
(TTLS) -- (TSSL),
(TSSL) -- { (TStatus), (LSCity) },
};
{ [edges=projection right]
(TTNLS) -- (TSSNL),
(TSSC) -- { (TSname), (TStatus) },
(TSSL) -- (TSname),
(TSSNL) -- { (NLSCity), (TStatus) },
(TSSNL) -- [bend left=10] (TSname),
};
% selection edges
{ [edges=selection left]
{ (TLSPlusNLS), (TTLSPlusNLS) } -- { (TLS), (TTLS) },
(TSSC) -- { (TSSL), (TSSNL) },
(TCity) -- (NLSCity),
};
{ [edges=selection right]
{ (TLSPlusNLS), (TTLSPlusNLS) } -- { (TNLS), (TTNLS) },
(TCity) -- (LSCity),
};
% insert "gaps" into crossed edges
{ [edges={white,line width=1.5mm}]
(TSno) -- (TSSC),
(TSSC) -- (TCity),
(TTLSPlusNLS) -- [bend right] (TSSC),
};
(TSno) -- [funcdep right] (TSSC);
(TSSC) -- [projection left] (TCity);
(TTLSPlusNLS) -- [projection right,bend right] (TSSC),
};
\end{tikzpicture}
\caption{SIG for schema \(\schema{1} = \{S\}\).}
\label{fig-sig-s-i-restrict}
\end{figure}
 
%%%%%%%%%%%%%%%%%%%%
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Sub-schema \(\bm{\schema{2} = \{\LS, \NLS\}}\)}
 
\noindent A user granted access only to \(\schema{2}\) can see only relvars \(\LS\) and \(\NLS\). Constraints \Constraint{\ref{constraint-restrict-key}}(b), \Constraint{\ref{constraint-restrict-key}}(c), and \Constraint{\ref{constraint-restrict-notlondon}}--\Constraint{\ref{constraint-restrict-disjoint}} can be propagated directly from \(\schema{0}\) into \(\schema{2}\) as they are defined only in terms of \(\LS\) and \(\NLS\). \Constraint{\ref{constraint-restrict-implied-types-london}}--\Constraint{\ref{constraint-restrict-implied-types-TSSNL}} can be propagated directly into \(\schema{2}\) as they are not expressed in terms of any named relvars in \(\schema{0}\). \Constraint{\ref{constraint-restrict-key}}(a), \Constraint{\ref{constraint-restrict-union}}, \Constraint{\ref{constraint-restrict-relation-type-union}}, \Constraint{\ref{constraint-restrict-relation-types}}, and \Constraint{\ref{constraint-restrict-tuple-types}} can be rewritten in terms of \(\LS\) and \(\NLS\) only.
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{Rewritten constraints}
\label{sec-constraints-s-ii-restrict}
 
\begin{ConstraintList}[\schema{2}]
 
\item \Sno\ is a key for \(\LS \RelUnion \NLS\), therefore the functional dependency \(\{\Sno\} \rightarrow \{\Sname, \Status, \City\}\) also holds in (a) \(\LS \RelUnion \NLS\).
\setcounter{constraint}{3}
\item \(\LS \RelUnion \NLS = \LS \RelUnion \NLS\)
\setcounter{constraint}{7}
\item (a) \(\Type{\LS} \RelUnion \Type{\NLS} = \Type{\LS} \RelUnion \Type{\NLS}\); \newline
(b) \(\TT{\LS} \RelUnion \TT{\NLS} = \TT{\LS} \RelUnion \TT{\NLS}\)
\item (a) \(\Type{\LS} \subset \Type{\LS} \RelUnion \Type{\NLS}\); (b) \(\TT{\LS} \subset \TT{\LS} \RelUnion \TT{\NLS}\)
\item (a) \(\Type{\NLS} \subset \Type{\LS} \RelUnion \Type{\NLS}\); (b) \(\TT{\NLS} \subset \TT{\LS} \RelUnion \TT{\NLS}\)
\end{ConstraintList}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{SIG}
\label{sec-sigs-s-ii-restrict}
 
\noindent The constraints appearing in \(\schema{2}\) are \Constraint[\schema{2}]{\ref{constraint-restrict-key}}(a), \Constraint{\ref{constraint-restrict-key}}(b), \Constraint{\ref{constraint-restrict-key}}(c), \Constraint[\schema{2}]{\ref{constraint-restrict-union}}, \Constraint{\ref{constraint-restrict-notlondon}}--\Constraint{\ref{constraint-restrict-disjoint}}, \Constraint[\schema{2}]{\ref{constraint-restrict-relation-type-union}}--\Constraint[\schema{2}]{\ref{constraint-restrict-tuple-types}}, and \Constraint{\ref{constraint-restrict-implied-types-london}}--\Constraint{\ref{constraint-restrict-implied-types-TSSNL}}. This is essentially the same set of constraints as \(\schema{1}\), but with different rewritings. This means that the SIG for \(\schema{2}\) can be built in the same manner as for \(\schema{1}\), with some nodes named differently. In particular, \Constraint[\schema{2}]{\ref{constraint-restrict-relation-type-union}} implies that there will be nodes \(\TLSPlusNLS\) and \(\TTLSPlusNLS\) instead of \(\Type{S}\) and \(\TT{S}\), respectively. There will also be \(\Type{\LS}\) instead of \(\Type{\LSsub}\), etc. The complete SIG for \(\schema{2}\) is shown in Figure~\ref{fig-sig-s-ii-restrict}.
 
%%%%%%%%%%%%%%%%%%%%
 
\begin{figure}
\centering
\begin{tikzpicture}
\matrix[row sep=0.5cm]
{
\node (TLS) {\(\Type{\LS}\)}; &[7mm] \node (TTLS) {\(\TT{\LS}\)}; &[7mm] &[4mm] &[-4mm] \node (TSSL) {\(\StackTSSL\)}; & & \node (LSCity) {\(\CityLondon\)}; \\
& & & \node (TSname) {\(\Type{\Sname}\)}; \\
\node (TLSPlusNLS) {\(\StackTLSPlusNLS\)}; & \node (TTLSPlusNLS) {\(\StackTTLSPlusNLS\)}; & \node (TSno) {\(\Type{\Sno}\)}; & & \node (TSSC) {\(\StackTSSC\)}; & & \node (TCity) {\(\Type{City}\)}; \\
& & & & & \node (TStatus) {\(\Type{\Status}\)}; \\
\node (TNLS) {\(\Type{\NLS}\)}; & \node (TTNLS) {\(\TT{\NLS}\)}; & & & \node (TSSNL) {\(\StackTSSNL\)}; & & \node (NLSCity) {\(\StackTCityMinusLondon\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
{ (TLS), (TNLS), (TLSPlusNLS) } -- { (TTLS), (TTNLS), (TTLSPlusNLS) },
};
% FDs
(TSno) -- [funcdep left,bend left] (TSSL);
(TSno) -- [funcdep right] (TSSNL);
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
{ (TTLSPlusNLS), (TTLS) } -- (TSno)
};
{ [edges=bijection,edge label'={\scriptsize\(\RelProject\)}]
(TTNLS) -- (TSno)
};
{ [edges=projection left]
(TTLS) -- (TSSL),
(TSSL) -- { (TStatus), (LSCity) },
};
{ [edges=projection right]
(TTNLS) -- (TSSNL),
(TSSC) -- { (TSname), (TStatus) },
(TSSL) -- (TSname),
(TSSNL) -- { (NLSCity), (TStatus) },
(TSSNL) -- [bend left=10] (TSname),
};
% selection edges
{ [edges=selection left]
{ (TLSPlusNLS), (TTLSPlusNLS) } -- { (TLS), (TTLS) },
(TSSC) -- { (TSSL), (TSSNL) },
(TCity) -- (NLSCity),
};
{ [edges=selection right]
{ (TLSPlusNLS), (TTLSPlusNLS) } -- { (TNLS), (TTNLS) },
(TCity) -- (LSCity),
};
% insert "gaps" into crossed edges
{ [edges={white,line width=1.5mm}]
(TSno) -- (TSSC),
(TSSC) -- (TCity),
(TTLSPlusNLS) -- [bend right] (TSSC),
};
(TSno) -- [funcdep right] (TSSC);
(TSSC) -- [projection left] (TCity);
(TTLSPlusNLS) -- [projection right,bend right] (TSSC),
};
\end{tikzpicture}
\caption{SIG for schema \(\schema{2} = \{\LS, \NLS\}\).}
\label{fig-sig-s-ii-restrict}
\end{figure}
 
%%%%%%%%%%%%%%%%%%%%
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Sub-chema \(\bm{\schema{3} = \{LS\}}\)}
 
\noindent A user granted access only to \(\schema{3}\) can see only relvar \(\LS\). Constraints \Constraint{\ref{constraint-restrict-key}}(b) and \Constraint{\ref{constraint-restrict-notlondon}} can be propagated directly into \(\schema{3}\), as they are defined in terms of \(\LS\) only. \Constraint{\ref{constraint-restrict-implied-types-london}}--\Constraint{\ref{constraint-restrict-implied-types-TSSNL}} can also be propagated directly into \(\schema{3}\) as previously discussed. The remaining constraints cannot be rewritten in terms of \(\LS\) only, and so cannot be propagated into \(\schema{3}\). As we were able to propagate all constraints into \(\schema{1}\), this indicates a qualitative difference between \(\schema{1}\) and \(\schema{3}\). It therefore seems likely that the relative information capacities of \(\schema{1}\) and \(\schema{3}\) will also differ.
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
\subsubsection{Rewritten constraints}
\label{sec-constraints-s-iii-restrict}
 
\noindent N/A
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{SIG}
\label{sec-sigs-s-iii-restrict}
 
\noindent The constraints appearing in \(\schema{3}\) are \Constraint{\ref{constraint-restrict-key}}(b), \Constraint{\ref{constraint-restrict-notlondon}}, and \Constraint{\ref{constraint-restrict-implied-types-london}}--\Constraint{\ref{constraint-restrict-implied-types-TSSNL}}. The SIG will only include edges and nodes that relate either directly to \(\LS\) or are independent of any relvar, such as the subtype node \(\TSSNL\). The complete SIG for \(\schema{3}\) is shown in Figure~\ref{fig-sig-s-iii-restrict} on the previous page.
 
%%%%%%%%%%%%%%%%%%%%
 
\begin{figure*}
\centering
\begin{tikzpicture}
\matrix[row sep=0.5cm]
{
\node (TLS) {\(\Type{\LS}\)}; &[7.5mm] \node (TTLS) {\(\TT{\LS}\)}; &[7mm] &[4mm] &[-4mm] \node (TSSL) {\(\StackTSSL\)}; & & \node (LSCity) {\(\CityLondon\)}; \\
& & & \node (TSname) {\(\Type{\Sname}\)}; \\
& & \node (TSno) {\(\Type{\Sno}\)}; & & \node (TSSC) {\(\StackTSSC\)}; & & \node (TCity) {\(\Type{City}\)}; \\
& & & & & \node (TStatus) {\(\Type{\Status}\)}; \\
& & & & \node (TSSNL) {\(\StackTSSNL\)}; & & \node (NLSCity) {\(\StackTCityMinusLondon\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
(TLS) -- (TTLS),
};
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
(TTLS) -- (TSno)
};
{ [edges=projection left]
(TTLS) -- (TSSL),
(TSSL) -- { (TStatus), (LSCity) },
};
{ [edges=projection right]
(TSSC) -- { (TSname), (TStatus) },
(TSSL) -- (TSname),
(TSSNL) -- { (NLSCity), (TStatus) },
(TSSNL) -- [bend left=10] (TSname),
};
% selection edges
{ [edges=selection left]
(TSSC) -- { (TSSL), (TSSNL) },
(TCity) -- (NLSCity),
};
{ [edges=selection right]
(TCity) -- (LSCity),
};
% insert "gaps" into crossed edges
{ [edges={white,line width=1.5mm}]
(TSno) -- (TSSC),
(TSSC) -- (TCity),
};
(TSno) -- [funcdep right] (TSSC);
(TSSC) -- [projection left] (TCity);
};
\end{tikzpicture}
\caption{SIG for schema \(\schema{3} = \{\LS\}\).}
\label{fig-sig-s-iii-restrict}
\end{figure*}
 
%%%%%%%%%%%%%%%%%%%%
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Transformations}
\label{sec-transforming-restrict}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{\(\bm{\schema{1}, \schema{2}}\)}
 
\noindent Looking at the SIGs for \(\schema{1}\) and \(\schema{2}\), we can see almost immediately that both SIGs have the same node and edge structure; indeed the only difference is in the names of some of the nodes. However, we already know from the discussion in Sections~\ref{sec-constraints-s-i-restrict} and~\ref{sec-constraints-s-ii-restrict} that these differently named nodes are just rewritings that represent the same domains. We therefore have an immediate isomorphism between the two SIGs and can conclude that the information capacities of \(\schema{1}\) and \(\schema{2}\) are equivalent, i.e., \(\Equivalent{\schema{1}}{\schema{2}}\).
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{\(\bm{\schema{1}, \schema{3}}\)}
 
There are some shared structures, but the two SIGs are clearly different. Since SIG transformations only ever preserve or enhance information capacity, intuitively we should attempt to transform the ``smaller'' SIG for \(\schema{3}\) into the ``larger'' SIG for \(\schema{1}\).
 
First, duplicate node \(\Type{\LS}\) to \(\Type{S}\) and node \(\TT{\LS}\) to \(\TT{S}\). To obtain a node structure similar to that of \(\schema{1}\), we also need to further duplicate \(\Type{S}\) to \(\Type{\NLS}\) and \(\TT{S}\) to \(\TT{\NLS}\). The result of these duplications is shown in Figure~\ref{fig-transform-all-duplicates}. The transformed SIG now has the same node structure as that for \(\schema{1}\).
 
%%%%%%%%%%%%%%%%%%%%
 
\begin{figure*}[t]
\centering
\begin{tikzpicture}
\matrix[row sep=0.5cm]
{
\node [input keep] (TLS) {\(\Type{\LS}\)}; &[7mm] \node [input keep] (TTLS) {\(\TT{\LS}\)}; &[7mm] &[4mm] &[-4mm] \node (TSSL) {\(\StackTSSL\)}; & & \node (LSCity) {\(\CityLondon\)}; \\
& & & \node (TSname) {\(\Type{\Sname}\)}; \\
\node [output] (TLSPlusNLS) {\(\Type{S}\)}; & \node [output] (TTLSPlusNLS) {\(\TT{S}\)}; & \node (TSno) {\(\Type{\Sno}\)}; & & \node (TSSC) {\(\StackTSSC\)}; & & \node (TCity) {\(\Type{City}\)}; \\
& & & & & \node (TStatus) {\(\Type{\Status}\)}; \\
\node [output] (TNLS) {\(\Type{\NLS}\)}; & \node [output] (TTNLS) {\(\TT{\NLS}\)}; & & & \node (TSSNL) {\(\StackTSSNL\)}; & & \node (NLSCity) {\(\StackTCityMinusLondon\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
(TLS) -- (TTLS),
};
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
(TTLS) -- (TSno)
};
{ [edges=projection left]
(TTLS) -- (TSSL),
(TSSL) -- { (TStatus), (LSCity) },
};
{ [edges=projection right]
(TSSC) -- { (TSname), (TStatus) },
(TSSL) -- (TSname),
(TSSNL) -- { (NLSCity), (TStatus) },
(TSSNL) -- [bend left=10] (TSname),
};
% selection edges
{ [edges=selection left]
(TSSC) -- { (TSSL), (TSSNL) },
(TCity) -- (NLSCity),
};
{ [edges=selection right]
(TCity) -- (LSCity),
};
{ [edges={bijection,output},edge label'={\scriptsize\(\RelRestrict\)}]
{ (TLS), (TTLS) } -- { (TLSPlusNLS), (TTLSPlusNLS) },
{ (TLSPlusNLS), (TTLSPlusNLS) } -- { (TNLS), (TTNLS) },
};
% insert "gaps" into crossed edges
{ [edges={white,line width=1.5mm}]
(TSno) -- (TSSC),
(TSSC) -- (TCity),
};
(TSno) -- [funcdep right] (TSSC);
(TSSC) -- [projection left] (TCity);
% transformation indicators
{ [edges={->,gray,dashed,bend left=45}]
(TLS) -- [edge node={node[sloped,above]{\small\emph{copy}}}] (TLSPlusNLS),
(TLSPlusNLS) -- [edge node={node[sloped,above,rotate=180]{\small\emph{copy}}}] (TNLS)
};
};
\end{tikzpicture}
\caption{SIG for transformed schema \(\schema{3}'\) after duplicating \Type{\LS} and \TT{\LS} to produce analogues of the additional nodes in \(\schema{1}\). Inputs to the transformations are coloured \textcolor{blue}{blue}, outputs are coloured \textcolor{red}{red}. [\(\equiv\)]}
\label{fig-transform-all-duplicates}
\end{figure*}
 
%%%%%%%%%%%%%%%%%%%%
 
The next phase is to copy and move edges. To produce the edge \(\Type{S} \SurTotal \TT{S}\), we can first \emph{copy} \(\Type{\LS} \SurTotal \TT{\LS}\) across the path \(\TT{S} \TrivialSelection \TT{\LS}\) (giving \(\Type{\LS} \SurTotal \TT{S}\)), then \emph{move} it across \(\Type{S} \TrivialSelection \Type{\LS}\). We can carry out a similar series of transformations to copy and move \(\Type{S} \SurTotal \TT{S}\) to \(\Type{\NLS} \SurTotal \TT{\NLS}\) (see Figure~\ref{fig-transform-edge-moves}).
 
We next copy and move the unique projection edge \(\TT{\LS} \TrivialProjection \Type{\Sno}\) to produce the edges \(\TT{S} \TrivialProjection \Type{\Sno}\) and \(\TT{\NLS} \TrivialProjection \Type{\Sno}\). Similarly, we copy and move \(\TT{\LS} \ProjectionEdge \TSSL\) to produce \(\TT{S} \LabelledEdge{\sigedge{12}}{\RelProject} \TSSC\) and \(\TT{\NLS} \LabelledEdge{\sigedge{02}}{\RelProject} \TSSNL\). Note that the first edge in the latter pair of transformations loses its totality annotation, and the second edge its surjectivity annotation, as a result of composition with the pre-existing non-bijective selection edges between the constructed tuple types running vertically down the centre of the SIG.
 
Finally, we carry out similar copy and move transformations to copy the key edge \(\Type{\Sno} \KeyEdge \TSSC\) to \(\Type{\Sno} \LabelledEdge{\sigedge{03}}{\mathit{key}} \TSSL\), and \(\Type{\Sno} \LabelledEdge{\sigedge{03}}{\mathit{key}} \TSSNL\). Both new edges lose their totality annotations for the same reason as the projection edges above. The final result of all these edge transformations is shown in Figure~\ref{fig-transform-edge-moves}.
 
%%%%%%%%%%%%%%%%%%%%
 
\begin{figure*}[t]
\centering
\begin{tikzpicture}
\matrix[row sep=0.5cm]
{
\node (TLS) {\(\Type{\LS}\)}; &[7mm] \node (TTLS) {\(\TT{\LS}\)}; &[7mm] &[4mm] &[-4mm] \node (TSSL) {\(\StackTSSL\)}; & & \node (LSCity) {\(\CityLondon\)}; \\
& & & \node (TSname) {\(\Type{\Sname}\)}; \\
\node (TLSPlusNLS) {\(\Type{S}\)}; & \node (TTLSPlusNLS) {\(\TT{S}\)}; & \node (TSno) {\(\Type{\Sno}\)}; & & \node (TSSC) {\(\StackTSSC\)}; & & \node (TCity) {\(\Type{City}\)}; \\
& & & & & \node (TStatus) {\(\Type{\Status}\)}; \\
\node (TNLS) {\(\Type{\NLS}\)}; & \node (TTNLS) {\(\TT{\NLS}\)}; & & & \node (TSSNL) {\(\StackTSSNL\)}; & & \node (NLSCity) {\(\StackTCityMinusLondon\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
(TLS) -- [input keep,edge node={node (c1a) {}}] (TTLS),
(TLSPlusNLS) -- [output,edge node={node (c1b) {}}] (TTLSPlusNLS),
(TNLS) -- [output,edge node={node (c1c) {}}] (TTNLS),
};
% FDs
(TSno) -- [funcdep left,arrows={-{crossbar}>},bend left,output] (TSSL);
(TSno) -- [funcdep right,arrows={-{crossbar}>},output] (TSSNL);
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
(TTLS) -- [input keep] (TSno),
(TTLSPlusNLS) -- [output] (TSno),
};
{ [edges=bijection,edge label'={\scriptsize\(\RelProject\)}]
(TTNLS) -- [output] (TSno),
};
{ [edges=projection left]
(TTLS) -- [input keep,edge node={node (c2a) {}}] (TSSL),
(TSSL) -- { (TStatus), (LSCity) },
};
{ [edges=projection right]
(TSSC) -- { (TSname), (TStatus) },
(TSSL) -- (TSname),
(TSSNL) -- { (NLSCity), (TStatus) },
(TSSNL) -- [bend left=10] (TSname),
(TTNLS) -- [arrows={:->},output,edge node={node (c2c) {}}] (TSSNL),
};
 
% selection edges
{ [edges=selection left]
(TSSC) -- { (TSSL), (TSSNL) },
(TCity) -- (NLSCity),
};
{ [edges=selection right]
(TCity) -- (LSCity),
};
{ [edges=bijection,edge label'={\scriptsize\(\RelRestrict\)}]
{ (TLS), (TTLS) } -- { (TLSPlusNLS), (TTLSPlusNLS) },
{ (TLSPlusNLS), (TTLSPlusNLS) } -- { (TNLS), (TTNLS) },
};
% insert "gaps" into crossed edges
{ [edges={white,line width=1.5mm}]
(TSno) -- (TSSC),
(TSSC) -- (TCity),
(TTLSPlusNLS) -- [bend right] (TSSC),
};
(TSno) -- [funcdep right,input keep] (TSSC);
(TSSC) -- [projection left] (TCity);
(TTLSPlusNLS) -- [projection right,arrows={:{crossbar}->},bend right,output,edge node={node (c2b) {}}] (TSSC),
% transformation indicators
{ [edges={->,gray,dashed}]
(c1a) -- (c1b),
(c1a) -- [bend right=12,edge node={node[above,sloped,pos=0.175]{\small\emph{copy \& move}}}] (c1c),
(c2a) -- [bend right=12] (c2b),
(c2a) -- [bend right=12,edge node={node[above,sloped,pos=0.175]{\small\emph{copy \& move}}}] (c2c)
};
};
\end{tikzpicture}
\caption{SIG for transformed schema \(\schema{3}'\) after copying and moving various edges. [\(\preceq\)]}
\label{fig-transform-edge-moves}
\end{figure*}
 
%%%%%%%%%%%%%%%%%%%%
 
If we compare Figure~\ref{fig-sig-s-i-restrict} with Figure~\ref{fig-transform-edge-moves}, we can see that the transformed SIG for \(\schema{3}'\) now has the same topology as the SIG for \(\schema{1}\). We still need to remove the totality annotations from the newly created trivial selection edges between the relation and tuple types on the left, but even when this is done, we do not achieve the desired isomorphism, as the edges \(\TT{S} \LabelledEdge{\sigedge{12}}{\RelProject} \TSSC\), \(\TT{\NLS} \LabelledEdge{\sigedge{02}}{\RelProject} \TSSNL\), \(\Type{\Sno} \LabelledEdge{\sigedge{03}}{\mathit{key}} \TSSL\), and \(\Type{\Sno} \LabelledEdge{\sigedge{03}}{\mathit{key}} \TSSNL\) all have different annotations from the corresponding edges in the SIG for \(\schema{1}\). This clearly shows that the information capacities of \(\schema{1}\) and \(\schema{3}\) are incomparable, and that view updates based on this pair of schemas will be problematic.
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Additional notes}
 
If we were to create a fourth sub-schema \(\schema{4} = \{\NLS\}\) and compare this with \(\schema{1}\), the result would be similar to that for \(\schema{3}\).
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\newpage
 
\section{Nonloss projection views (Date, Chapter 5)}
\label{sec-nonloss-projection}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Relvars}
\begin{itemize}
\item base relvar \(S\{\Sno, \Status, \City\}\)
\item view \(\ST = \RelProject_{\{\Sno, \Status\}}S\) [supplier status] \eqnnumber\label{eqn-st}
\item view \(\SC = \RelProject_{\{\Sno, \City\}}S\) [supplier city] \eqnnumber\label{eqn-sc}
\end{itemize}
(Incidentally, the views form a 6NF nonloss decomposition of \(S\).)
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Tuple types}
\begin{align}
\TT{S} &= \Type{\Sno} \times \Type{\Status} \times \Type{\City} \nonumber \\
\TT{\ST} &= \Type{\Sno} \times \Type{\Status} \nonumber \\
\TT{\SC} &= \Type{\Sno} \times \Type{\City} \nonumber
\end{align}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Base schema \(\bm{\schema{0} = \{S, \ST, \SC\}}\)}
\begin{ConstraintList}
 
\item\label{constraint-project-key} \(\Sno\) is a key for each of \(S\), \(\ST\), and \(\SC\), so the functional dependency \(\{\Sno\} \rightarrow \{\Status\}\) holds in each of (a) \(S\) and (b) \(\ST\); and the functional dependency \(\{\Sno\} \rightarrow \{\City\}\) holds in each of (c) \(S\) and (d) \(\SC\). [(a) and (c) could in principle be merged into a single functional dependency \(\{\Sno\} \rightarrow \{\Status, \City\}\) in \(S\).]
% not sure how relevant the FK constraints are?
% how to represent? FK is a subset of the original key, so selection edge between S.Sno and each of LS.Sno and NLS.Sno
% or perhaps a selection edge from Sno to itself? (labelled FK)
% Notation: \Type{\Sno}, \Type{\LS.\Sno}, \Type{\NLS.\Sno}?
\item\label{constraint-project-stfk} \(\RelProject_{\{\Sno\}}\ST \subseteq \RelProject_{\{\Sno\}}S\) [foreign key from \(\ST\) to \(S\)]
\item\label{constraint-project-scfk} \(\RelProject_{\{\Sno\}}\SC \subseteq \RelProject_{\{\Sno\}}S\) [foreign key from \(\SC\) to \(S\)]
\item\label{constraint-project-join} \(S = \SC \RelJoin \ST\) [from (\ref{eqn-st}), (\ref{eqn-sc})]
\item\label{constraint-project-s-st-identical} \(\RelProject_{\{\Sno\}}S = \RelProject_{\{\Sno\}}\ST\) [from \Constraint{\ref{constraint-project-join}}, (\ref{eqn-st})]
\item\label{constraint-project-s-sc-identical} \(\RelProject_{\{\Sno\}}S = \RelProject_{\{\Sno\}}\SC\) [from \Constraint{\ref{constraint-project-join}}, (\ref{eqn-sc})]
\item\label{constraint-project-st-sc-identical} \(\RelProject_{\{\Sno\}}\ST = \RelProject_{\{\Sno\}}\SC\) [from \Constraint{\ref{constraint-project-join}}, (\ref{eqn-st}), (\ref{eqn-sc})]
\item\label{constraint-project-relation-type-join} (a) \(\Type{S} = \Type{\ST} \RelJoin \Type{\SC}\); (b) \(\TT{S} = \TT{\ST} \RelJoin \TT{\SC}\) [from \Constraint{\ref{constraint-project-join}}]
\item\label{constraint-project-types-st} (a) \(\Type{\ST} = \RelProject_{\{\Sno, \Status\}}\Type{S}\); (b) \(\TT{\ST} = \RelProject_{\{\Sno, \Status\}}\TT{S}\) [from (\ref{eqn-st})]
\item\label{constraint-project-types-sc} (a) \(\Type{\SC} = \RelProject_{\{\Sno, \City\}}\Type{S}\); (b) \(\TT{\SC} = \RelProject_{\{\Sno, \City\}}\TT{S}\) [from (\ref{eqn-sc})]
\end{ConstraintList}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Sub-schema \(\bm{\schema{1} = \{S\}}\)}
 
\noindent A user granted access only to \(\schema{1}\) can see only relvar \(S\). Constraints \Constraint{\ref{constraint-project-key}}(a) and \Constraint{\ref{constraint-project-key}}(c) can be propagated directly from \(\schema{0}\) into \(\schema{1}\) as they are already expressed in terms of \(S\) only. Constraints \Constraint{\ref{constraint-project-join}}--\Constraint{\ref{constraint-restrict-tuple-types}} cannot be propagated directly from \(\schema{0}\) into \(\schema{1}\), but can all be rewritten in terms of \(S\) only, by substituting the definitions of \(\ST\) (equation~\ref{eqn-st}) and \(\SC\) (equation~\ref{eqn-sc}), i.e., \(\STsub = \RelProject_{\{\Sno, \Status\}}S\) and \(\SCsub = \RelProject_{\{\Sno, \City\}}S\).
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{Rewritten constraints}
\label{sec-constraints-s-i-project}
 
\begin{ConstraintList}[\schema{1}]
\item \Sno\ is a key for each of \(\STsub\) and \(\SCsub\), therefore the functional dependency \(\{\Sno\} \rightarrow \{\Status\}\) holds in (b) \(\STsub\), and the functional dependency \(\{\Sno\} \rightarrow \{\City\}\) holds in (d) \(\SCsub\).
\setcounter{constraint}{3}
\item \(S = \STsub \RelJoin \SCsub\) [or even just \(S = S\)]
\item \(\RelProject_{\{\Sno\}}S = \RelProject_{\{\Sno\}}\STsub\)
\item \(\RelProject_{\{\Sno\}}S = \RelProject_{\{\Sno\}}\SCsub\)
\item \(\RelProject_{\{\Sno\}}\STsub = \RelProject_{\{\Sno\}}\SCsub\)
\item (a) \(\Type{S} = \Type{\STsub} \RelJoin \Type{\SCsub}\); (b) \(\TT{S} = \TT{\STsub} \RelJoin \TT{\SCsub}\) \newline
{[or even just \(\Type{S} = \Type{S}\) and \(\TT{S} = \TT{S}\)]}
\item (a) \(\Type{\STsub} = \RelProject_{\{\Sno, \Status\}}\Type{S}\); (b) \(\TT{\STsub} = \RelProject_{\{\Sno, \Status\}}\TT{S}\)
\item (a) \(\Type{\SCsub} = \RelProject_{\{\Sno, \City\}}\Type{S}\); (b) \(\TT{\SCsub} = \RelProject_{\{\Sno, \City\}}\TT{S}\)
\end{ConstraintList}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{SIG}
\label{sec-sigs-s-i-project}
 
\noindent The constraints appearing in \(\schema{1}\) are \Constraint{\ref{constraint-project-key}}(a), \Constraint[\schema{1}]{\ref{constraint-project-key}}(b), \Constraint{\ref{constraint-project-key}}(c), \Constraint[\schema{1}]{\ref{constraint-project-key}}(d), and \Constraint[\schema{1}]{\ref{constraint-project-join}}--\Constraint[\schema{1}]{\ref{constraint-project-types-sc}}. \Constraint[\schema{1}]{\ref{constraint-project-join}}, \Constraint[\schema{1}]{\ref{constraint-project-relation-type-join}}(a), and \Constraint[\schema{1}]{\ref{constraint-project-relation-type-join}}(b) are effectively tautologies that add no new information, and can thus be safely ignored. The completed SIG for \(\schema{1}\) is shown in Figure~\ref{fig-sig-s-i-project}.
 
%%%%%%%%%%%%%%%%%%%%
 
\begin{figure}
\centering
\begin{tikzpicture}
\matrix[row sep=1.5cm]
{
\node (TST) {\(\Type{\STsub}\)}; &[7mm] \node (TTST) {\(\TT{\STsub}\)}; &[10mm] &[10mm] \node (TStatus) {\(\Type{\Status}\)}; \\
\node (TSTPlusSC) {\(\Type{S}\)}; & \node (TTSTPlusSC) {\(\TT{S}\)}; & \node (TSno) {\(\Type{\Sno}\)}; & \node (TSSC) {\(\Type{\Status} \times \Type{\City}\)}; \\
\node (TSC) {\(\Type{\SCsub}\)}; & \node (TTSC) {\(\TT{\SCsub}\)}; & & \node (TCity) {\(\Type{\City}\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
{ (TST), (TSC), (TSTPlusSC) } -- { (TTST), (TTSC), (TTSTPlusSC) },
};
% FDs
(TSno) -- [funcdep left] (TStatus);
(TSno) -- [funcdep right] (TCity);
(TSno) -- [funcdep right] (TSSC);
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
{ (TTSTPlusSC), (TTST) } -- (TSno),
};
{ [edges=bijection,edge label'={\scriptsize\(\RelProject\)}]
(TTSC) -- (TSno),
};
{ [edges=projection left]
{ (TSTPlusSC), (TTSTPlusSC) } -- { (TST), (TTST) },
(TSSC) -- (TCity),
(TTST) -- (TStatus),
};
{ [edges=projection right]
{ (TSTPlusSC), (TTSTPlusSC) } -- { (TSC), (TTSC) },
(TSSC) -- (TStatus),
(TTSC) -- (TCity),
};
% insert "gaps" into crossed edges
{ [edges={white,line width=1.5mm}]
(TTSTPlusSC) -- [bend right] (TSSC),
};
(TTSTPlusSC) -- [projection right, bend right] (TSSC),
};
\end{tikzpicture}
\caption{SIG for schema \(\schema{1} = \{S\}\).}
\label{fig-sig-s-i-project}
\end{figure}
 
%%%%%%%%%%%%%%%%%%%%
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Sub-schema \(\bm{\schema{2} = \{\ST, \SC\}}\)}
 
\noindent A user granted access only to \(\schema{2}\) can see only relvars \(\ST\) and \(\SC\). Constraints \Constraint{\ref{constraint-project-key}}(b), \Constraint{\ref{constraint-project-key}}(d), and \Constraint{\ref{constraint-project-st-sc-identical}} can be propagated directly from \(\schema{0}\) into \(\schema{2}\) as they are already expressed in terms of \(\ST\) and \(\SC\) only. The remaining constraints cannot be propagated directly from \(\schema{0}\) into \(\schema{2}\), but can all be rewritten in terms of \(\ST\) and \(\SC\) only, by substituting \(J = \ST \RelJoin \SC\) for \(S\).
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{Rewritten constraints}
\label{sec-constraints-s-ii-project}
 
\begin{ConstraintList}[\schema{2}]
\item \Sno\ is a key for \(J\), therefore (a) the functional dependency \(\{\Sno\} \rightarrow \{\Status\}\) holds in \(J\), and (c) the functional dependency \(\{\Sno\} \rightarrow \{\City\}\) holds in \(J\).
\setcounter{constraint}{3}
\item \(J = \ST \RelJoin \SC\) [or even just \(\ST \RelJoin \SC = \ST \RelJoin \SC\)]
\item \(\RelProject_{\{\Sno\}}J = \RelProject_{\{\Sno\}}\ST\)
\item \(\RelProject_{\{\Sno\}}J = \RelProject_{\{\Sno\}}\SC\)
\setcounter{constraint}{7}
\item (a) \(\Type{J} = \Type{\ST} \RelJoin \Type{\SC}\); (b) \(\TT{J} = \TT{\ST} \RelJoin \TT{\SC}\)
\item (a) \(\Type{\ST} = \RelProject_{\{\Sno, \Status\}}\Type{J}\); (b) \(\TT{\ST} = \RelProject_{\{\Sno, \Status\}}\TT{J}\)
\item (a) \(\Type{\SC} = \RelProject_{\{\Sno, \City\}}\Type{J}\); (b) \(\TT{\SC} = \RelProject_{\{\Sno, \City\}}\TT{J}\)
\end{ConstraintList}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{SIG}
\label{sec-sigs-s-ii-project}
 
\noindent The constraints appearing in \(\schema{2}\) are \Constraint[\schema{2}]{\ref{constraint-project-key}}(a), \Constraint{\ref{constraint-project-key}}(b), \Constraint[\schema{2}]{\ref{constraint-project-key}}(c), \Constraint{\ref{constraint-project-key}}(d), \Constraint[\schema{2}]{\ref{constraint-project-join}}--\Constraint[\schema{2}]{\ref{constraint-project-s-sc-identical}}, \Constraint{\ref{constraint-project-st-sc-identical}}, and \Constraint[\schema{2}]{\ref{constraint-project-relation-type-join}}--\Constraint[\schema{2}]{\ref{constraint-project-types-sc}}. \Constraint[\schema{2}]{\ref{constraint-project-join}} is effectively a tautology that adds no new information, and can be ignored. The completed SIG for \(\schema{2}\) is shown in Figure~\ref{fig-sig-s-ii-project}.
 
%%%%%%%%%%%%%%%%%%%%
 
\begin{figure}
\centering
\begin{tikzpicture}
\matrix[row sep=1.5cm]
{
\node (TST) {\(\Type{\ST}\)}; &[7mm] \node (TTST) {\(\TT{\ST}\)}; &[10mm] &[10mm] \node (TStatus) {\(\Type{\Status}\)}; \\
\node (TSTPlusSC) {\(\Type{J}\)}; & \node (TTSTPlusSC) {\(\TT{J}\)}; & \node (TSno) {\(\Type{\Sno}\)}; & \node (TSSC) {\(\Type{\Status} \times \Type{\City}\)}; \\
\node (TSC) {\(\Type{\SC}\)}; & \node (TTSC) {\(\TT{\SC}\)}; & & \node (TCity) {\(\Type{\City}\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
{ (TST), (TSC), (TSTPlusSC) } -- { (TTST), (TTSC), (TTSTPlusSC) },
};
% FDs
(TSno) -- [funcdep left] (TStatus);
(TSno) -- [funcdep right] (TCity);
(TSno) -- [funcdep right] (TSSC);
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
{ (TTSTPlusSC), (TTST) } -- (TSno),
};
{ [edges=bijection,edge label'={\scriptsize\(\RelProject\)}]
(TTSC) -- (TSno),
};
{ [edges=projection left]
{ (TSTPlusSC), (TTSTPlusSC) } -- { (TST), (TTST) },
(TSSC) -- (TCity),
(TTST) -- (TStatus),
};
{ [edges=projection right]
{ (TSTPlusSC), (TTSTPlusSC) } -- { (TSC), (TTSC) },
(TSSC) -- (TStatus),
(TTSC) -- (TCity),
};
% insert "gaps" into crossed edges
{ [edges={white,line width=1.5mm}]
(TTSTPlusSC) -- [bend right] (TSSC),
};
(TTSTPlusSC) -- [projection right, bend right] (TSSC),
};
\end{tikzpicture}
\caption{SIG for schema \(\schema{2} = \{\ST, \SC\}\).}
\label{fig-sig-s-ii-project}
\end{figure}
 
%%%%%%%%%%%%%%%%%%%%
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Sub-schema \(\bm{\schema{3} = \{\ST\}}\)}
 
\noindent A user granted access only to \(\schema{3}\) can see only relvar \(\ST\). Only constraint \Constraint{\ref{constraint-project-key}}(b) can be propagated directly from \(\schema{0}\) into \(\schema{3}\) as it is the only one expressed in terms of \(\ST\) only. None of the remaining constraints can be rewritten in terms of \(\ST\) only, and so cannot be propagated into \(\schema{3}\).
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{Rewritten constraints}
\label{sec-constraints-s-iii-project}
 
N/A
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{SIG}
\label{sec-sigs-s-iii-project}
 
\noindent The only constraint appearing in \(\schema{3}\) is \Constraint{\ref{constraint-project-key}}(b). The SIG will only include edges and nodes that relate either directly to \(\ST\) or are independent of any relvar. The completed SIG for \(\schema{3}\) is shown in Figure~\ref{fig-sig-s-iii-project}.
 
%%%%%%%%%%%%%%%%%%%%
 
\begin{figure}
\centering
\begin{tikzpicture}
\matrix[row sep=1.5cm]
{
\node (TST) {\(\Type{\ST}\)}; &[7mm] \node (TTST) {\(\TT{\ST}\)}; &[10mm] &[10mm] \node (TStatus) {\(\Type{\Status}\)}; \\
& & \node (TSno) {\(\Type{\Sno}\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
(TST) -- (TTST),
};
% FDs
(TSno) -- [funcdep left] (TStatus);
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
(TTST) -- (TSno),
};
{ [edges=projection left]
(TTST) -- (TStatus),
};
};
\end{tikzpicture}
\caption{SIG for schema \(\schema{3} = \{\ST\}\).}
\label{fig-sig-s-iii-project}
\end{figure}
 
%%%%%%%%%%%%%%%%%%%%
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Transformations}
\label{sec-transforming-project}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{\(\bm{\schema{1}, \schema{2}}\)}
 
\noindent The SIGs for \(\schema{1}\) and \(\schema{2}\) are immediately isomorphic, so \(\Equivalent{\schema{1}}{\schema{2}}\).
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{\(\bm{\schema{1}, \schema{3}}\)}
 
Despite their differences, it's clear that the comparison between \(\schema{1}\) and \(\schema{3}\) for projection views will be similar to that for disjoint restriction views (Section~\ref{sec-transforming-restrict}), as the SIG structures are topologically similar. It's therefore reasonable to conclude that the information capacities of \(\schema{1}\) and \(\schema{3}\) are incomparable, and that view updates based on this pair of schemas will be problematic.
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Additional notes}
 
If we were to create a fourth sub-schema \(\schema{4} = \{\SC\}\) and compare this with \(\schema{1}\), the result would be similar to that for \(\schema{3}\).
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\newpage
 
\section{Lossy projection views (Date, Chapter 5)}
\label{sec-lossy-projection}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Relvars}
\begin{itemize}
\item base relvar \(S\{\Sno, \Status, \City\}\)
\item view \(\ST = \RelProject_{\{\Sno, \Status\}}S\) [supplier status] \eqnnumber\label{eqn-st-lossy}
\item view \(\TC = \RelProject_{\{\Status, \City\}}S\) [status \& city] \eqnnumber\label{eqn-tc-lossy}
\end{itemize}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Tuple types}
\begin{align}
\TT{S} &= \Type{\Sno} \times \Type{\Status} \times \Type{\City} \nonumber \\
\TT{\ST} &= \Type{\Sno} \times \Type{\Status} \nonumber \\
\TT{\TC} &= \Type{\Status} \times \Type{\City} \nonumber
\end{align}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Base schema \(\bm{\schema{0} = \{S, \ST, \TC\}}\)}
\begin{ConstraintList}
 
\item\label{constraint-project-lossy-key} \(\Sno\) is a key for each of \(S\) and \(\ST\), so the functional dependency \(\{\Sno\} \rightarrow \{\Status\}\) holds in each of (a) \(S\) and (b) \(\ST\); and the functional dependency \(\{\Sno\} \rightarrow \{\City\}\) holds in (c) \(S\). [(a) and (c) could in principle be merged into a single functional dependency \(\{\Sno\} \rightarrow \{\Status, \City\}\) in \(S\).]
\item\label{constraint-project-lossy-key-ii} \(\{\Status, \City\}\) is a key for \(\TC\), so the functional dependencies (a) \(\{\Status, \City\} \rightarrow \{\Status\}\) and (b) \(\{\Status, \City\} \rightarrow \{\City\}\) hold in \(\TC\).
% not sure how relevant the FK constraints are?
% how to represent? FK is a subset of the original key, so selection edge between S.Sno and each of LS.Sno and NLS.Sno
% or perhaps a selection edge from Sno to itself? (labelled FK)
% Notation: \Type{\Sno}, \Type{\LS.\Sno}, \Type{\NLS.\Sno}?
\item\label{constraint-project-lossy-stfk} \(\RelProject_{\{\Sno\}}\ST \subseteq \RelProject_{\{\Sno\}}S\) [foreign key from \(\ST\) to \(S\)]
\item\label{constraint-project-lossy-s-st-identical} \(\RelProject_{\{\Sno\}}S = \RelProject_{\{\Sno\}}\ST\) [from (\ref{eqn-st-lossy})]
\item\label{constraint-project-lossy-st-tc-status} \(\RelProject_{\{\Status\}}\ST = \RelProject_{\{\Status\}}\TC\) [from (\ref{eqn-tc-lossy})]
\item\label{constraint-project-lossy-types-st} (a) \(\Type{\ST} = \RelProject_{\{\Sno, \Status\}}\Type{S}\); (b) \(\TT{\ST} = \RelProject_{\{\Sno, \Status\}}\TT{S}\) [from (\ref{eqn-st-lossy})]
\item\label{constraint-project-lossy-types-tc} (a) \(\Type{\TC} = \RelProject_{\{\Status, \City\}}\Type{S}\); (b) \(\TT{\TC} = \RelProject_{\{\Status, \City\}}\TT{S}\) [from (\ref{eqn-tc-lossy})]
\end{ConstraintList}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Sub-schema \(\bm{\schema{1} = \{S\}}\)}
 
\noindent A user granted access only to \(\schema{1}\) can see only relvar \(S\). Constraints \Constraint{\ref{constraint-project-lossy-key}}(a) and \Constraint{\ref{constraint-project-lossy-key}}(c) can be propagated directly from \(\schema{0}\) into \(\schema{1}\) as they are already expressed in terms of \(S\) only. Constraints \Constraint{\ref{constraint-project-lossy-key-ii}} and \Constraint{\ref{constraint-project-lossy-s-st-identical}}--\Constraint{\ref{constraint-project-lossy-types-tc}} cannot be propagated directly from \(\schema{0}\) into \(\schema{1}\), but can all be rewritten in terms of \(S\) only, by substituting the definitions of \(\ST\) (equation~\ref{eqn-st-lossy}) and \(\TC\) (equation~\ref{eqn-tc-lossy}), i.e., \(\STsub = \RelProject_{\{\Sno, \Status\}}S\) and \(\TCsub = \RelProject_{\{\Status, \City\}}S\).
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{Rewritten constraints}
\label{sec-constraints-s-i-project-lossy}
 
\begin{ConstraintList}[\schema{1}]
\item \(\Sno\) is a key for \(\STsub\), therefore the functional dependency \(\{\Sno\} \rightarrow \{\Status\}\) holds in (b) \(\STsub\).
\item \(\{\Status, \City\}\) is a key for \(\TCsub\), so the functional dependencies (a) \(\{\Status, \City\} \rightarrow \{\Status\}\) and (b) \(\{\Status, \City\} \rightarrow \{\City\}\) hold in \(\TCsub\). [Ignoring the trivial case of \(\{\Status, \City\} \rightarrow \{\Status, \City\}\).]
\setcounter{constraint}{3}
\item \(\RelProject_{\{\Sno\}}S = \RelProject_{\{\Sno\}}\STsub\)
\item \(\RelProject_{\{\Sno\}}\STsub = \RelProject_{\{\Sno\}}\TCsub\)
\item (a) \(\Type{\STsub} = \RelProject_{\{\Sno, \Status\}}\Type{S}\); (b) \(\TT{\STsub} = \RelProject_{\{\Sno, \Status\}}\TT{S}\)
\item (a) \(\Type{\TCsub} = \RelProject_{\{\Status, \City\}}\Type{S}\); (b) \(\TT{\TCsub} = \RelProject_{\{\Status, \City\}}\TT{S}\)
\end{ConstraintList}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{SIG}
\label{sec-sigs-s-i-project-lossy}
 
\noindent The constraints appearing in \(\schema{1}\) are \Constraint{\ref{constraint-project-lossy-key}}(a), \Constraint[\schema{1}]{\ref{constraint-project-lossy-key}}(b), \Constraint{\ref{constraint-project-lossy-key}}(c), \Constraint[\schema{1}]{\ref{constraint-project-lossy-key-ii}}, and \Constraint[\schema{1}]{\ref{constraint-project-lossy-s-st-identical}}--\Constraint[\schema{1}]{\ref{constraint-project-lossy-types-tc}}. The completed SIG for \(\schema{1}\) is shown in Figure~\ref{fig-sig-s-i-project-lossy}.
 
%%%%%%%%%%%%%%%%%%%%
 
\begin{figure}
\centering
\begin{tikzpicture}
\matrix[row sep=1.5cm]
{
\node (TST) {\(\Type{\STsub}\)}; &[7mm] \node (TTST) {\(\TT{\STsub}\)}; &[10mm] &[10mm] \node (TStatus) {\(\Type{\Status}\)}; \\
\node (TSTPlusTC) {\(\Type{S}\)}; & \node (TTSTPlusTC) {\(\TT{S}\)}; & \node (TSno) {\(\Type{\Sno}\)}; & \node (TSSC) {\(\Type{\Status} \times \Type{\City}\)}; \\
\node (TTC) {\(\Type{\TCsub}\)}; & \node (TTTC) {\(\TT{\TCsub}\)}; & & \node (TCity) {\(\Type{\City}\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
{ (TST), (TTC), (TSTPlusTC) } -- { (TTST), (TTTC), (TTSTPlusTC) },
};
% FDs
{ [edges=funcdep right]
(TSno) -- { (TCity), (TSSC) },
(TSSC) -- [bend right] (TStatus),
};
{ [edges=funcdep left]
(TSno) -- (TStatus),
(TSSC) -- [bend left] (TCity),
};
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
{ (TTSTPlusTC), (TTST) } -- (TSno),
};
{ [edges=projection left]
{ (TSTPlusTC), (TTSTPlusTC) } -- { (TST), (TTST) },
(TTST) -- (TStatus),
(TSSC) -- [bend right] (TCity),
};
{ [edges=projection right]
{ (TSTPlusTC), (TTSTPlusTC) } -- { (TTC), (TTTC) },
(TSSC) -- [bend left] (TStatus),
};
% insert "gaps" into crossed edges
{ [edges={white,line width=1.5mm}]
(TTSTPlusTC) -- [bend right] (TSSC),
(TTTC) -- [bend right=10] (TSSC),
};
(TTSTPlusTC) -- [projection right, bend right] (TSSC),
(TTTC) -- [edges=bijection,edge label'={\scriptsize\(\RelProject\)}, bend right=10] (TSSC),
};
\end{tikzpicture}
\caption{SIG for schema \(\schema{1} = \{S\}\).}
\label{fig-sig-s-i-project-lossy}
\end{figure}
 
%%%%%%%%%%%%%%%%%%%%
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Sub-schema \(\bm{\schema{2} = \{\ST, \TC\}}\)}
 
\noindent A user granted access only to \(\schema{2}\) can see only relvars \(\ST\) and \(\TC\). Constraints \Constraint{\ref{constraint-project-lossy-key}}(b), \Constraint{\ref{constraint-project-lossy-key-ii}}, and \Constraint{\ref{constraint-project-lossy-st-tc-status}} can be propagated directly from \(\schema{0}\) into \(\schema{2}\) as they are already expressed in terms of \(\ST\) and \(\TC\) only. The remaining constraints cannot be propagated from \(\schema{0}\) into \(\schema{2}\) at all, as none of them can be rewritten in terms of \(\ST\) and \(\TC\) only (due to the lossy decomposition of \(S\) into \(\ST\) and \(\TC\)).
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{Rewritten constraints}
\label{sec-constraints-s-ii-project-lossy}
 
N/A
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{SIG}
\label{sec-sigs-s-ii-project-lossy}
 
\noindent The constraints appearing in \(\schema{2}\) are \Constraint[\schema{2}]{\ref{constraint-project-lossy-key}}(b), \Constraint[\schema{2}]{\ref{constraint-project-lossy-key-ii}}, and \Constraint[\schema{2}]{\ref{constraint-project-lossy-st-tc-status}}. The completed SIG for \(\schema{2}\) is shown in Figure~\ref{fig-sig-s-ii-project-lossy}.
 
%%%%%%%%%%%%%%%%%%%%
 
\begin{figure}
\centering
\begin{tikzpicture}
\matrix[row sep=1.5cm]
{
\node (TST) {\(\Type{\ST}\)}; &[7mm] \node (TTST) {\(\TT{\ST}\)}; &[10mm] &[10mm] \node (TStatus) {\(\Type{\Status}\)}; \\
& & \node (TSno) {\(\Type{\Sno}\)}; & \node (TSSC) {\(\Type{\Status} \times \Type{\City}\)}; \\
\node (TTC) {\(\Type{\TC}\)}; & \node (TTTC) {\(\TT{\TC}\)}; & & \node (TCity) {\(\Type{\City}\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
{ (TST), (TTC) } -- { (TTST), (TTTC) },
};
% FDs
{ [edges=funcdep right]
(TSSC) -- [bend right] (TStatus),
};
{ [edges=funcdep left]
(TSno) -- (TStatus),
(TSSC) -- [bend left] (TCity),
};
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
{ (TTST) } -- (TSno),
};
{ [edges=bijection,edge label'={\scriptsize\(\RelProject\)}]
(TTTC) -- (TSSC),
};
{ [edges=projection left]
(TTST) -- (TStatus),
(TSSC) -- [bend right] (TCity),
};
{ [edges=projection right]
(TSSC) -- [bend left] (TStatus),
};
};
\end{tikzpicture}
\caption{SIG for schema \(\schema{2} = \{\ST, \TC\}\).}
\label{fig-sig-s-ii-project-lossy}
\end{figure}
 
%%%%%%%%%%%%%%%%%%%%
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Sub-schema \(\bm{\schema{3} = \{\ST\}}\)}
 
\noindent A user granted access only to \(\schema{3}\) can see only relvar \(\ST\). Only constraint \Constraint{\ref{constraint-project-lossy-key}}(b) can be propagated directly from \(\schema{0}\) into \(\schema{3}\) as it is the only one expressed in terms of \(\ST\) only. None of the remaining constraints can be rewritten in terms of \(\ST\) only, and so cannot be propagated into \(\schema{3}\).
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{Rewritten constraints}
\label{sec-constraints-s-iii-project-lossy}
 
N/A
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{SIG}
\label{sec-sigs-s-iii-project-lossy}
 
\noindent The only constraint appearing in \(\schema{3}\) is \Constraint{\ref{constraint-project-key}}(b). The SIG will only include edges and nodes that relate either directly to \(\ST\) or are independent of any relvar. The completed SIG for \(\schema{3}\) is shown in Figure~\ref{fig-sig-s-iii-project-lossy}.
 
%%%%%%%%%%%%%%%%%%%%
 
\begin{figure}
\centering
\begin{tikzpicture}
\matrix[row sep=1.5cm]
{
\node (TST) {\(\Type{\ST}\)}; &[7mm] \node (TTST) {\(\TT{\ST}\)}; &[10mm] &[10mm] \node (TStatus) {\(\Type{\Status}\)}; \\
& & \node (TSno) {\(\Type{\Sno}\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
(TST) -- (TTST),
};
% FDs
(TSno) -- [funcdep left] (TStatus);
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
(TTST) -- (TSno),
};
{ [edges=projection left]
(TTST) -- (TStatus),
};
};
\end{tikzpicture}
\caption{SIG for schema \(\schema{3} = \{\ST\}\).}
\label{fig-sig-s-iii-project-lossy}
\end{figure}
 
%%%%%%%%%%%%%%%%%%%%
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Sub-schema \(\bm{\schema{4} = \{\TC\}}\)}
 
\noindent A user granted access only to \(\schema{4}\) can see only relvar \(\TC\). Only constraint \Constraint{\ref{constraint-project-lossy-key-ii}} can be propagated directly from \(\schema{0}\) into \(\schema{4}\) as it the only one expressed in terms of \(\TC\) only. None of the remaining constraints can be rewritten in terms of \(\TC\) only, and so cannot be propagated into \(\schema{4}\).
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{Rewritten constraints}
\label{sec-constraints-s-iv-project-lossy}
 
N/A
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{SIG}
\label{sec-sigs-s-iv-project-lossy}
 
\noindent The only constraint appearing in \(\schema{4}\) is \Constraint[\schema{4}]{\ref{constraint-project-lossy-key-ii}}. The completed SIG for \(\schema{4}\) is shown in Figure~\ref{fig-sig-s-iv-project-lossy}.
 
%%%%%%%%%%%%%%%%%%%%
 
\begin{figure}
\centering
\begin{tikzpicture}
\matrix[row sep=1.5cm]
{
&[7mm] &[10mm] \node (TStatus) {\(\Type{\Status}\)}; \\
\node (TTC) {\(\Type{\TC}\)}; & \node (TTTC) {\(\TT{\TC}\)}; & \node (TSSC) {\(\Type{\Status} \times \Type{\City}\)}; \\
& & \node (TCity) {\(\Type{\City}\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
{ (TTC) } -- { (TTTC) },
};
% FDs
{ [edges=funcdep right]
(TSSC) -- [bend right] (TStatus),
};
{ [edges=funcdep left]
(TSSC) -- [bend left] (TCity),
};
% projection edges
{ [edges=bijection,edge label'={\scriptsize\(\RelProject\)}]
(TTTC) -- (TSSC),
};
{ [edges=projection left]
(TSSC) -- [bend right] (TCity),
};
{ [edges=projection right]
(TSSC) -- [bend left] (TStatus),
};
};
\end{tikzpicture}
\caption{SIG for schema \(\schema{4} = \{\TC\}\).}
\label{fig-sig-s-iv-project-lossy}
\end{figure}
 
%%%%%%%%%%%%%%%%%%%%
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Transformations}
\label{sec-transforming-project-lossy}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{\(\bm{\schema{1}, \schema{2}}\)}
 
\noindent The SIGs for \(\schema{1}\) and \(\schema{2}\) can't be made isomorphic. We can duplicate nodes \(\Type{\ST}\) and \(\TT{\ST}\), but there is no way to link these to the existing nodes \(\Type{\TC}\) and \(\TT{\TC}\) (and vice versa if we duplicate \(\Type{\TC}\) and \(\TT{\TC}\) instead). There are insufficient bijective edges across which to copy other edges. \(\schema{1}\) and \(\schema{2}\) are therefore incomparable.
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{\(\bm{\schema{1}, \schema{3}}\)}
 
Essentially identical to the nonloss projection case (compare Figure~\ref{fig-sig-s-iv-project-lossy} with Figure~\ref{fig-sig-s-iii-project}), so \(\schema{1}\) and \(\schema{3}\) are incomparable.
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{\(\bm{\schema{1}, \schema{4}}\)}
 
The SIG for \(\schema{4}\) is a subset of that for \(\schema{2}\), so \(\schema{1}\) and \(\schema{4}\) must also be incomparable.
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\newpage
 
\section{Lossy one to one join views (Date, Chapter 6)}
\label{sec-one-to-one-join}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Relvars}
\begin{itemize}
\item base relvar \(\ST\{\Sno, \Status\}\) [supplier status]
\item base relvar \(\SC\{\Sno, \City\}\) [supplier city]
\item view \(S = \ST \RelJoin \SC\) \eqnnumber\label{eqn-s-join-one}
\end{itemize}
There are two possible interpretations consistent with these relvars:
\begin{description}
\item[nonloss join:] All suppliers must have a value for both \(\Status\) and \(\City\). This is essentially just the inverse of the nonloss projection view case (see Section~\ref{sec-nonloss-projection}), and thus has the same constraints and characteristics. We therefore don't need to consider this interpretation any further.
\item[lossy join:] Suppliers must have a value for at least one of \(\Status\) or \(\City\). This implies that there may be tuples in \(\ST\) that don't have a corresponding tuple in \(\SC\) (and vice versa), and thus also don't appear in \(S\). In other words, \(S\) is the join of \(\ST\) and \(\SC\), but \(\ST\) and \(\SC\) aren't necessarily projections of \(S\). This interpretation also implies that \(\Sno\) in \(\ST\) and \(\SC\) is not a foreign key to \(S\). This is the interpretation that we will focus on.
\end{description}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Tuple types}
\begin{align}
\TT{S} &= \Type{\Sno} \times \Type{\Status} \times \Type{\City} \nonumber \\
\TT{\ST} &= \Type{\Sno} \times \Type{\Status} \nonumber \\
\TT{\SC} &= \Type{\Sno} \times \Type{\City} \nonumber
\end{align}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Base schema \(\bm{\schema{0} = \{S, \ST, \SC\}}\)}
\begin{ConstraintList}
 
\item\label{constraint-join-one-key} \(\Sno\) is a key for each of \(S\), \(\ST\), and \(\SC\), so the functional dependency \(\{\Sno\} \rightarrow \{\Status\}\) holds in each of (a) \(S\) and (b) \(\ST\); and the functional dependency \(\{\Sno\} \rightarrow \{\City\}\) holds in each of (c) \(S\) and (d) \(\SC\). [(a) and (c) could in principle be merged into a single functional dependency \(\{\Sno\} \rightarrow \{\Status, \City\}\) in \(S\).]
\item\label{constraint-join-one-join} \(S = \SC \RelJoin \ST\) [from (\ref{eqn-s-join-one})]
\item\label{constraint-join-one-relation-type-join} (a) \(\Type{S} = \Type{\ST} \RelJoin \Type{\SC}\); (b) \(\TT{S} = \TT{\ST} \RelJoin \TT{\SC}\) [from \Constraint{\ref{constraint-join-one-join}}]
\end{ConstraintList}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Sub-schema \(\bm{\schema{1} = \{S\}}\)}
 
\noindent A user granted access only to \(\schema{1}\) can see only relvar \(S\). Constraints \Constraint{\ref{constraint-project-key}}(a) and \Constraint{\ref{constraint-project-key}}(c) can be propagated directly from \(\schema{0}\) into \(\schema{1}\) as they are already expressed in terms of \(S\) only. Constraints \Constraint{\ref{constraint-join-one-join}} and \Constraint{\ref{constraint-join-one-relation-type-join}} cannot be propagated directly from \(\schema{0}\) into \(\schema{1}\), but can be rewritten in terms of \(S\) only, by substituting \(S\) for the expression \(\ST \RelJoin \SC\) (equation~\ref{eqn-s-join-one}). Constraints \Constraint{\ref{constraint-project-key}}(b) and \Constraint{\ref{constraint-project-key}}(d) cannot be propagated into \(\schema{1}\), as they cannot be rewritten in terms of \(S\) only.
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{Rewritten constraints}
\label{sec-constraints-s-i-join-one}
 
\begin{ConstraintList}[\schema{1}]
\setcounter{constraint}{1}
\item \(S = S\)
\item (a) \(\Type{S} = \Type{S}\); (b) \(\TT{S} = \TT{S}\)
\end{ConstraintList}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{SIG}
\label{sec-sigs-s-i-join-one}
 
\noindent The constraints appearing in \(\schema{1}\) are \Constraint{\ref{constraint-join-one-key}}(a), \Constraint{\ref{constraint-join-one-key}}(c), \Constraint[\schema{1}]{\ref{constraint-join-one-join}}, and \Constraint[\schema{1}]{\ref{constraint-join-one-relation-type-join}}. \Constraint[\schema{1}]{\ref{constraint-join-one-join}} and \Constraint[\schema{1}]{\ref{constraint-join-one-relation-type-join}} are effectively tautologies that add no new information, and can thus be safely ignored. The completed SIG for \(\schema{1}\) is shown in Figure~\ref{fig-sig-s-i-join-one}.
 
%%%%%%%%%%%%%%%%%%%%
 
\begin{figure}
\centering
\begin{tikzpicture}
\matrix[row sep=1.5cm]
{
&[7mm] &[10mm] &[10mm] \node (TStatus) {\(\Type{\Status}\)}; \\
\node (TSTPlusSC) {\(\Type{S}\)}; & \node (TTSTPlusSC) {\(\TT{S}\)}; & \node (TSno) {\(\Type{\Sno}\)}; & \node (TSSC) {\(\Type{\Status} \times \Type{\City}\)}; \\
& & & \node (TCity) {\(\Type{\City}\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
(TSTPlusSC) -- (TTSTPlusSC),
};
% FDs
(TSno) -- [funcdep left] (TStatus);
(TSno) -- [funcdep right] (TCity);
(TSno) -- [funcdep right] (TSSC);
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
{ (TTSTPlusSC) } -- (TSno),
};
{ [edges=projection left]
(TSSC) -- (TCity),
};
{ [edges=projection right]
(TSSC) -- (TStatus),
};
% insert "gaps" into crossed edges
{ [edges={white,line width=1.5mm}]
(TTSTPlusSC) -- [bend right] (TSSC),
};
(TTSTPlusSC) -- [projection right, bend right] (TSSC),
};
\end{tikzpicture}
\caption{SIG for schema \(\schema{1} = \{S\}\).}
\label{fig-sig-s-i-join-one}
\end{figure}
 
%%%%%%%%%%%%%%%%%%%%
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Sub-schema \(\bm{\schema{2} = \{\ST, \SC\}}\)}
 
\noindent A user granted access only to \(\schema{2}\) can see only relvars \(\ST\) and \(\SC\). Constraints \Constraint{\ref{constraint-join-one-key}}(b) and \Constraint{\ref{constraint-join-one-key}}(d) can be propagated directly from \(\schema{0}\) into \(\schema{2}\) as they are already expressed in terms of \(\ST\) and \(\SC\) only. Constraints \Constraint{\ref{constraint-join-one-join}} and \Constraint{\ref{constraint-join-one-relation-type-join}} cannot be propagated directly from \(\schema{0}\) into \(\schema{2}\), but can be rewritten in terms of \(\ST\) and \(\SC\) only, by substituting \(\ST \RelJoin \SC\) for the expression \(S\) (equation~\ref{eqn-s-join-one}). Constraints \Constraint{\ref{constraint-project-key}}(a) and \Constraint{\ref{constraint-project-key}}(c) cannot be propagated into \(\schema{1}\), as they cannot be rewritten in terms of \(\ST\) and \(\SC\) only.
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{Rewritten constraints}
\label{sec-constraints-s-ii-join-one}
 
\begin{ConstraintList}[\schema{2}]
\setcounter{constraint}{1}
\item \(\ST \RelJoin \SC = \ST \RelJoin \SC\)
\item (a) \(\Type{\ST} \RelJoin \Type{\SC} = \Type{\ST} \RelJoin \Type{\SC}\); (b) \(\TT{\ST} \RelJoin \TT{\SC} = \TT{\ST} \RelJoin \TT{\SC}\)
\end{ConstraintList}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{SIG}
\label{sec-sigs-s-ii-join-one}
 
\noindent The constraints appearing in \(\schema{2}\) are \Constraint{\ref{constraint-join-one-key}}(b), \Constraint{\ref{constraint-join-one-key}}(d), \Constraint[\schema{1}]{\ref{constraint-join-one-join}}, and \Constraint[\schema{1}]{\ref{constraint-join-one-relation-type-join}}. \Constraint[\schema{1}]{\ref{constraint-join-one-join}} and \Constraint[\schema{1}]{\ref{constraint-join-one-relation-type-join}} are effectively tautologies that add no new information, and can thus be safely ignored. The completed SIG for \(\schema{2}\) is shown in Figure~\ref{fig-sig-s-ii-join-one}.
 
%%%%%%%%%%%%%%%%%%%%
 
\begin{figure}
\centering
\begin{tikzpicture}
\matrix[row sep=1.5cm]
{
\node (TST) {\(\Type{\ST}\)}; &[7mm] \node (TTST) {\(\TT{\ST}\)}; &[10mm] &[10mm] \node (TStatus) {\(\Type{\Status}\)}; \\
& & \node (TSno) {\(\Type{\Sno}\)}; & \\
\node (TSC) {\(\Type{\SC}\)}; & \node (TTSC) {\(\TT{\SC}\)}; & & \node (TCity) {\(\Type{\City}\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
{ (TST), (TSC) } -- { (TTST), (TTSC) },
};
% FDs
(TSno) -- [funcdep left] (TStatus);
(TSno) -- [funcdep right] (TCity);
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
{ (TTST) } -- (TSno),
};
{ [edges=bijection,edge label'={\scriptsize\(\RelProject\)}]
(TTSC) -- (TSno),
};
{ [edges=projection left]
(TTST) -- (TStatus),
};
{ [edges=projection right]
(TTSC) -- (TCity),
};
};
\end{tikzpicture}
\caption{SIG for schema \(\schema{2} = \{\ST, \SC\}\).}
\label{fig-sig-s-ii-join-one}
\end{figure}
 
%%%%%%%%%%%%%%%%%%%%
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Sub-schema \(\bm{\schema{3} = \{\ST\}}\)}
 
\noindent A user granted access only to \(\schema{3}\) can see only relvar \(\ST\). Only constraint \Constraint{\ref{constraint-join-one-key}}(b) can be propagated directly from \(\schema{0}\) into \(\schema{3}\) as it is the only one expressed in terms of \(\ST\) only. None of the remaining constraints can be rewritten in terms of \(\ST\) only, and so cannot be propagated into \(\schema{3}\).
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{Rewritten constraints}
\label{sec-constraints-s-iii-join-one}
 
N/A
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{SIG}
\label{sec-sigs-s-iii-join-one}
 
\noindent The only constraint appearing in \(\schema{3}\) is \Constraint{\ref{constraint-join-one-key}}(b). The SIG will only include edges and nodes that relate either directly to \(\ST\) or are independent of any relvar. The completed SIG for \(\schema{3}\) is shown in Figure~\ref{fig-sig-s-iii-join-one}.
 
%%%%%%%%%%%%%%%%%%%%
 
\begin{figure}
\centering
\begin{tikzpicture}
\matrix[row sep=1.5cm]
{
\node (TST) {\(\Type{\ST}\)}; &[7mm] \node (TTST) {\(\TT{\ST}\)}; &[10mm] &[10mm] \node (TStatus) {\(\Type{\Status}\)}; \\
& & \node (TSno) {\(\Type{\Sno}\)}; \\
};
\graph{
% relation types to tuple types
{ [edges=surtotal]
(TST) -- (TTST),
};
% FDs
(TSno) -- [funcdep left] (TStatus);
% projection edges
{ [edges=bijection,edge label={\scriptsize\(\RelProject\)}]
(TTST) -- (TSno),
};
{ [edges=projection left]
(TTST) -- (TStatus),
};
};
\end{tikzpicture}
\caption{SIG for schema \(\schema{3} = \{\ST\}\).}
\label{fig-sig-s-iii-join-one}
\end{figure}
 
%%%%%%%%%%%%%%%%%%%%
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Transformations}
\label{sec-transforming-join-one}
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{\(\bm{\schema{1}, \schema{2}}\)}
 
\noindent The SIGs for \(\schema{1}\) and \(\schema{2}\) can't be made isomorphic, as there's no way using SIG transformations to create in \(\schema{3}\) a node equivalent to \(\Type{\Status} \times \Type{\City}\) in \(\schema{1}\). \(\schema{1}\) and \(\schema{2}\) are therefore incomparable.
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsubsection{\(\bm{\schema{1}, \schema{3}}\)}
 
This is essentially identical to the lossy projection views example (see Section~\ref{sec-sigs-s-iii-project-lossy}). \(\schema{1}\) and \(\schema{3}\) are therefore incomparable.
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
\subsection{Additional notes}
 
If we were to create a fourth sub-schema \(\schema{4} = \{\SC\}\) and compare this with \(\schema{1}\), the result would be similar to that for \(\schema{3}\).
 
 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 
 
 
\end{document}
View
APCCM_2017/Presentation/images/Business_School_LS_ID_crop.pdf 0 → 100644
Not supported
View
APCCM_2017/Presentation/images/Date-SQLandRelationalTheory.png 0 → 100644
View
APCCM_2017/Presentation/images/Date-ViewUpdatingandRelationalTheory-large.png 0 → 100644
View
APCCM_2017/Presentation/images/date.png 0 → 100644
View
APCCM_2017/acmcopyright.sty 0 → 100644
View
APCCM_2017/sig-alternate-05-2015.cls 0 → 100644