small changes on db.c
add Makefile
start to unitest db.c