Added SQL for creating database, plus some basic interfaces from BMInterface

Note: the changes specific to this pull request will be more evident when the previous pull request has been accepted