Relational calculus in a library

  • Thread starter Thread starter AntoineCompagnie
  • Start date Start date
  • Tags Tags
    Calculus
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 replies · 989 views
AntoineCompagnie
Messages
12
Reaction score
0
Let's assume that the Congress library has a database with the
following pattern (the primary keys are in bold)
Borrowing(People, Book, DateBorrowing, ExpectedReturnDate,
EffectiveReturnDate) Lateness(People, Book, DateBorrowing,LatenessFee)
Who are those that have never return a book late in relational algebra? In relational calculus?

I think that in relational algebra, they are: $$\Pi_{People}(Borrowing)\div \Pi_{People}(Delayness)$$ But I'm not sure!

And I definitely don't know how to turn out that in relational calculus...

$$\{t.People|Delayness(t)\wedge\dots$$

Have you any hint?
 
on Phys.org
AntoineCompagnie said:
Let's assume that the Congress library has a database with the
following pattern (the primary keys are in bold)
Borrowing(People, Book, DateBorrowing, ExpectedReturnDate,
EffectiveReturnDate) Lateness(People, Book, DateBorrowing,LatenessFee)
Who are those that have never return a book late in relational algebra? In relational calculus?

I think that in relational algebra, they are: $$\Pi_{People}(Borrowing)\div \Pi_{People}(Delayness)$$ But I'm not sure!
I'm not sure there's a division operation in relational algebra or relational calculus (I don't know if there's a difference between these two areas).

In any case, the people who have never returned a book late are those people whose EffectiveReturnDate is on or before their ExpectedReturnDate.
AntoineCompagnie said:
And I definitely don't know how to turn out that in relational calculus...

$$\{t.People|Delayness(t)\wedge\dots$$

Have you any hint?