Add terms to database