Skip to Content
Relational Theory for Computer Professionals
book

Relational Theory for Computer Professionals

by C.J. Date
May 2013
Advanced
284 pages
6h 51m
English
O'Reilly Media, Inc.
Content preview from Relational Theory for Computer Professionals

Chapter 11. SQL Operators I

You know my methods. Apply them.

—Arthur Conan Doyle: The Sign of Four (1890)

Now we can begin to examine the question of how, or to what extent, SQL supports the various operators of the relational algebra. For obvious reasons, the structure of this chapter deliberately parallels that of Chapter 4 in Part I of the book. First, however, let me remind you that:

  • SQL tables can contain duplicate rows—so you should take steps to prohibit them wherever you can (at least if you want the tables in question to be amenable to relational processing).

  • SQL tables have a left to right ordering to their attributes—but try not to write code that relies on that ordering, because such code is (by definition) not relational.

  • SQL tables can contain nulls—but don’t let them!

Note: The book SQL and Relational Theory describes a discipline it refers to as “using SQL relationally.” The idea is that if you abide by the recommendations in that book, then you can behave almost as if SQL truly were relational, and you can enjoy the benefits of working with what is, in effect, a truly relational system (or close to one, at any rate). And it probably goes without saying that the SQL discussions in the present book do abide by those recommendations, pretty much. As I’ve said before, I’m not trying to cover the whole of SQL here, I’m just trying to cover those aspects that are at least somewhat relational.

Restrict

Most of the time I plan to use the same examples in this chapter as I did in ...

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

Relational Theory for Computer Professionals

Relational Theory for Computer Professionals

C.J. Date
How to Develop a Great Digital Strategy

How to Develop a Great Digital Strategy

Jeanne W. Ross, Cynthia M. Beath, Ina M. Sebastian

Publisher Resources

ISBN: 9781449365431Errata Page