Preview

Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS)

Advanced search

Solving NULL issue in queries to a relational database using the operators of relational algebra A

Abstract

Suggest interpreting logical expressions in the relational restriction operator as relational expressions. To be more precise, the relational restriction operator (R WHERE b) over the relation R on some logical expression b can be represented as join (R<AND>B) of given relation R and relational expression B, which is derived from original logical expression b replacing  of logical operators AND, OR, NOT for corresponding relational operators <AND>, <OR>, <NOT>. Then for some tuple T we define a value of attribute A as the relation with the single tuple with the single value of concerned attribute – RELATION<A> {{a}}. The value of attribute marked as NULL meaning the unknown value we define as the relation with a head including concerned attribute and the body including all possible values over the type of attribute A – REALTIONAL<A>{…}. The equality values of attributes are definite as equijoin of these attributes represented as relation. The tuple T, which could be presented as Cartesian product over all its attributes, is also definite as a relation RT. The validity of this tuple T represented as relation RTover the original logical expression b means the truth of universal quantifier over the tuples of RT on expression b, which means equality of join (RT <AND> B)and RT  –  (RT <AND> B)= RT.

About the Author

Ivan V. Bludov
ISP RAS, Moscow
Russian Federation


References

1. C. J. Date. “Why Three- and Four-Valued Logic Don’t Work” in “Date on Database. Writings 2000–2006”. Apress, 2006. Впервые опубликована на сайте http://www.dbdebunk.com (February 2006).

2. C. J. Date. Database in Depth: Relational Theory for Practitioners. Sebastopol, Calif.: O’Reilly Media, Inc. (2005).

3. C. J. Date. SQL and Relational Theory: How to Write Accurate SQL Code. O’Reilly Media, Inc. (2009).

4. Claude Rubinson. Nulls, Three-Valued Logic, and Ambiguity in SQL : Critiquing Date’s Critique. SIGMOD Record, December 2007 (Vol. 36, No. 4). См. также перевод: http://citforum.ru/database/articles/nulls/

5. C. J. Date. A Critique of Claude Rubinson’s Paper Nulls, Three - Valued Logic, and Ambiguity in SQL: Critiquing Date’s Critique. SIGMOD Record, Vol. 37, No. 3, September 2008. См. также перевод: http://citforum.ru/database/articles/date_vs_rubinson/

6. John Grant. Null Values in SQL. SIGMOD Record, Vol. 37, No. 3, September 2008. См. также перевод: http://citforum.ru/database/articles/grant_vs_rubinson/

7. C. J. Date, Hugh Darwen. “Foundation for Future Database Systems: The Third Manifesto”, Addison-Wesley Pub Co; 2nd edition (2000).

8. Имеется перевод: Дейт К., Дарвен Х. Основы будущих систем баз данных. Третий манифест. 2-е изд. (под ред. С. Д. Кузнецова). М.: Янус-К, 2004.


Review

For citations:


Bludov I.V. Solving NULL issue in queries to a relational database using the operators of relational algebra A. Proceedings of the Institute for System Programming of the RAS (Proceedings of ISP RAS). 2011;21. (In Russ.)



Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 License.


ISSN 2079-8156 (Print)
ISSN 2220-6426 (Online)