created database and connected to index