If you purchase a dedicated server, the simple answer is it's dependent on both. The key considerations:
No artificial limit on database size is imposed on you, it's whatever the machine can handle.
What the machine can handle is dependent multiple factors such as what the query load is, what database software you choose and how well you configure it, and how well you optimize your database.