Keys identify rows uniquely and link tables; constraints are rules the DBMS enforces so that bad data never gets in.