Relational calculus in a library

  • Thread starter Thread starter AntoineCompagnie
  • Start date Start date
  • Tags Tags
    Calculus
Click For Summary
SUMMARY

The discussion focuses on identifying individuals who have never returned a book late at the Congress Library using relational algebra and relational calculus. The proposed relational algebra expression is $$\Pi_{People}(Borrowing) \div \Pi_{People}(Lateness)$$, although the validity of the division operation in this context is questioned. Additionally, it is established that individuals with an EffectiveReturnDate on or before their ExpectedReturnDate have not returned books late. The challenge remains in translating this logic into relational calculus.

PREREQUISITES
  • Understanding of relational algebra operations, specifically projection and division.
  • Familiarity with relational calculus syntax and semantics.
  • Knowledge of database schema design, particularly regarding borrowing and lateness records.
  • Experience with logical expressions in database queries.
NEXT STEPS
  • Research the implementation of division operations in relational algebra.
  • Learn how to express conditions in relational calculus, focusing on set comprehension.
  • Explore the differences between relational algebra and relational calculus.
  • Study the implications of EffectiveReturnDate and ExpectedReturnDate in database queries.
USEFUL FOR

Database students, data analysts, and software developers interested in advanced query techniques and the theoretical foundations of database management systems.

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?
 
Technology news 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?
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
5K
Replies
15
Views
42K
  • · Replies 2 ·
Replies
2
Views
554
  • · Replies 14 ·
Replies
14
Views
7K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 39 ·
2
Replies
39
Views
7K