Questions from Database Systems


Q: Suppose you have an update query U. Give a simple sufficient

Suppose you have an update query U. Give a simple sufficient condition on U that will ensure that the Halloween problem cannot occur, regardless of the execution plan chosen or the indices that exist.

See Answer

Q: Show how to derive the following equivalences by a sequence of transformations

Show how to derive the following equivalences by a sequence of transformations using the equivalence rules in Section 16.2.1. a. σθ1 ∧θ2 ∧θ3 (E) ≡ σθ1 (σθ2 (σθ3 (E))) b. σ θ ∧θ (E1 ⋈θ E2) ≡ σ θ (...

See Answer

Q: Consider the following proposed rule for functional dependencies: If α →

Consider the following proposed rule for functional dependencies: If α → β and γ → β, then α → γ. Prove that this rule is not sound by showing a relation r that satisfies α → β and γ → β, but does not...

See Answer

Q: Discuss the relative merits of imperative, functional, and declarative languages

Discuss the relative merits of imperative, functional, and declarative languages.

See Answer

Q: Consider the two expressions σ θ (E1 ⟕ E2) and

Consider the two expressions σ θ (E1 ⟕ E2) and σ θ (E1 ⋈ E2). a. Show using an example that the two expressions are not equivalent in general. Give a simple condition on the predicate θ, which if sati...

See Answer

Q: A set of equivalence rules is said to be complete if,

A set of equivalence rules is said to be complete if, whenever two expressions are equivalent, one can be derived from the other by a sequence of uses of the 16.2.1 complete? Hint: Consider the equiva...

See Answer

Q: 16.20 Explain how to use a histogram to estimate

16.20 Explain how to use a histogram to estimate the size of a selection of the form σ a ≤v(r).

See Answer

Q: Suppose two relations r and shave histograms on attributes r. A

Suppose two relations r and shave histograms on attributes r. A and s. A, respectively, but with different ranges. Suggest how to use the histograms to estimate the size of r ⋈ s. Hint: Split the range...

See Answer

Q: Consider the query / Show how to decor relate this

Consider the query Show how to decor relate this query using the multistep version of the semi join operation.

See Answer

Q: Describe how to incrementally maintain the results of the following operations on

Describe how to incrementally maintain the results of the following operations on both insertions and deletions: a. Union and set difference. b. Left outer join.

See Answer