You didn't specify any particular platform, so it's not gonna be a very accurate answer.
Where do databases fit into object-oriented design?
I guess we're talking about RDBMS, right? Well, they don't. This is why we need ORM software, like Hibernate for Java or Doctrine for PHP.
Should I have an article class with a connection to the database within the class or just a global database class so that other classes say user class can access the same connection?
Also should I use tables as objects such as article being it's own data object then having a class like ArticleApi for CRUD operations?
There are basically two common approaches for ORM architecture:
- Data Mapper, where your domain objects are just plain-old objects, without any dependencies to ORM/database. You should model your model in OO-way and then map it into your database. You've got a separate set of objects (EntityManagers) for dealing with actual persistance.
- Active Record, where your domain objects are tightly coupled with ORM and they provide a set of methods on their own for handling database-related operations.
In my personal opinion data mapper approach is superior to active record as it follows SOLID principles. But active record might be very usefull as well.
You should generally remember that your domain model (object oriented) and database model (rdbms) are two different things that have to be modeled with a different guidelines.