Database Query in Drupal 8 (for own data)

Hi

I’ve got some street mapping data (X, Y coordinates for street names) in my own table (but it’s in the Drupal database, with a different table prefix, and a different database user who can only access that table). [There are over 38,000 records].

1. Can I use Drupal 8’s autocomplete functionality with my own database table?
2. Do I use PHP PDO, or does Drupal have something like that? (obviously I’m using my own database table as mentioned above)

Having internal / external databases is explained here for Drupal 7 (https://drupal.stackexchange.com/questions/167569/how-can-i-setup-multip…). Also dependency injection… obviously a lot to know!

Thanks 🙂
Mike

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/4/feed