i have a table "projects". And only one project can be active at one time. How do i design this? I had in mind to make a table "active_project" and save the name of the active project in there. So my questions are:
1. Would that be an appropriate way to do it?
2. Is there a way in mysql to limit the number of rows in this table to 1?
3. And am i right that the relation between the two tables is 1:1 then?
I mean it's firstly a design question. Even if i don't could set the max row to 1, i could make it so and then just update the first row everytime and never add one. It would just be another "safety" layer if i could set the max row to 1. I'm more interested if it is the "right" solution, from a design standpoint, at all.