finish cd database example, and also write 'update' as a macro