Created database functionality