Relational Query Languages

  • Query languages: Allow manipulation and retrieval of data from a database
  • Types
    • SQL
      • A declarative language because you write what you want instead of how to get it
    • Relational Algebra
      • Mathematical expression (procedural)
      • Useful for representing execution plans
    • Relational Calculus
      • Declarative mathematics
      • Not covered
  • A query is applied to relation instances and the result of a query is also a relation instance
    • Schemas of input and output relations for a query are determined by query
  • Since each operation returns a relation, operations can be composed (the algebra is closed)