Journal of Information Systems Education (JISE)

Volume 13

Volume 13 Number 2, Pages 85-88

Summer 2002

Teaching Tip
A Simpler (and Better) SQL Approach to Relational Division

Victor M. Matos
Cleveland State University
Cleveland, OH 44114, USA

Rebecca Grasser
Lakeland Community College
Kirtland, OH 44094, USA

Abstract: A common type of database query requires one to find all tuples of some table that are related to each and every one of the tuples of a second group. In general those queries can be solved using the relational algebra division operator. Relational division is very common and appears frequently in many queries. However, we have found that the phrasing of this operator in SQL seems to present an overwhelming challenge to novice and experienced database programmers. Furthermore, students seem to have the most problems with the SQL version commonly recommended in the database literature. We present an alternative solution that is not only more intuitive and easier to deliver in the classroom but also exhibits a better computational performance.

Keywords: Database systems, SQL, Division operator, Relational algebra, Classroom presentation, Human reactions, Code performance

Download this article: JISE - Volume 13 Number 2, Page 85.pdf

Recommended Citation: Matos, V. M. & Grasser, R. (2002). Teaching Tip: A Simpler (and Better) SQL Approach to Relational Division. Journal of Information Systems Education, 13(2), pp. 85-88.