{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

336_Chapter4_B

# 336_Chapter4_B - Relational Calculus Chapter 4 Part B...

This preview shows pages 1–3. Sign up to view the full content.

Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 1 Relational Calculus Chapter 4, Part B Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 2 Relational Calculus Comes in two flavors: Tuple relational calculus (TRC) and Domain relational calculus (DRC). Calculus has variables, constants, comparison ops , logical connectives and quantifiers . TRC : Variables range over (i.e., get bound to) tuples . DRC : Variables range over domain elements (= field values). Both TRC and DRC are simple subsets of first-order logic. Expressions in the calculus are called formulas . An answer tuple is essentially an assignment of constants to variables that make the formula evaluate to true . Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 3 Domain Relational Calculus Query has the form: x x xn p x x xn 1 2 1 2 , ,..., | , ,..., Answer includes all tuples that make the formula be true . x x xn 1 2 , ,..., p x x xn 1 2 , ,..., Formula is recursively defined, starting with simple atomic formulas (getting tuples from relations or making comparisons of values), and building bigger and better formulas using the logical connectives .

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke 4 DRC Formulas Atomic formula: , or X op Y, or X op constant op is one of
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 4

336_Chapter4_B - Relational Calculus Chapter 4 Part B...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online