7
I created a database, in which I have some problems when I remove some data from the table.
Example Sales stand: I have a salesman who’s been fired and I want to remove him from the comic book but I can’t because that salesman has associated him with 1000 and such sales... And I can’t erase the 1000 and such sales because of the seller...
I know that to solve this problem, one of the solutions is to add a field to each table where when this data is removed this field goes to false or 0 and when it is active this field is to true or 1.
Question
What is this way of resolving? This is if there is a name for it
Example: if I say I will use "Singleton" in a class automatically who knows this Design Pattern you know what I’m gonna do.
Is there such a name for this way of solving?
Thank you very much... As you said and well "not necessarily better but still options" for the example I gave, the first would be a very bad solution because the sale would be without the responsible, someone who in case something went wrong "for the blame" But in the second option spoke on a subject that had never thought (I think) concerning databases, data integrity, thank you again...
– jsantos1991