Creating a database schema means creating an interface for applications to use to manage their data. But how do you know how well that interface works until you’ve tried it?
Well, by trying it before you create it.
This talk introduces the concept of test-driven development to database administrators. We’ll use pgTAP to work through a real-world example creating a database design with an intuitive, useful interface for managing application data. Derive more intuitive table structures! Keep an eye to the beauty of your views! Let your procedures make your application more productive! Feel younger and more clever, all through the power of TDDD!
NOTE: Instructions for this tutorial may be found here.
David E. Wheeler is President of Portland-based Kineticode and Co-Founder of PostgreSQL Experts. David also maintainers and leads development of Bricolage, a content management and publishing system powered by Perl and PostgreSQL. For his next trick, he may or may not build a Python or Lisp or BASIC-powered Web application, but whatever it is, it will likely be built on PostgreSQL. Unless it’s a blog, in which case he’ll just use SQLite.
Comments on this page are now closed.
For information on exhibition and sponsorship opportunities at the conference, contact Sharon Cordesse at scordesse@oreilly.com
Download the OSCON Sponsor/Exhibitor Prospectus
Download the Media & Promotional Partner Brochure (PDF) for information on trade opportunities with O'Reilly conferences or contact mediapartners@ oreilly.com
For media-related inquiries, contact Maureen Jennings at maureen@oreilly.com
To stay abreast of conference news and to receive email notification when registration opens, please sign up for the OSCON Newsletter (login required)
Have an idea for OSCON to share? oscon-idea@oreilly.com
View a complete list of OSCON contacts
Comments
Great topic and information. The hands on thing seemed like it could have been replaced with a more streamlined interactive element and gotten more information across.
Thanks for coming, Shaun (and David). I’m pleased you got more out of it this time around. So much better not to be rushed, eh?
Best,
David
David, Thanks for the repeat session and for all your help. It all made much more sense this time! It was an excellent introduction for me into TDDD.
Shaun
David—
I created a PDF, but it’s 200MB. I thought that would be unfair. Don’t know how to get the size down, alas.
Shaun—
Sounds like the binary build of PostgreSQL you’ve installed used a newer version of libxml than your install has. I didn’t realize that pg_regress used libxml—can you connect to the database at all? If so, just ignore
make installcheck
for now.Thanks for writing, guys!
David
David, thanks for posting the slides.
Unfortunately even after trying for a few more hours, I still have been unable to get all the required software for the tutorial running together. When I try the ‘make installcheck’ command for pgtap, I get the error below. I am running on a Macbook Pro with OS X 10.5.8. I know this is a environment specific problem, but if you have any suggestions, they would be much appreciated!
dyld: Library not loaded: /usr/local/lib/libxml2.2.dylib Referenced from: /Library/PostgreSQL/8.4/lib/postgresql/pgxs/src/makefiles/../../src/test/regress/pg_regress Reason: Incompatible library version: pg_regress requires version 10.0.0 or later, but libxml2.2.dylib provides version 9.0.0
It was unfortunate to have spent half of the time simply getting most (some?) of the attendees with prerequisites. I would like to have had handouts (very prehistoric of me, I know), or at least a prestaged presentation file (preferably a nice cross-platform PDF). Having the code readily available ahead of time would have helped, also.
David is a witty writer and speaker, but that wit got lost in the shuffle of getting attendees to the point they should have been before the session started!
The logistics of getting everybody a working dev environment really bogged down David’s momentum. I’d really like to see this talk as a straight pitch for TDDD using pgTAP without the hands-on aspect.
FYI, you’ll want to download one of the “oscon-1.0” packages.
Hey Shaun,
I’ve tagged the Git repository, so now you can download a .zip or .tgz file of the Keynote file and all the source files from here. Hopefully, once you unpack the download, you’ll be able to load the .key file.
Best,
David
Dave, I tried to download the presentation slides from github.com/theory/tddd/blob... I assume that is a (iWork) Keynote file? But when I try to open (Keynote ‘09 v5.0.3), I get an error saying ‘the document does not have a valid format’.
Any idea?
Thanks,
Shaun
@David… Please see the notes the speaker, David Wheeler, has added for Windows users here: www.oscon.com/oscon2010/pub...
I’m trying to get course prerequisites set up on a Windows XP laptop. PostgreSQL and Test::Harness, no problem. But I’m not sure how to get pgTAP working under Windows. Any pointers would be appreciated.