473,385 Members | 1,400 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,385 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 1010
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...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.