Understanding Relational Database Query Languages

by
Edition: 1st
Format: Paperback
Pub. Date: 2001-02-26
Publisher(s): Prentice Hall
  • Free Shipping Icon

    Free Shipping On All Orders!*

    Free economy shipping applies to all orders shipped to residential addresses. Orders shipped to campus receive free standard shipping. Free shipping offers do not apply to Marketplace items.

List Price: $62.00

Rent Textbook

Select for Price
There was a problem. Please try again later.

New Textbook

We're Sorry
Sold Out

Used Textbook

We're Sorry
Sold Out

eTextbook

We're Sorry
Not Available

How Marketplace Works:

  • This item is offered by an independent seller and not shipped from our warehouse
  • Item details like edition and cover design may differ from our description; see seller's comments before ordering.
  • Sellers much confirm and ship within two business days; otherwise, the order will be cancelled and refunded.
  • Marketplace purchases cannot be returned to eCampus.com. Contact the seller directly for inquiries; if no response within two days, contact customer service.
  • Additional shipping costs apply to Marketplace purchases. Review shipping costs at checkout.

Summary

This invaluable learning tool provides an understanding of the industry-standard query language SQL. Using an appropriate mix of underlying mathematical formalism and hands-on activities with numerous examples, the book is designed to help users grasp the essential concepts of relational database query languages.The book provides a complete presentation of the relational data model, relational algebra, domain and tuple relational calculus and SQL, with case studies and Microsoft assess.For individuals in computer science, information services and industrial engineering interested in gaining an understanding of the foundations of industry SQL.

Table of Contents

Preface xi
The Relational Data Model
1(18)
Introduction
1(4)
Conceptual Design
5(3)
Mapping to Tables
8(6)
Data Definition, Storage, and Retrieval
14(1)
Summary
15(4)
Relational Algebra
19(16)
Fundamental Operators
19(4)
Additional Operators
23(4)
Intermediate Relations and Renaming
27(1)
Example Queries
28(3)
Query Optimization
31(1)
Summary
32(3)
Domain Relational Calculus
35(16)
Expressions
35(2)
Expressive Power
37(8)
Fundamental Operators
38(3)
Additional Operators
41(4)
Safety
45(1)
Example Queries
45(2)
By-Name Syntax
47(1)
Summary
48(3)
Tuple Relational Calculus
51(14)
Expressions
51(2)
Expressive Power
53(7)
Fundamental Operators
54(2)
Additional Operators
56(3)
Safety
59(1)
Example Queries
60(2)
Summary
62(3)
SQL
65(33)
Basic Query Expressions
66(3)
Expressive Power
69(6)
Fundamental Operators
69(2)
Additional Operators
71(1)
Exists
72(2)
Safety
74(1)
Example Queries
75(2)
Additional Features of the Query Language
77(8)
Views and Renaming of Attributes
77(1)
Sorting
78(1)
Aggregation
79(3)
Nested Subqueries
82(2)
Joined Tables
84(1)
Query Optimization
85(2)
Beyond the Query Language
87(5)
Data Definition Language
87(2)
Data Manipulation Language
89(1)
Data Control
90(2)
Summary
92(6)
Case Studies
98(45)
Web Page
98(12)
New Home
110(14)
Investment Portfolio
124(15)
Summary
139(4)
Microsoft Access
143(16)
Data Definition
143(4)
Data Population
147(1)
Access QBE
148(4)
Access SQL
152(2)
Additional Features of Access QBE
154(3)
Summary
157(2)
A WINRDBI 159(7)
Overview
159(2)
Query Languages
161(3)
Implementation Overview
164(1)
Summary
165(1)
Bibliographic Notes 166(5)
Index 171

Excerpts

