Path: text.usenetserver.com!out04a.usenetserver.com!news.usenetserver.com!in02.usenetserver.com!news.usenetserver.com!postnews.google.com!e25g2000prg.googlegroups.com!not-for-mail From: Tegiri Nenashi Newsgroups: comp.databases.theory Subject: Re: Character string relation and functional dependencies Date: Wed, 12 Dec 2007 09:37:21 -0800 (PST) Organization: http://groups.google.com Lines: 67 Message-ID: References: <13lgug1pkaflra6@corp.supernews.com> <10f55733-a741-4db7-95f8-eca69c7648f3@s19g2000prg.googlegroups.com> <38860a21-e69a-46a4-a798-cc16dde1c4a7@e10g2000prf.googlegroups.com> <7787577b-0476-4ab1-929c-62173efac5c4@s19g2000prg.googlegroups.com> NNTP-Posting-Host: 148.87.1.172 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1197481041 28992 127.0.0.1 (12 Dec 2007 17:37:21 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 12 Dec 2007 17:37:21 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e25g2000prg.googlegroups.com; posting-host=148.87.1.172; posting-account=PBsn8woAAADaWofLEAjNrE17YVrUmBlm User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe) Xref: usenetserver.com comp.databases.theory:168067 X-Received-Date: Wed, 12 Dec 2007 12:37:21 EST (text.usenetserver.com) On Dec 11, 1:47 pm, Tegiri Nenashi wrote: > On Dec 11, 1:27 pm, "V.J. Kumar" wrote: > > > > > > > Tegiri Nenashi wrote in news:38860a21-e69a- > > 46a4-a798-cc16dde1c...@e10g2000prf.googlegroups.com: > > > > On Dec 11, 12:37 pm, Tegiri Nenashi wrote: > > >> Well, in traditional databases index structures are auxiliary. > > >> Likewise, I would like to keep functions hidden. After all there is > > >> one relation > > > >> x + y = z > > > >> but there are three functions that can index it. > > > > Let me elaborate a little more. Suppose we are asked to evaluate the > > > query > > > > x + y = z /\ x=1 /\ z=4 > > > > there is no functions there. As usual optimizer engine starts > > > enumerating and costing every join permutation. It would find out that > > > the execution below has a finite cost: > > > > 1. Evaluate x=1 > > > 2. Evaluate z=4 > > > 3. Build a Cartesian product result > > > 4. Join with the relation x + y = z using the index (x,z)->z-x > > > What would your optimizer do in the following case: > > > x^2 + y^2 + z^2 =u^2 /\ u=25 > > Well how indexes are created in the off-the-shelf databases? DB > administrator creates them, even though the task is rather trivial. > (Remember, that long time ago DBMS were conceived to do it > automatically:-). The case of infinite relations is much more > challenging, therefore I expect a database programmer (or should I > better call him "relational programmer") to code the index function > *manually* and register each index with the corresponding relation.- Hide quoted text - The problem is, of course, identifiying the indexes. And it may be problematic whether more general problems fit into the system R optimization method. For example given a system of equations: x + y = 2 x - y = 0 the solution is (x+y=z) /\ (z=2) /\ (x=y) Assuming that we have 3 indexes on the first relation: x,y -> z x,z -> y y,z -> x and two indexes on the last one x -> y y -> x we still can't evaluate this query. BTW, how Kanellakis solves it?