Relational calculus in a library

  • Thread starter Thread starter AntoineCompagnie
  • Start date Start date
  • Tags Tags
    Calculus
AI Thread Summary
The discussion centers on identifying individuals who have never returned a book late in a library database using relational algebra and relational calculus. In relational algebra, one participant suggests using the division operation to find people who have borrowed books but not recorded any lateness, indicating uncertainty about the validity of this approach. Another participant clarifies that those who have never returned a book late are defined by their EffectiveReturnDate being on or before the ExpectedReturnDate. The conversation also touches on the challenges of expressing this condition in relational calculus, with a partial expression provided but lacking completion. Overall, the focus is on the correct application of relational operations to derive the desired results.
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 definately 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 definately don't know how to turn out that in relational calculus...

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

Have you any hint?
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
Thread 'Project Documentation'
Trying to package up a small bank account manager project that I have been tempering on for a while. One that is certainly worth something to me. Although I have created methods to whip up quick documents with all fields and properties. I would like something better to reference in order to express the mechanical functions. It is unclear to me about any standardized format for code documentation that exists. I have tried object orientated diagrams with shapes to try and express the...
Back
Top