Here are some slides and code samples I made over time for the courses I taught:
Even if the slides are in Italian only, the example of using Berkeley DB with PHP I showed during the talk should be of interest to English-speaking people: it implements an online rhymer with BDB or MySQL.