relational-algebra

Difference between a theta join, equijoin and natural join

北城余情 提交于 2019-11-26 12:36:11
问题 I\'m having trouble understanding relational algebra when it comes to theta joins, equijoins and natural joins. Could someone please help me better understand it? If I use the = sign on a theta join is it exactly the same as just using a natural join? 回答1: A theta join allows for arbitrary comparison relationships (such as ≥). An equijoin is a theta join using the equality operator. A natural join is an equijoin on attributes that have the same name in each relationship. Additionally, a

What is a self join for? (in english)

孤人 提交于 2019-11-26 07:49:58
问题 I already know what a self-join does. Thank you, I also read all the other computerised operational descriptions on stack overflow, so I know this is not actually a duplicate question, so please do not give me tables or join lists. What I am seeking to why it would be done (and please, not just the self-referencing employee-manager example ). In plain English, what would I seek to achieve from a self join? My usage is in a university course, and coming from a Relational Algebra angle. I have

How can I find MAX with relational algebra?

巧了我就是萌 提交于 2019-11-26 07:21:31
问题 Working with databases, how can I find MAX using relational algebra? 回答1: Assuming you have a relation, A, with a single attribute, 'a' (reducing a more complex relation to this is a simple task in relational algebra, I'm sure you got this far), so now you want to find the maximum value in A. One way to do it is to find the cross product of A with itself, be sure to rename 'a' so your new relation has attributes with distinct names. for example: (rename 'a' as 'a1') X (rename 'a' as 'a2') now

Relational algebra for banking scenario [closed]

℡╲_俬逩灬. 提交于 2019-11-25 23:15:38
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I have a situation where I am nowhere. I don\'t know how to solve the relational algebra questions. Deposit (Branch, Acc-No, Cust-Name, Balance) Loan (Branch, Loan-No, Cust-Name, Balance) Branch (Branch, Assets, Branch-County) Customer (Cust-Name, Cust-County, Branch) Produce a relation that shows the branch,