Preface The goal of this book is to help the reader understand relational database query languages, including the industry-standard structured query language (SQL) and the query languages of the popular PC-based database product Microsoft Access. The book also covers the formal languages upon which SQL is based, such as the relational algebra and relational calculus languages. The relational algebra is a procedural language having specific operators to apply to relations for the retrieval of data. Most educators agree that an understanding of relational algebra is criticalto understanding SQL. The relational calculus languages, like SQL, are declarative query languages, indicating the properties of the data to be retrieved. There are two types of relational calculus query languages: domain relational calculus (DRC), where a variable ranges over a domain or column of a table, and tuple relational calculus (TRC), where a variable ranges over a tuple or row of a table. This book covers the DRC language, because of the use of DRC-like languages for the specification and optimization of data mining techniques and related technologies that integrate database and artificial intelligence. The book covers the TRC language, because the basic SQL query expression is a syntactic variation of an expression in TRC. Again, an understanding of TRC provides a strong foundation for understanding the industry-standard query language SQL. The book is based on the premise that understanding comes from a wealth of examples and a hands-on approach. The various query languages are explored through not only detailed examples, but also side-by-side comparisons of the languages on various types of queries over several database enterprises. This example-based approach is reinforced by the inclusion of an appendix that describes the WinRDBI educational tool, which is available on the Web. (See Appendix A.) The WinRDBI educational tool provides a graphical, interactive environment for a hands-on approach to understanding the query languages. The queries marked with a check in the book are provided electronically on the companion website so that the reader can check the results of the queries using the tool. The targeted audience of the book ranges from a student that is enrolled in an introductory database management course to the professional engineer that wants to understand the foundations of SQL. Students in an introductory database management course, which is offered in many disciplines including computer science, computer information systems and industrial engineering, will find this book useful as a supplemental text. However, the book is self-contained, so that it is accessible to the professional engineer faced with using relational database technology. For example, the first chapter of the book includes an introduction to the relational data model, an overview of the conceptual design of a database based on the requirements of an enterprise, and a description of mapping the conceptual design to the relational data model. The assumed prerequisites include the knowledge of set theory and the desire to understand relational database query languages. CHAPTER GUIDE THE RELATIONAL DATA MODEL This chapter is useful to all readers, since it introduces the terminology and notation of the text, and the example enterprise used throughout the book. RELATIONAL ALGEBRA Most educators agree that understanding relational algebra is criticalto understanding anyrelational database query language. The examples presented in this chapter form the basis of the exposition of the other query languages. DOMAIN RELATIONAL CALCULUS The relational calculus languages provide the foundation for declarative query languages, such as SQL, that state the properties of the data to be retrieved. The DRC language also forms the foundation of declarative languages used for the integration of database and artificial intelligence technologies. The DRC language uses variables that range over a column of a table. This approach provides practical shortcuts that are not available in its sibling TRC language, where a variable ranges over the row of a table. Most students introduced to the DRC and TRC languages prefer the paradigm offered by DRC, although there are always a few students who prefer the procedural paradigm offered by relational algebra. You are cheerfully invited to read this chapter and the TRC chapter that follows and make up your own mind. TUPLE RELATIONAL CALCULUS Since the basic SQL query expression is a syntactic variation of a TRC expression, it is recommended to cover the TRC language before SQL. The TRC chapter introduces tuple variables, which are variables that range over the tuples or rows of a relation. In SQL, these tuple variables are called table aliases,or range variables. SQL This chapter explores SQL in the context of its mathematical foundations. The basic query expression in SQL is mapped to its equivalent relational algebra expression and its similarity to an expression of the tuple relational calculus language is illustrated. The examples over the working enterprise use basic features of the SQL language to reinforce the relationship between SQL and the formal query languages. For pragmatic reasons, SQL is more powerful than its formal counterparts on which it is based. These additional features of SQL are illustrated by example. Since the SQL standard evolved to provide more than a query language, this chapter also covers the standard''s data definition language, data manipulation language, and data control language for integrity and security. CASE STUDIES This chapter provides the opportunity for the reader to work through three case studies starting from a requirements description, to its conceptual design, its relational data model implementation, and then a side-by-side comparison of the four query languages using relevant queries over the case study. MICROSOFT ACCESS The goal of this chapter is to relate theory to practice by covering the query languages provided by the popular, PC-based database product Microsoft Access. APPENDIX A. WINRDBI EDUCATIONAL TOOL This appendix chapter provides an overview of the WinRDBI educational tool, describing the assumptions of the query languages recognized by the educational tool (relational algebra, domain relational calculus, tuple relational calculus, and SQL). FOR MORE INFORMATION The Prentice Hall companion website for this book is at the URL: http://www.prenhall.com/dietrich The WinRDBI educational tool and the author''s website for the book is at the URL: http://www.eas.asu.edu/~winrdbi An instructor resource CD is available, which contains supporting material for the book including solutions to chapter exercises for WinRDBI. The author''s preferred email address for correspondence regarding the book is: swdietrich@asu.edu ACKNOWLEDGMENTS There are many people who are involved in the process of writing and publishing a book. I appreciate the thoughtful guidance in the writing of the book that was provided by the reviewers: Chris Eagle, Ibrahim Imam, William Perrizo, Munindar Singh, Jennifer Widom, and Dawn Wilkins. My thanks to those at Prentice Hall who warmly welcomed me as a member of their family of authors: Alan Apt, Toni Holm, Amy Todd, Lakshmi Balasubramanian, Jennie Burger, Jayne Conte, David George, Vince O''Brien, Cindy Szollose and Jake Warde. My involvement in the design and development of the WinRDBI educational tool provided the motivation for writing this book. The following students contributed to the development of WinRDBI: Eric Eckert, Changguan Fan, Chien-Ho H

An electronic version of this book is available through VitalSource.

This book is viewable on PC, Mac, iPhone, iPad, iPod Touch, and most smartphones.

By purchasing, you will be able to view this book online, as well as download it, for the chosen number of days.

Digital License

You are licensing a digital product for a set duration. Durations are set forth in the product description, with "Lifetime" typically meaning five (5) years of online access and permanent download to a supported device. All licenses are non-transferable.

More details can be found here.

A downloadable version of this book is available through the eCampus Reader or compatible Adobe readers.

Applications are available on iOS, Android, PC, Mac, and Windows Mobile platforms.

Please view the compatibility matrix prior to purchase.