database method