Relational Query Languages
A query language is a language in which a user requests information from the database. These languages are usually on a level higher than that of a standard programming language.Query languages can be categorized as either procedural or non procedural. In a procedural language, the user instructs the system to perform a sequence of operations on the database to compute the desired result. In a non procedural language, the user describes the desired information without giving a specific procedure for obtaining that information.
Query languages used in practice include elements of both the procedural and the nonprocedural approaches.
There are a number of “pure” query languages: The relational algebra is procedural, whereas the tuple relational calculus and domain relational calculus are nonprocedural.These query languages are terse and formal,lacking the "syntactic sugar” of commercial languages, but they illustrate the fundamental techniques for extracting data from the database. In later sections, we examine in detail the relational algebra and the two versions of the relational calculus, the tuple relational calculus and domain relational calculus. The relational algebra consists of a set of operations that take one or two relations as input and produce a new relation as their result. The relational calculus uses predicate logic to define the result desired without giving any specific algebraic procedure for obtaining that result.