Basic Discrete
Mathematics Objects (Continued)
Sequence
Definitions and Notations
Definition: Sequence
A sequence is a function from a subset of the set of
int...
Advanced Queries
DISTINCT
To obtain a valid relation, we must ensure that there are no
duplicate identifiers in the result set. For example, the naive query
below 1SELECT country FROM movies WH...
Divide-and-Conquer
Introduction
Problem: Find a number
in a sorted array
Consider the problem that we need to find whether a specific number
is in a sorted array. A naive approach is searching...
Retrieving Data from a Table
SELECT
To display the full content of a table, we can use 1SELECT * FROM table_name But
this should not be used in a program, this is because:
If our program depe...
Basic Discrete Mathematics
Objects
Sets
Introduction to Sets
Definition: Sets
A set is an unordered collection of objects. These objects
are called elements or...
Introduction to SQL
To manage data in a database, a full-blown language will introduce
too much complexity to both users and database systems. What we need is
a special DSL that specializes in d...
Basic Ideas in Probability
Basic Concepts
Definition: Random Experiment
A random experiment, often simply called an
experiment, represents the realization or obs...
Runtime and Asymptotic
Notation
In the previous lecture, we showed a naive way to analyze the runtime
of algorithms. But this naive approach is very heavy and can be
particularly troublesome wh...
Lecture 1
Introduction to Databases
A modern database system is a complex software
system whose task is to manage a large, complex collection of data.
The central idea was to have one system do...
Getting Started
Definition: Algorithm
An algorithm is a well-defined computational procedure that
takes some input and produces some output.
This means...