A method for managing a database, comprising: determining a time interval which corresponds to the maximum time span a database entry is to remain in the database before being removed; dividing the time interval into at least a first and a second time slice (t1, t2,..., tn); updating at least a first and a second slice database (3a, 3b,..., 3n) with database events, wherein the at least the first and the scond slice database (3a, 3b,..., 3n) be created as copies of the database; and after a time span corresponding to the duration of the first time slice has elapsed, replacing the first slice database with the second slice database and replacing the second slice database with a new second slice database; wherein updating at least the first and the second slice database (3a, 3b,..., 3n) with database events comprising: checking what data packet the database events pertains to, wherein the database events are the reception of a new data packet or the transmission of a data packet; if the database events spans over all the time slices (t1, t2,..., tn), then it is determined that the database events pertain to data packets that were already in the database during the first time slice, wherein these data packets are the oldest data packets and are therefore the first to expire after the time span has elapsed that corresponds to the duration of the first time slice, wherein information relating to this database event is relevant for the oldest version of the database, which is the first slice database; updating the first slice database; if the database events are determined to relate to data packets that have been included in the database in a time slice (t2,..., tn) later than the first time slice; updating the second and further slice databases (3b,..., 3n). determining a time interval which corresponds to the maximum time span a database entry is to remain in the database before being removed; dividing the time interval into at least a first and a second time slice (t1, t2,..., tn); updating at least a first and a second slice database (3a, 3b,..., 3n) with database events, wherein the at least the first and the scond slice database (3a, 3b,..., 3n) be created as copies of the database; and after a time span corresponding to the duration of the first time slice has elapsed, replacing the first slice database with the second slice database and replacing the second slice database with a new second slice database; wherein updating at least the first and the second slice database (3a, 3b,..., 3n) with database events comprising: checking what data packet the database events pertains to, wherein the database events are the reception of a new data packet or the transmission of a data packet; if the database events spans over all the time slices (t1, t2,..., tn), then it is determined that the database events pertain to data packets that were already in the database during the first time slice, wherein these data packets are the oldest data packets and are therefore the first to expire after the time span has elapsed that corresponds to the duration of the first time slice, wherein information relating to this database event is relevant for the oldest version of the database, which is the first slice database; updating the first slice database; if the database events are determined to relate to data packets that have been included in the database in a time slice (t2,..., tn) later than the first time slice; updating the second and further slice databases (3b,..., 3n).