make DB input and output

1 new file
3 modified files