Re: PostgreSQL - 'SKYLINE OF' clause added! - Mailing list pgsql-hackers

From David Fetter
Subject Re: PostgreSQL - 'SKYLINE OF' clause added!
Date
Msg-id 20070306162748.GB32266@fetter.org
Whole thread Raw
In response to Re: PostgreSQL - 'SKYLINE OF' clause added!  (Jim Nasby <decibel@decibel.org>)
List pgsql-hackers
On Mon, Mar 05, 2007 at 09:04:46PM -0600, Jim Nasby wrote:
> FWIW, this sounds like a subset of the Query By Example stuff that  
> someone is working on. I don't have a URL handy since I'm on a plane,  
> but I think google can find it.

It's now called ObelisQ <http://pgfoundry.org/projects/qbe>

Cheers,
D
> 
> On Mar 3, 2007, at 8:12 AM, ranbeer makin wrote:
> 
> >
> >Here is a description of what the SKYLINE operator is:
> >---
> >Suppose you wish to purchase books and you are looking for books  
> >with high rating and low price. However, both the criteria of  
> >selecting books are complementary since books of higher rating are  
> >generally more expensive. For finding such books, you'll query the  
> >database system of the book store which will return a set of  
> >interesting books. The word 'interesting' implies all the books  
> >which are as good or better in both the dimensions (rating and  
> >price) and better in at least one dimension. This set of  
> >interesting points forms the Skyline.
> >Skyline operator finds points which are not dominated by other data  
> >points. A point dominates another point if it is as good or better  
> >in all dimensions and better in at least one dimension.
> >
> >For specifying the Skyline queries, we extend SQL SELECT statement  
> >by an optional SKYLINE OF clause as given below:
> >
> >SELECT ... FROM ... WHERE...
> >
> >GROUP BY ... HAVING...
> >
> >SKYLINE OF [DISTINCT] d1 [MIN | MAX | DIFF],  .., dm [MIN | MAX |  
> >DIFF]
> >
> >ORDER BY...
> >
> >
> >Where, d1, d2 ,…, dm denote the dimensions of the Skyline, and MIN,  
> >MAX, DIFF specify whether the value in that dimension should be  
> >minimized, maximized, or simply be different. When DIFF is  
> >specified, two tuples are compared only if the value of the  
> >attribute on which DIFF is applied is different.
> >
> >When DISTINCT clause is specified and if there are two or more  
> >tuples with the same values of skyline attributes, then only one of  
> >them is retained in the skyline set. Otherwise, all of them are  
> >retained.
> >
> >Let's consider the above example of purchasing books with high  
> >rating and low price.
> >
> >
> >Book Name
> >
> >Rating (out of 5)
> >
> >Price (Rs)
> >
> >Prodigal Daughter
> >
> >3
> >
> >250
> >
> >The city of Joy
> >
> >5
> >
> >400
> >
> >Vanishing Acts
> >
> >2
> >
> >250
> >
> >The Notebook
> >
> >4
> >
> >300
> >
> >Fountain Head
> >
> >5
> >
> >350
> >
> >Dear John
> >
> >5
> >
> >500
> >
> >Table1. Sample of book database
> >
> >
> >Now, in order to get books with high rating and low price, you  
> >simply can issue the following query:
> >
> >SELECT *
> >
> >FROM Books
> >
> >SKYLINE OF rating MAX, price MIN;
> >
> >
> >The Skyline set returned will be:
> >
> >
> >Book Name
> >
> >Rating (out of 5)
> >
> >Price (Rs)
> >
> >Prodigal Daughter
> >
> >3
> >
> >250
> >
> >The Notebook
> >
> >4
> >
> >300
> >
> >Fountain Head
> >
> >5
> >
> >350
> >
> >Table2. Skyline set
> >
> >
> >From this set, you can now make your choice of books, by weighing  
> >your personal preferences for price and rating of the books.
> >
> >For more information, you can refer to:
> >S. Borzsonyi, D. Kossmann, and K. Stocker. The skyline operator. In  
> >ICDE, pages 421.430, 2001
> >
> >---
> >
> >Thanks.
> >
> >
> >
> >On 3/3/07, Martijn van Oosterhout <kleptog@svana.org> wrote: On  
> >Sat, Mar 03, 2007 at 07:02:41PM +0530, ranbeer makin wrote:
> >> We at International Institute of Information Technology (IIIT)  
> >Hyderabad,
> >> India, have extended the Postgres database
> >> system with the skyline operation. For this work, we were guided  
> >by our
> >> Prof. Kamalakar Karlapalem
> >> (http://www.iiit.ac.in/~kamal/).
> >
> ><snip>
> >
> >> Can this piece of work contribute to PostgreSQL? If yes, then  
> >we'll send out
> >> a detailed report of this project including changes
> >> made, issues involved/need to be solved, limitations, future  
> >work, and the
> >> source code etc.
> >
> >Well, that kind of depends. I have no idea what "Skyline" means so
> >telling us what it is would be a good start
> >
> >Have a nice day,
> >--
> >Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/ 
> >kleptog/
> >> From each according to his ability. To each according to his  
> >ability to litigate.
> >
> >-----BEGIN PGP SIGNATURE-----
> >Version: GnuPG v1.4.1 (GNU/Linux)
> >
> >iD8DBQFF6XrkIB7bNG8LQkwRAqw8AJ0UKAy41OMxdgLUdY1G+e7R6/jGPwCZAQY4
> >9uCKFUW65UBIx7fpogR75Yo=
> >=6Yc0
> >-----END PGP SIGNATURE-----
> >
> >
> 
> --
> Jim Nasby                                            jim@nasby.net
> EnterpriseDB      http://enterprisedb.com      512.569.9461 (cell)
> 
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
>       subscribe-nomail command to majordomo@postgresql.org so that your
>       message can get through to the mailing list cleanly

-- 
David Fetter <david@fetter.org> http://fetter.org/
phone: +1 415 235 3778        AIM: dfetter666                             Skype: davidfetter

Remember to vote!
Consider donating to PostgreSQL: http://www.postgresql.org/about/donate


pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: GIST and TOAST
Next
From: Gregory Stark
Date:
Subject: Re: GIST and TOAST