|
|
|
|
|
by anthonyb
5804 days ago
|
|
> For example if a student is not in a class, put NULL in the class id. I think you mean "don't insert a row in the student_class table, which is a many-to-many join between student and class". As a general rule of thumb, if your data schema requires NULLs for things like that, then your schema is wrong, for most of the reasons that people are trying to point out. NULLs are the absence of data, and should really only be used for exceptional circumstances - hence the reason that silently inserting NULLs into NOT NULL fields is a Bad Thing(tm). |
|