add local db sample code