A system for detecting anomalies, said system comprising - a communication module having access to a database comprising a plurality of physical entity records, each physical entity record comprising physical data values for at least one numeric attribute and partition-specifying values concerning values for one or more nominal attributes; - a computing device comprising a processor, tangible non-volatile memory, program code present on said memory for instructing said processor; wherein the communication module is arranged to provide said computing device access to said database, wherein said computing device is configured for carrying out a method for calculating an anomaly score for each of said plurality of physical entity records, said method comprising the steps of: (a) retrieving said plurality of physical entity records via said communication module and optionally preparing said plurality of physical entity records for partitioning; (b) partitioning said plurality of physical entity records, by associating a partition with each distinct combination of the partition-specifying values (11 12) present in said plurality of physical entity records and grouping said physical entity records according to said partitions; (c) for each of said partitions obtained in step (b), training an unsupervised anomaly detection algorithm on the physical data values of the physical entity records belonging to said partition, obtaining a trained anomaly detection model for each of said partitions; (d) for each physical entity record belonging to said plurality of physical entity records, calculating the anomaly score by means of the trained anomaly detection model that is associated with the partition to which the physical entity record belongs; (e) preferably, via the communication module, updating each physical entity record in the database by adding its associated anomaly score calculated in step (d) and/or preferably, via the communication module, storing each of said trained anomaly detection models for each of said partitions in said database. - a communication module having access to a database comprising a plurality of physical entity records, each physical entity record comprising physical data values for at least one numeric attribute and partition-specifying values concerning values for one or more nominal attributes; - a computing device comprising a processor, tangible non-volatile memory, program code present on said memory for instructing said processor; (a) retrieving said plurality of physical entity records via said communication module and optionally preparing said plurality of physical entity records for partitioning; (b) partitioning said plurality of physical entity records, by associating a partition with each distinct combination of the partition-specifying values (11 12) present in said plurality of physical entity records and grouping said physical entity records according to said partitions; (c) for each of said partitions obtained in step (b), training an unsupervised anomaly detection algorithm on the physical data values of the physical entity records belonging to said partition, obtaining a trained anomaly detection model for each of said partitions; (d) for each physical entity record belonging to said plurality of physical entity records, calculating the anomaly score by means of the trained anomaly detection model that is associated with the partition to which the physical entity record belongs; (e) preferably, via the communication module, updating each physical entity record in the database by adding its associated anomaly score calculated in step (d) and/or preferably, via the communication module, storing each of said trained anomaly detection models for each of said partitions in said database. <EOS>