inserted database functionality for matrix_law_base