completed javadoc to database stuff