A computer implemented method for managing a smart database which stores facial images for face recognition, the method comprising the steps of: counting specific facial images corresponding to a specific person stored in the smart database where new facial images for face recognition are continuously stored; upon a first counted value, representing a count of the specific facial images, is determined to be equal to or greater than a first set value, generating, using a convolutional neural network, CNN, of a neural aggregation network learned to perform face recognition, having the specific facial images as input, a feature corresponding to each of the specific facial images; generating, using a feature embedding module of the neural aggregation network , a feature vector where the features of the specific facial images are embedded; generating, using an aggregation module comprising at least two attention blocks (152_1, 152_2) arranged in a recurrent structure, a quality score of each of the features of the feature vector by applying recurrent operation to the feature vector; sorting the quality scores corresponding to the specific facial images in a descending order of the quality scores; counting the sorted specific facial images in the descending order until a second counted value which represents the number of a counted part of the specific facial images becomes equal to a preset second set value; deleting an uncounted part of the specific facial images from the smart database; generating an optimal feature for face recognition of the specific person by weighted summation of the counted part of the features using the counted part of the quality scores; and setting the optimal feature for face recognition of the specific person as a representative face corresponding to the specific person. counting specific facial images corresponding to a specific person stored in the smart database where new facial images for face recognition are continuously stored; upon a first counted value, representing a count of the specific facial images, is determined to be equal to or greater than a first set value, generating, using a convolutional neural network, CNN, of a neural aggregation network learned to perform face recognition, having the specific facial images as input, a feature corresponding to each of the specific facial images; generating, using a feature embedding module of the neural aggregation network , a feature vector where the features of the specific facial images are embedded; generating, using an aggregation module comprising at least two attention blocks (152_1, 152_2) arranged in a recurrent structure, a quality score of each of the features of the feature vector by applying recurrent operation to the feature vector; sorting the quality scores corresponding to the specific facial images in a descending order of the quality scores; counting the sorted specific facial images in the descending order until a second counted value which represents the number of a counted part of the specific facial images becomes equal to a preset second set value; deleting an uncounted part of the specific facial images from the smart database; generating an optimal feature for face recognition of the specific person by weighted summation of the counted part of the features using the counted part of the quality scores; and setting the optimal feature for face recognition of the specific person as a representative face corresponding to the specific person. <EOS>