This document provides an overview of Query-by-Example (QBE) and Datalog, two relational query languages. It describes the basic structure and syntax of QBE and Datalog, how to write queries for single and multiple relations, use conditions, aggregate functions, and modifications. It also covers differences between standard QBE and Microsoft Access's implementation. QBE uses a graphical interface to write queries as examples, while Datalog is logic-based and allows recursive queries through rules that define views. The document explains formal syntax and semantics for Datalog programs.