title: Alternatively setting Null values in columns
body: <p>I am building a database and one of the tables contains the columns "sensor_id" and "station_id". When someone tries to insert a new row in the table we can have a NULL value in the "sensor_id" column but then we can not have a NULL value in the "station_id" under no circumstances. Vice versa, when the "station_id" is NULL, the "sensor_id" must not be NULL. If a value is entered at both columns that is not a problem.</p>
  
  <p>I am currently working in MySQL Workbench and it seems that my choices are to set both columns as NN(Not NULL) which is too strict implementation as one of them is sufficient, to set just one of them as NN which means that one specific column must always be filled(not the case either) or set none of them NN which is too loose as at least one of both values must be given.</p>
  
  <p>Visually the table looks like this(sorry for the Microsoft Word substitute but I have problems with MYSQL server and can not acces the database):</p>
  
  <p><a href="https://i.stack.imgur.com/10gBk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/10gBk.png" alt="Alert table"></a></p>
  
  <p>Alert_id is the primary key of the table, so duplicate values are allowed for the other two columns.</p>
  
  <p>How could I implement this?</p>