add db.maintain model
added db.maintain
added example script
added db.maintain
first working version of db.maintain