db initial implementation