473,386 Members | 1,702 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,386 software developers and data experts.

relational algebra query

G'day

my question is

Hotel (hotelNo, hotelName, city)
Room (roomNo, hotelNo, type, price)

How u will
(a) List all hotels in Canberra that has at least one double room.


Projection ∏

Selection σ

Join
Aug 25 '05 #1
1 3747
G'day

my question is

Hotel (hotelNo, hotelName, city)
Room (roomNo, hotelNo, type, price)

How u will
(a) List all hotels in Canberra that has at least one double room.


Projection ∏

Selection σ

Join
----------------------------------
Hello !
Query is as follows :

select hotelNo, hotelName, type, price, city from hotel a, room b
where a.hotelNo = b.hotelNo
and city = 'Canberra'
and type in ('Double', 'Single')

Thanks
Dec 6 '05 #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. ...
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: lava4112 | last post by:
Have a test on SQL, only teacher wants to know what type of relational algebra is a select, where, from--I have no idea and can not understand the teacher. We are using Concepts of Database...
1
by: salman malik | last post by:
software for relational algebra.
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: 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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.