×
Keep asking yourself. "How bad do you want it? how bad?"
--Your friends at LectureNotes
Close

Note for Database Management System - DBMS By Saleth Shanthi S

  • Database Management System - DBMS
  • Note
  • 31 Views
  • Uploaded 2 months ago
0 User(s)
Download PDFOrder Printed Copy

Share it with your friends

Leave your Comments

Text from page-1

Relational Algebra & Calculus Chapter 4, Part A (Relational Algebra) 1

Text from page-2

Relational Query Languages Query languages: Allow manipulation and retrieval of data from a database. ❖ Relational model supports simple, powerful QLs: ❖ ▪ ▪ ❖ Strong formal foundation based on logic. Allows for much optimization. Query Languages != programming languages! ▪ ▪ ▪ QLs not expected to be “Turing complete”. QLs not intended to be used for complex calculations. QLs support easy, efficient access to large data sets. 2

Text from page-3

Formal Relational Query Languages ❖ Two mathematical Query Languages form the basis for “real” languages (e.g. SQL), and for implementation: ▪ Relational Algebra: More operational (procedural), very useful for representing execution plans. ▪ Relational Calculus: Lets users describe what they want, rather than how to compute it: Non-operational, declarative. 3

Text from page-4

Preliminaries ❖ A query is applied to relation instances, and the result of a query is also a relation instance. ▪ ▪ ❖ Schemas of input relations for a query are fixed. The schema for the result of a given query is also fixed! - determined by definition of query language constructs. Positional vs. named-field notation: ▪ ▪ Positional notation easier for formal definitions, named-field notation more readable. Both used in SQL 4

Lecture Notes