Replace database interface with Kotlin version