initial work for the database layer