An example of ZPatterns using SQL. Gadfly is the database so everyone can use it. There are a couple of novel aspects 1) a generic object management UI that is acquired by all the Specialists and 2) levers to manages all the SQL and SkinScript. This one also has a filesystem base class for the Lunch object just to show how it can be done.
generic
Lunch
After you have the products and folder installed, you'll need to create the database tables (run createAllTables_html) and then add some data. There is a very crude admin UI for each Specialist that you can get to from the main view page by clicking on the link for that Specialist. Follow the object model to see how to hook things up.
view
If you change any of the ZClass propertysheets you'll need to rerun the levers to create all the SQL queries and SkinScript. (You'll probably also need to drop/re-create the relevant database tables)
enjoy!