How to connect Database to rasa core?

What kind of connection are you expecting exactly? If you want to store the history of the tracker to a database, you can use a tracker store.