I'm studying some design patterns, and right now I'm learning about the observer pattern . I've read books, I've seen some lessons on Youtube, I've done the examples and everything.
But now I'd like to implement in practice inserting data into the database, to use in a project I'm currently working on.
My situation: I have a base with 3 tables ( Setor
, Pessoa
, PessoaSetor
). It's a "many-to-many" relationship. Every sector can have more than one person, this information is in the PersonSetor table.
What I need: Every time a person registers in a sector, he or she sends a notification to those responsible for the sector. In this case, the notification can be a separate table.