Book Details
Understanding Relational Database
Query Languages, 1/e
Suzanne W. Dietrich,
Prentice Hall
Copyright 2001
ISBN 0-13-028652-4
Companion Website:
http://www.prenhall.com/dietrich
WinRDBI Website:
http://winrdbi.asu.edu
I have been helping students understand relational database
query languages for many years. Over these years, numerous students at the beginning of the semester have commented
that they already knew some SQL from working in industry. During the semester, the students weren't sure how the
coverage of relational algebra and relational calculus query languages would help them understand SQL. However,
once SQL was presented in terms of the mathematical foundations of these languages, they understood - not only
SQL but the relationship between SQL and the formal query languages. This recurrent anecdote provided the motivation
to write this book.
Before delving into the query languages, I've included an introductory chapter on the relational data model and
how to design a relational database schema using the well-known Entity-Relationship (ER) graphical data model.
This introductory chapter also describes the EMPLOYEE TRAINING enterprise used as a working example throughout
the book. Once the query languages are presented (a chapter is devoted to each language), a case studies chapter
provides a description of three database enterprises: WEB PAGE, NEW HOME, and INVESTMENT PORTFOLIO. Each case study
includes a requirements specification, its conceptual design as an ER diagram, its corresponding relational database
schema, and a side-by-side comparison of the four query languages using relevant queries over the enterprise. I've
also included a chapter on understanding the QBE and SQL query languages provided by the popular PC database product
Microsoft Access.
The appendix describes the WinRDBI educational tool, which provides an interpreter for the relational database
query languages described in the book: relational algebra, domain and tuple relational calculus, and SQL
(see http://winrdbi.asu.edu).
The book's companion website (
http://www.prenhall.com/dietrich )
includes the checked queries from the book so that
the reader can check the results of the queries using the tool.
(These queries are also available on the
WinRDBI
samples page.)
The database and queries are provided for four database
enterprises in the four query languages recognized by the tool.
(An Access 2000 database for the EMPLOYEE TRAINING enterprise and
queries from the book
can also be found on the companion website and
here.)
I've designed the book to be accessible to anyone who knows elementary set theory - from a student that is enrolled
in an introductory database management course to the professional engineer that wants to learn the foundations
of the industry-standard query language SQL. Readers can then apply their understanding of relational database
query languages to any relational database product.
1 THE RELATIONAL DATA MODEL
1.1 Introduction
1.2 Conceptual Design
1.3 Mapping to Tables
1.4 Data Definition, Storage, and Retrieval
1.5 Summary
2 RELATIONAL ALGEBRA
2.1 Fundamental Operators
2.2 Additional Operators
2.3 Intermediate Relations and Renaming
2.4 Example Queries
2.5 Query Optimization
2.6 Summary
3 DOMAIN RELATIONAL CALCULUS
3.1 Expressions
3.2 Expressive Power
3.2.1 Fundamental Operators
3.2.2 Additional Operators
3.2.3 Safety
3.3 Example Queries
3.4 By Name Syntax
3.5 Summary
4 TUPLE RELATIONAL CALCULUS
4.1 Expressions
4.2 Expressive Power
4.2.1 Fundamental Operators
4.2.2 Additional Operators
4.2.3 Safety
4.3 Example Queries
4.4 Summary
5 SQL
5.1 Basic Query Expressions
5.2 Expressive Power
5.2.1 Fundamental Operators
5.2.2 Additional Operators
5.2.3 Exists
5.2.4 Safety
5.3 Example Queries
5.4 Additional Features of the Query Language
5.4.1 Views and Renaming of Attributes
5.4.2 Sorting
5.4.3 Aggregation
5.4.4 Nested Subqueries
5.4.5 Joined Tables
5.5 Query Optimization
5.6 Beyond the Query Language
5.6.1 Data Definition Language
5.6.2 Data Manipulation Language
5.6.3 Data Control
5.7 Summary
6 CASE STUDIES
6.1 Web Page
6.2 New Home
6.3 Investment Portfolio
6.4 Summary
7 MICROSOFT ACCESS
7.1 Data Definition
7.2 Data Population
7.3 Access QBE
7.4 Access SQL
7.5 Additional Features of Access QBE
7.6 Summary
A WINRDBI
A.1 Overview
A.2 Query Languages
A.3 Implementation Overview
A.4 Summary
BIBLIOGRAPHIC NOTES