When you need to connect another database, create an instance of the wpdb class. Doing so, you get access to all available methods of wpdb class. The user can use these class methods directly to interact with the external database.
When you need to connect another database, create an instance of the wpdb class. Doing so, you get access to all available methods of wpdb class. The user can use these class methods directly to interact with the external database.