add Database constructor from non closing connection and static Database factory methods