I don't want to yuck your yum, but if you're even considering table per chat, you're so early in your learning journey that what you're looking to achieve is just way too ambitious.
Learn the basics of data modelling and how a RDBMS works first. Then, take that knowledge and apply it to your use case; a chat application, as an exercise. Specifically, you'll want to learn about data normalisation, data redundency; and how it leads to data anomolies, design patterns (such as supertype/subtype), many to many relationships through bridge tables, and how RDBMS' store data; paging, btrees, indexes, and what ACID principles are.
And just to keep some perspective, perhaps learn a bit about graph databases, which is a different paradigm. The more tools in your toolbox, the better the chance that you pick the right tool for the job.