@Override
	public Ingredient addIngredient(String s) {
		Ingredient c = getIngredient(s);
		if (c != null) {
			return c;
		} else {
			try (Connection connection = DriverManager.getConnection(connectionString);) {
				int idNewCategory = getNextIdAndIncrement();
				PreparedStatement statement = connection.prepareStatement("insert into ingredient values (?, ?)");
				statement.setInt(1, idNewCategory);
				statement.setString(2, s.toUpperCase(Locale.ENGLISH));
				statement.executeUpdate();
				statement = connection.prepareStatement("insert into parent values (?, 0)");
				statement.setInt(1, idNewCategory);
				statement.execute();
				connection.close();
				return getIngredient(s);
			} catch (SQLException ex) {
				ex.printStackTrace();
				return null;
			}
		}
	}