If a data structure developer is writing a trigger then it is a good practice for them to use the Map data structure to hold query results by ID and use the Set data structure to ensure distinct records. A trigger is an SQL (structured Query Language) procedure that initiates an action when an event occurs.
A trigger is something that cannot be called or executed but instead automatically fires as a result of a data modification. SQL is the primary language that is used to communicate with a database. It is officially the standard language for relational database management systems.