database basic structure and ruby connectivity