473,326 Members | 2,655 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Help with Relational Algebra

Hello Guys...
thanks in advance jst wondering if any1 knows answer to this....
if this is the SQL query

Author(name, hometown, publisher)
Textbook(tname, aname, price)
select A.name, publisher from Author A, Textbook T
where T.aname = A.name and not exists (select * from Textbook S
where S. price > T.price);


What would be an efficient relational algebra????? so that there are minimal tuples to be processed...
Oct 12 '06 #1
1 1006
MMcCarthy
14,534 Expert Mod 8TB
Author(name, hometown, publisher)
Textbook(tname, aname, price)

SELECT A.name, A.publisher
FROM Author A INNER JOIN Textbook T
ON A.name=T.aname
WHERE T.aname not exists (select S.aname from Textbook S
where S.price > T.price);

This would be your query but it doesn't make sense, you're taking price from the same table both times. What are you trying to do?
Oct 16 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: | last post by:
I need to write a relational algebra query for the following: Show the item_ID, item description and category description for all items where the supplier uses "rail" as the delivery_method. ...
4
by: jimh | last post by:
I'm not a SQL expert. I want to be able to write a stored procedure that will return 'people who bought this product also bought this...'. I have a user table that links to a transaction table...
2
by: trippedwire | last post by:
i have entity sets account(account-number, balance) branch(branch-name, branch-city, assets) customer(customer-name, customer-street, customer-city) loan(loan-number, amount) and relationship...
0
by: Vishy8015 | last post by:
Use Relational Algebra to express the following queries on the schema FLIGHTS (DepartureCity, ArrivalCity). A pair of cities a, b is in an instance of relation FLIGHTS if there is a direct flight...
0
by: scorpiomailin | last post by:
Hello Guys... thanks in advance jst wondering if any1 knows answer to this.... if this is the SQL query Author(name, hometown, publisher) Textbook(tname, aname, price) select A.name, publisher...
1
by: salman malik | last post by:
software for relational algebra.
2
by: micangello | last post by:
i need ideas on what my final year project can be about i have studied 2 years of pure math (advanced calculus and algebra, topology, statistics..... ) i then switched ot computer science now...
2
by: aiom | last post by:
following are the given set of relations : STUDENT(SSN,Name,Major,Bdate) COURSE(Course#,CName,Dept) EnrollCourse#,Quarter,Grade) BOOK_ADOPTION(Course#,Quarter,Book_ISBN)...
1
by: muniba | last post by:
Relational algebric expression for the following: Draw two relational algebra query trees for the following query and show that one query tree is more eficient than the other. "Give the number...
3
Metallicat
by: Metallicat | last post by:
I have been posed and attempted to answer several questions but I do not seem to be getting anywhere. I have emailed my tutor a week ago and he has not responded, If anyone can take a look and help...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.