Add basic connect

Fixes #5 
An error will happen later when trying to read the database.

Still you have a point here. It is better to implement the methods more defensively when writing a public library. So I will change the code here.