In the module on logic, we encountered an example of declarative programming in SQL. You will recall that SQL is the most widely used language to interrogate databases.
There have been different models of building databases, but the model most widely used at the moment is the relational model, which was due to Edgar F. Cobb. In the relational model, a database is a set of relations in the sense in which we defined the term in this module, also called tables. You can find more details on the relational model at
http://en.wikipedia.org/wiki/Relational_model,
and the model will be discussed in much greater detail in the database course.
Database researchers have also created two formal languages for creating, interrogating and analyzing databases, namely relational calculus and relational algebra. You can find more details about relational algebra at
http://en.wikipedia.org/wiki/Relational_algebra
and about relational calculus at
http://en.wikipedia.org/wiki/Relational_calculus
You will see that relational calculus has two different flavors, namely tuple relational calculus (http://en.wikipedia.org/wiki/Tuple_relational_calculus) and domain relational calculus (http://en.wikipedia.org/wiki/Domain_relational_calculus).