I am studying for a "Database" course, and we had this exercise in an example exam that the teacher uploaded, sadly he didn't give a complete correction but just a few tips. I am having trouble understanding why in the example below he tells us to use a trigger function instead of a simple NOT NULL constraint.

Now I would have just implemented the relationship between B and C like this:
CREATE TABLE B (
b1 int PRIMARY KEY,
b2 varchar(255)
);
CREATE TABLE C (
c1 varchar(255) PRIMARY KEY,
c2 int
);
CREATE TABLE BtoC (
b1 int REFERENCES B(b1) ON DELETE RESTRICT ON UPDATE CASCADE,
c1 varchar(255) NOT NULL REFERENCES C(c1) ON DELETE RESTRICT ON UPDATE CASCADE, -- This would ensure the same constraint, that C has to be at least once in the relation table?
PRIMARY KEY(b1,c1)
);
But he told us for the realtionship between table B and C, we would need a trigger function to satisfy the cardinalities of the relationship, here are his words:
"NOT NULL on NOTHING will not have any effect (NOT NULL only applies to existing rows, not to non-existing rows), and it will not guarantee that the constraint is valid. So, NOT NULL does not work for relation tables, only for foreign keys."
I can't make any sense of his reasoning, maybe some can explain this to me? I would really appreciate it.
CHECK (column NOT NULL)for some kind of trigger that does the same thing.CHECK (column NOT NULL)andINSERT INTO table (column) VALUES(NULL)theCHECKwould reject the insert which can be seen as a "non existing" row/record.