Relational calculus in a library

  • Thread starter AntoineCompagnie
  • Start date
  • Tags
    Calculus
In summary, the question is asking who has never returned a book late in the Congress library database using relational algebra and relational calculus. In relational algebra, we can use the division operation to find the people who have never returned a book late. In relational calculus, we can use the condition that their EffectiveReturnDate is on or before their ExpectedReturnDate. However, it is unclear if there is a division operation in relational calculus.
  • #1
AntoineCompagnie
12
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
  • #2
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?
 

1. What is Relational Calculus?

Relational Calculus is a formal query language used to retrieve data from a relational database management system. It is based on the mathematical concept of first-order logic and is used to specify and execute database queries.

2. How is Relational Calculus used in a library?

In a library, Relational Calculus can be used to query the library database for specific information such as book titles, authors, publication dates, and availability. This helps library staff and users to efficiently search for and retrieve the desired information.

3. What are the advantages of using Relational Calculus in a library?

Relational Calculus allows for precise and efficient querying of the library database. It also ensures data integrity and consistency, as it follows strict mathematical rules for querying and retrieving data. Additionally, it allows for complex queries to be expressed in a simple and readable format.

4. Are there any limitations of using Relational Calculus in a library?

One limitation of Relational Calculus is that it requires a good understanding of its syntax and mathematical foundations, which may be challenging for some library staff and users. It also may not be suitable for complex queries that require the use of advanced functions or algorithms.

5. Can Relational Calculus be used alongside other query languages in a library?

Yes, Relational Calculus can be used alongside other query languages, such as Structured Query Language (SQL), in a library. In fact, many database systems use a combination of both languages to optimize query performance and flexibility.

Similar threads

  • Set Theory, Logic, Probability, Statistics
Replies
6
Views
752
  • Programming and Computer Science
Replies
29
Views
5K
Replies
36
Views
4K
  • Set Theory, Logic, Probability, Statistics
Replies
7
Views
647
  • New Member Introductions
Replies
6
Views
212
Replies
2
Views
881
Replies
6
Views
1K
Replies
2
Views
1K
Replies
4
Views
2K
Back
Top