new database function

Signed-off-by: rayrayy <ray61503@hotmail.com>