implemented almost the entire Database section. oauth will follow next