restored the db_system extends db_sql for backward compatibility, $db remains a db_sql()