add integrity constraints to the database and suport to environment variables