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

Database theory question: safe query

Hi all,

Excuse me if this is not the right place to ask this .., but it's the
closest I could find.

I am reading Ramakrishnan and Gehrke "Database Management Systems". In
their errata for the second edition at
http://www.cs.wisc.edu/~dbbook/openA...errata1st.html
it says

'Page 111, Q9: The tuple relational calculus expression for Q9 is
unsafe if "Boats" is empty. A corrected version of the query is the
following expression: { P | there exists S in Sailors (P.sname =
S.sname and for all R in Reserves (S.sid = R.sid and R.bid = B.bid))
}'

I have two questions about this:

1) why is the query (in the book) not safe if Boats is empty ?

2) How does the corrected query answer the task : 'Find the names of
sailors who have reserved all boats'? What if nobody reserved some
boat -- his/her name will still be selected in the corrected query ?!?

I would appreciate very much if somebody could shed some light on
this.

Regards,

Janis
Nov 11 '05 #1
0 1340

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Markus Seibold | last post by:
Dear NG, I am working on a student project about a mobile tourism information system and among others I have to answer the question whether to use: - a relational database - a XML-native database...
19
by: nospammmer | last post by:
Hello group, I have a rather general but interesting inquiry that is related to PHP and I hope this is the appropriate place to post it. I'm looking for a way to improve dramatically the...
29
by: MP | last post by:
Greets, context: vb6/ado/.mdb/jet 4.0 (no access)/sql beginning learner, first database, planning stages (I think the underlying question here is whether to normalize or not to normalize this...
6
by: JackM | last post by:
I have a multiple select input in a form that's being populated by a row from my database as such: <input type=\"checkbox\" name=\"subm\" value=\"$row\"> That part is working fine as I can check...
12
by: grace | last post by:
i am wondering why my database retrieval becomes too slow...we set up a new server (ubuntu, breezy badger) machine where we transferred all our files from the old server.. Our new server uses Asus...
3
by: Paul | last post by:
Hi all, I have posted a question in the Database design and theory ng, but I expect a lot of you will have suggestions to help me (and that ng doesn't seem very active). The post is here: ...
7
by: erikcw | last post by:
Hi, I'm working on a web application where each user will be creating several "projects" in there account, each with 1,000-50,000 objects. Each object will consist of a unique name, an id, and...
10
by: Les Desser | last post by:
In article <fcebdacd-2bd8-4d07-93a8-8b69d3452f3e@s50g2000hsb.googlegroups.com>, The Frog <Mr.Frog.to.you@googlemail.comMon, 14 Apr 2008 00:45:10 writes Thank you for that. It was very...
10
by: teddysnips | last post by:
My clients have asked me to maintain a database that was developed in- house. It's pretty good, considering the developer isn't a "programmer". The first thing they want me to do is to split it...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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

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.