Finish Datalog - SQL as a Query Language




CS157a

Chris Pollett

Oct 30, 2023

Outline

Introduction

Extensional and Intensional Predicates

Datalog Applied to Bags

Relational Algebra and Datalog

Quiz

Which of the following is true?

  1. Entity sets in the E/R model most closely map to structs in the ODL model.
  2. A projection applied to a set of unique rows in the bag model is the same as that projection applied to the same rows in the set model.
  3. Our extended relational algebra supported sorting tuples of a relation by some attribute.

SQL as a Query Language

Simple Queries in SQL

Projections and More on Selection

Strings and Pattern Matching in SQL

Dates, Times

NULL, UNKNOWN in SQL

Ordering Output in SQL