Re: Improve reduce functions of SQLite3 request

2013-02-08 Thread Steffen Mutter
Dennis Lee Bieber wrote: > If you use separate tables you make it more difficult to generate > the SQL (as you have to create the SQL with the season specific table > name, instead of just using a "where " clause to restrict data), and > lose the potential to produce reports covering mul

Re: Improve reduce functions of SQLite3 request

2013-02-07 Thread Steffen Mutter
Dennis Lee Bieber wrote: > On Thu, 7 Feb 2013 11:33:00 + (UTC), Steffen Mutter > declaimed the following in > gmane.comp.python.general: >> CREATE TABLE "Runde20122013" ( > > Is that table name specifying a playing season? Yes. > What happens next > season -- you create a new table an

Re: Improve reduce functions of SQLite3 request

2013-02-07 Thread Steffen Mutter
Hi Dennis, I really appreciate your input :-) Dennis Lee Bieber wrote: > I'll confess that I've not looked at any such sites -- mainly > because I wouldn't understand enough about the sport to understand why > one would do something one way or another. You better do not. The first one I h

Re: Improve reduce functions of SQLite3 request

2013-02-06 Thread Steffen Mutter
Hi Dennis, Dennis Lee Bieber wrote: > If this is meant to be a web-based system, you probably should be > looking into using some sort of framework: Django, Zope/Plone, etc. I tried both frameworks but I always see, that these frameworks improve the progress to get things done but also lim

Re: Improve reduce functions of SQLite3 request

2013-02-06 Thread Steffen Mutter
Dennis Lee Bieber wrote: > Which does, to me, imply an unnormalized database. The > "team/category" should be a separate field. > club(*ID*, name) > > team(*ID*, /club/, category) > > {where *..* is primary key, /../ is a foreign key} You are right, but as I mentioned above I had to use so

Re: Improve reduce functions of SQLite3 request

2013-02-04 Thread Steffen Mutter
Dennis Lee Bieber wrote: > I suspect you have a poorly normalized database (what does that > trailing number identify? Heck, are the leading initials unique to the > subsequent name?). The trailing number should probably be something > stored as a separate field. If the initials are unique,

Re: Improve reduce functions of SQLite3 request

2013-02-04 Thread Peter Otten
Steffen Mutter wrote: > Dennis Lee Bieber wrote: >> Untested: >> >> SELECT DISTINCT * from >> (select homenr as nr, home as club FROM Runde20122013 >> WHERE place="karlsruhe" >> UNION SELECT guestnr as nr, guest as club FROM 20122013 >> WHERE place="karlsruhe") >> limit 10 > > Hi Dennis, > > her

Re: Improve reduce functions of SQLite3 request

2013-02-04 Thread Dave Angel
On 02/04/2013 09:30 AM, Steffen Mutter wrote: 359|TV Calmbach 21101|SG Heidel/Helm 21236|JSG Neuth/Büch 23108|TG Eggenstein 23108|TGEggenstein 2 <- 23109|TV Ettlingenw 23109|TV Ettlingenw 2 <- 23112|TSV Jöhlingen 23112|TSV Jöhlingen 2 <- 23112|TSV Jöhlingen 3 <- Still not like what I'm looking

Re: Improve reduce functions of SQLite3 request

2013-02-04 Thread Steffen Mutter
Dennis Lee Bieber wrote: > Untested: > > SELECT DISTINCT * from > (select homenr as nr, home as club FROM Runde20122013 > WHERE place="karlsruhe" > UNION SELECT guestnr as nr, guest as club FROM 20122013 > WHERE place="karlsruhe") > l

Improve reduce functions of SQLite3 request

2013-02-03 Thread Steffen Mutter
Hi, I am writing some code to manage handball leagues more easy. Problem: MISSON: Get single club ids glued together with the shortest teamname. EXAMPLE: SELECT homenr as nr, home as club FROM Runde20122013 WHERE place="karlsruhe" UNION SELECT guestnr as nr, guest as club FROM 20122013 WHERE pl