added limit function for database base class