You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by Daniel Rall <dl...@finemaltcoding.com> on 2001/06/06 19:40:29 UTC
Re: Design questions for new query model
Eric, if there isn't already one, would you mind starting a new xdoc
document which captures the requirements for the new query model? I'm
afraid that otherwise we're going to end up rehashing a lot of this
again (I don't want to lose this great discussion).
To add, take an existing xdoc from the proposal directory and use it
as a template in which to insert all this great content. Commit it to
the xdocs/proposals/ directory. Then, add it to the list of proposals
defined by xdocs/proposals.xml.
Daniel
Eric Dobbs <er...@dobbse.net> writes:
> I forgot a couple other important SQL forms... adding them to the
> list below. I assume we will also want to be able to construct
> these.
>
> With this list of SQL statements that we want to support, we will
> diverge somewhat from the original goal of cross-platform SQL.
> Not all databases support stored procedures, or outer joins, or
> sub-queries (but you knew that already 8^). Within core pieces
> of Turbine, we can restrict ourselves to the statements that are
> cross-platform while still offering users of Turbine an api that
> can take advantage of the more advanced options of their specific
> database. Any discussion?
>
> -Eric
>
> On Monday, May 28, 2001, at 11:16 AM, Eric Dobbs wrote:
>
> > Taking a moment to question design goals for the new query model.
> > As long as we're talking about redesigning from the ground up...
> > Which of the following example sql statements would you like to
> > be able to construct with the new query model?
> >
> > -Eric
> >
> > 1. simple selects
> > select * from some_table
> > where some_id = n;
> >
> > 2. multi-table joins
> > select table1.name,table2.type_name
> > from table1,
> > table2,
> > table3
> > where table1.description like '%foo%'
> > and table1.one_id=table3.one_id
> > and table2.two_id=table3.two_id
> >
> > 3. compound where clauses
> > select table1.name
> > from table1
> > where (table1.age>21 and table1.age<35)
> > or (table1.age>50 and table1.age<65)
> >
> > 4. functions
> > select sum(table1.amount) as sum
> > from table1
> > where table1.amount<5000
> >
> > 5. group by ... having
> > select type, sum(price)
> > from titles
> > where price <= 5
> > group by type
> > having sum(price) > 50
> >
> > 6. sub-queries
> > select table1.title)
> > from table1
> > where table1.price =
> > (
> > select min(table1.price)
> > from table1
> > )
> >
> > select distinct pub_name
> > from publishers
> > where pub_id not in
> > (
> > select pub_id
> > from titles
> > where type='business'
> > )
> >
> > 7. transactions
> > begin
> > <statement1>
> > <statement2>
> > <statement3>
> > commit
>
> 8. union, intersect, except (minus)
> <statement1>
> union
> <statement2>
>
> 9. outer joins
> (mysql syntax)
> select user.name,preference.name
> from user left join preference
> where user.user_id = preference.user_id
>
> (postgresql and sql'92 syntax)
> select user.name, preference.name
> from user left join preference on user.user_id = preference.user_id
>
> (oracle syntax)
> select user.name,preference.name
> from user, preference
> where user.user_id = preference.user_id (+)
>
> 10. stored procedures and functions
> execute foo('bar','baz','biz')
>
> select table.type, foo(table.column)
> from table
> group by table.type
>
> 11. prepared statements
> (Any of the above, replacing literal values with ? place-holders.
> This also calls for some means of passing in the parameters to a
> prepared statement)
> select user.name
> from user
> where userid = ?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-dev-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org
Re: Design questions for new query model
Posted by Daniel Rall <dl...@finemaltcoding.com>.
Eric Dobbs <er...@dobbse.net> writes:
> On Wednesday, June 6, 2001, at 11:40 AM, Daniel Rall wrote:
>
> > Eric, if there isn't already one, would you mind starting a new xdoc
> > document which captures the requirements for the new query model?
>
> done.
Great, thanks Eric!
Dan
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org
Re: Design questions for new query model
Posted by Eric Dobbs <er...@dobbse.net>.
On Wednesday, June 6, 2001, at 11:40 AM, Daniel Rall wrote:
> Eric, if there isn't already one, would you mind starting a new xdoc
> document which captures the requirements for the new query model?
done.
---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org