Database tables model in Java