Saving the domain field in the DB
Changed name of 'type' field in DB since it conflicts with an activerecord field
Now checking the db before creating more entries