Making entries to database