Working with the database input