From: Sam V. <sa...@vi...> - 2004-11-30 04:28:06
|
Hi all, Simon Cozens is including a chapter on POOP in _Advanced Programming Perl, 2nd edition_, an O'Reilly book. As he is busy with a new direction in his life, I have agreed to co-ordinate gathering material and code for possible inclusion in the chapter from authors and users of POOP frameworks. The challenge is: Implement classes to drive this schema (minimally remodelling as you feel appropriate): http://www.class-dbi.com/cgi-bin/wiki/index.cgi?ERD And produce a test script to do the following things: 1. create a new database object of each type in the schema 2. print IDs of the objects inserted 3. fetch a record by ID 4. fetch an artist record by name (exact match) 5. fetch an artist record with a search term (globbing / LIKE / etc) 6. fetch CD records by matching on a partial *artist's* name, using a cursor if possible. 7. fetch unique CD records by matching on a partial artist's *or* partial CD name, using a cursor if possible. 8. update a record or two 9. delete some records And a couple of maintenance scripts: 1. re-org the database (clean up IDs and/or garbage collect) - may load entire database into core and write result to a second database if required. May make arbitrary decisions about what constitutes the sane starting points, for example leaving behind artists with no CDs. 2. migrate the database to a second version of the schema, that supports two types of CDs - multi-artist and single artist, allowing artist associations on each track or a single artist per CD. again, may do a complete load and write result to a second database if required. Ideally the test script should still work after migrating to the new version of the schema, but if not, submit a modified script. If you feel there is some other important data management task or use case that your framework performs well or enables gracefully, that I have overlooked, then discuss it NOW (do NOT continue to cross-post; use the poop-group list!) so that we can add it to the list as early as possible. Entries must be released under the Open Publication License (if necessary, in addition to any other license). You may use the following licence text: Copyright 2004, Alan B'Stard. All rights reserved. This code is free software; you may use it and/or redistribute it under the same ; terms as Perl itself, or under the terms of the Open Documentation License, available at http://www.opencontent.org/openpub/ Please feel free to post the entries to the most relevant SINGLE mailing list (in case it is still not clear DO NOT CROSS-POST HUGE AMOUNTS OF CODE OR DISCUSSION OR YOU WILL BE PUBLICLY HUMILIATED!). I will be collecting the entries and getting them to work on a test server. Those keen are welcome to login accounts on that server that will have access to test instances of mysql/MyISAM & InnoDB, and Pg; other databases will be made available according to interest and people to set them up. Please advise me if you are posting to a list not in the To: or Cc: of this message. Solving all problems will greatly enhance the reader's experience. While the material isn't just being copied straight into the book, it is excellent worked research. All code submitted by the publication deadline will be available via the oreilly.com page for the book. Unfortunately deadlines are tight so get your entries in as soon as possible! The results will probably go up on the poop.sourceforge.net site as well (Dave?), so late submissions are better than never - though they won't end up entombed in the history of the book ;). Simon has already started the entry for Class::DBI, although I'd appreciate it if someone with a bit more CDBI experience than myself could spare some time to work on the remaining scripts or review my solutions. I will be happy to work on the entry for Tangram, though I'd like to hear something from you folk @state51 as you've dealt quite a bit in this problem space ;-). Maybe you could provide us with a nice large-ish sample subset of your record database that I can munge into shape and put on the public server ? Pixie and Class::Persist are getting entries whether they like it or not, but I couldn't find a mailing list for you Fotango folk. I'd also appreciate it if someone with Pixie experience could provide an elegant solution to the indexing and text search problems so their entries can be complete. I'm also very keen to get submissions from Alzabo and SPOPS/ESPOPS experts. -- Sam Vilain, sam /\T vilain |><>T net, PGP key ID: 0x05B52F13 (include my PGP key ID in personal replies to avoid spam filtering) |
From: Ray Z. <rz...@co...> - 2004-12-03 23:12:55
|
Just curious ... Chris, are you submitting something for this? Ray On Nov 29, 2004, at 11:27 PM, Sam Vilain wrote: > Simon Cozens is including a chapter on POOP in _Advanced Programming > Perl, 2nd edition_, an O'Reilly book. > > As he is busy with a new direction in his life, I have agreed to > co-ordinate gathering material and code for possible inclusion in the > chapter from authors and users of POOP frameworks. <snip> > I'm also very keen to get submissions from Alzabo and SPOPS/ESPOPS > experts. |
From: Chris W. <ch...@cw...> - 2004-12-07 14:18:53
|
> On Nov 29, 2004, at 11:27 PM, Sam Vilain wrote: >> Simon Cozens is including a chapter on POOP in _Advanced Programming >> Perl, 2nd edition_, an O'Reilly book. >> >> As he is busy with a new direction in his life, I have agreed to >> co-ordinate gathering material and code for possible inclusion in the >> chapter from authors and users of POOP frameworks. > ... > Just curious ... Chris, are you submitting something for this? I am. I'm not going as fast as I'd like though (recent surge for OpenInteract coding + daily job have left my hands sore, even with my magic keyboard). If anyone's interested you can get the code with: $ cvs -d ':pserver:ano...@cw...:/opt/cvsdocs' login (use 'oi' as password) $ cvs -d ':pserver:ano...@cw...:/opt/cvsdocs' co persistathon Since the data structures are SPOPSx::Ginsu-friendly (I think) it would be interesting to see how you'd approach this, and if you were thinking of creating an implementation I'd highly encourage it. If nothing else it would give us a good sample base to test out new relationship functionality :-) Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
From: Ray Z. <rz...@co...> - 2004-12-07 19:56:51
|
On Dec 7, 2004, at 9:23 AM, Chris Winters wrote: > $ cvs -d ':pserver:ano...@cw...:/opt/cvsdocs' co > persistathon OK, I grabbed it, but I can't seem to get past step 0 ... I'm using mysql and have edited db.perl accordingly. % perl create_tables.pl DBD::mysql::st execute failed: Table 'persistathon.cd' doesn't exist at /usr/local/perl-5.8.2/lib/site_perl/5.8.2/SPOPS/Tool/DBI/ DiscoverField.pm line 36. Can't set DBI::st=HASH(0x93150c)->{NAME}: unrecognised attribute or invalid value at /usr/local/perl-5.8.2/lib/site_perl/5.8.2/SPOPS/Tool/DBI/ DiscoverField.pm line 42. Can't use an undefined value as an ARRAY reference at /usr/local/perl-5.8.2/lib/site_perl/5.8.2/SPOPS/Tool/DBI/ DiscoverField.pm line 43. Ray Zimmerman Director, Laboratory for Experimental Economics and Decision Research 428-B Phillips Hall, Cornell University, Ithaca, NY 14853 phone: (607) 255-9645 |
From: Chris W. <ch...@cw...> - 2004-12-07 21:04:44
|
> On Dec 7, 2004, at 9:23 AM, Chris Winters wrote: >> $ cvs -d ':pserver:ano...@cw...:/opt/cvsdocs' co >> persistathon > > OK, I grabbed it, but I can't seem to get past step 0 ... > > I'm using mysql and have edited db.perl accordingly. > > % perl create_tables.pl > DBD::mysql::st execute failed: Table 'persistathon.cd' doesn't exist at > /usr/local/perl-5.8.2/lib/site_perl/5.8.2/SPOPS/Tool/DBI/ > DiscoverField.pm line 36. > ... Did I mention it's still ongoing? :-) > Can't set DBI::st=HASH(0x93150c)->{NAME}: unrecognised attribute or > invalid value at > /usr/local/perl-5.8.2/lib/site_perl/5.8.2/SPOPS/Tool/DBI/ > DiscoverField.pm line 42. > Can't use an undefined value as an ARRAY reference at > /usr/local/perl-5.8.2/lib/site_perl/5.8.2/SPOPS/Tool/DBI/ > DiscoverField.pm line 43. That's a weird error tho. I'll have to try with mysql tonight. What version are you using? Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
From: Ray Z. <rz...@co...> - 2004-12-07 21:19:19
|
On Dec 7, 2004, at 4:09 PM, Chris Winters wrote: > Did I mention it's still ongoing? :-) Well, yes ... you did ... I just thought maybe I was doing something wrong. > That's a weird error tho. I'll have to try with mysql tonight. What > version are you using? mysql-4.1.7 on Panther Ray |
From: Chris W. <ch...@cw...> - 2004-12-07 21:55:00
|
> On Dec 7, 2004, at 4:09 PM, Chris Winters wrote: >> Did I mention it's still ongoing? :-) > > Well, yes ... you did ... I just thought maybe I was doing something > wrong. What I meant to say: "I've only tested this with Postgres so far." >> That's a weird error tho. I'll have to try with mysql tonight. What >> version are you using? > > mysql-4.1.7 on Panther That's probably the same version I have. I probably just forgot something dumb. I'll try it out. C -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |
From: Chris W. <ch...@cw...> - 2004-12-07 22:17:17
|
> On Dec 7, 2004, at 4:09 PM, Chris Winters wrote: >> Did I mention it's still ongoing? :-) > > Well, yes ... you did ... I just thought maybe I was doing something > wrong. > >> That's a weird error tho. I'll have to try with mysql tonight. What >> version are you using? > > mysql-4.1.7 on Panther This isn't a mysql thing, it's a stupid Chris thing. Sorry about that. Fix is in CVS. I'll try out the other mysql stuff now too... Chris -- Chris Winters (ch...@cw...) Building enterprise-capable snack solutions since 1988. |