Add RW Lock for db