I never understood the difference between interfaces and abstract classes. I asked on online forums and stackoverflow the typical answer I got was: "An interface is a contract that you define... A class has to implement the methods defined in the interface for it to work."
"Why do I need to use a contract if I can can simply implement the call the methods directly? Why do I need that middle man". I was working on a small web api project with Nancy, MySQL lite was used initially, but, I wanted to use a database like MySQL or PostgreSQL. The small project I was working on to learn Nancy needed refactoring. So, I asked myself "What if I could swap database at will". That when all the concept of interfaces came together.
I could simply use an interface as a mediator, which mean defining methods inside an interface, as long as the code calling the database implements these methods, things will work fine.