Teaching Database Management Systems with Java
Matthew Merzbacher
Department of Mathematics and Computer Science
Mills College
Oakland, CA 94613
matthew@mills.edu
Abstract
We present a multi-phase programming project, in Java,
for an upper-division database course. The project par-
allels a modest reordering of the traditional classroom
presentation of database management. In addition to il-
luminating theoretical concepts, the lab provides a cap-
stone experience for an undergraduate computer science
degree.
1
Introduction
The field of database management systems (DBMS)
has both theoretical and practical components. Some
schools are able to offer separate courses in database
theory and implementation, perhaps even having dis-
tinct courses for different database models. At many
colleges, especially small ones, there is no room in
the curriculum for multiple database courses - a sin-
gle course must suffice. Such database courses only
include relational database theory and SQL program-
ming without requiring any low-level implementation.
Students learn about functional dependencies, rela-
tional algebra and/or calculus, SQL, query optimiza-
tion, and how various indexing schemes work, but they
don't get a good understanding of what goes on be-
neath the surface. They know little of data organiza-
tion and the costs and benefits of using different ac-
cess methods in a database system. Without this un-
derstanding, they cannot properly take advantage of
the powerful performance tools that accompany com-
mercial database systems. Further, they will not be
able to evaluate the promises of new database models.
Permission to make digital or hard copies of all or part of this work for
personal or classroom use is granted •without fee provided that
copies are not made or distributed for profit or commercial advant
-age and that copies bear this notice and the full citation on the first page,
To copy otherwise, to republish, to post on servers or to
redistribute to lists, requires prior specific permission and/or a fee.
SIGCSE 2000 3/00 Austin, TX, USA
© 2000 ACM 1-58113-213-1/99/0003...$5.00
Introductory database courses should include a prac-
tical programming component. A database course con-
taining both theory and implementation serves as a cap-
stone experience, bringing together several parts of com-
puter science (software engineering, data structures, al-
gorithms, operating systems and DBMS theory). At
Mills, we require such a capstone course as part of
a computer science degree. Students can satisfy this
requirement by taking compiler construction or this
database course.
This paper presents a multi-phase programming project
designed to accompany a traditional presentation of
database management found in typical DBMS texts
[3, 4, 6]. These texts provide insight into implemen-
tation issues but focus primarily on the theory behind
database systems. This paper discusses the project and
our experiences with it during a test run in Spring 1999.
The project starts with basic file access and grows into
a relational database, including optional front-end and
query optimization. Experiments illustrate the costs
and benefits of each step along the way.
Students program in Java 1 [1], frequently employing the
object-oriented programming principles of inheritance
and dynamic binding to improve extensibility. For ex-
ample, students are initially presented with two data
types (strings and integers), but are encouraged to add
their own new types (dates, reals, etc.) to the system.
The ease of solving this task shows the flexibility of
well-designed code.
Part of the point of this project is to familiarize stu-
dents with the need for software engineering and large
program management. Almost all of their program-
ming background is with relatively small problems that
they can keep entirely in their minds at one time. This
project is much too big and open-ended for that; stu-
dents must organize their efforts to succeed. Some up-
front structure is given, but students are not required
to follow that structure - it is merely a suggested path.
1 The principles demonstrated in this paper are applicable
using other suitable languages, notably CT+.
31