Skip to Content
Database in Depth
book

Database in Depth

by C.J. Date
May 2005
Intermediate to advanced
232 pages
7h 27m
English
O'Reilly Media, Inc.
Content preview from Database in Depth

Appendix A. A Little Bit of Logic

In Chapter 1, I mentioned that there's an alternative to the relational algebra called the relational calculus. Relational calculus is essentially an applied form of predicate calculus, tailored to the needs of relational databases. Queries and constraints, for example, can be formulated using relational calculus instead of relational algebra; indeed, sometimes it's easier to come up with a calculus formulation (on the other hand, sometimes the opposite is true). And it's desirable, in my opinion, for database professionals to have at least a nodding acquaintance with the basic concepts of the calculus as well as the algebra; hence this appendix, which offers a brief and very informal introduction to such matters.

By the way, it follows from the preceding paragraph that a relational language can be based on either the algebra or the calculus. So which is SQL based on? The answer, regrettably, is partly both and partly neither. When it was first designed, SQL was specifically intended to be different from both the algebra and the calculus; indeed, such a goal was the prime motivation for the introduction of the SQL "IN subquery" construct. As time went by, however, it turned out that certain features of both the algebra and the calculus were needed after all, and the language grew to accommodate them. The situation today is thus that some aspects of SQL are "algebra-like," some are "calculus-like," and some are neither.

Propositions

Recall from Chapter ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Database Internals

Database Internals

Alex Petrov
Practical SQL

Practical SQL

Anthony DeBarros

Publisher Resources

ISBN: 0596100124Errata Page