Good day, Qaisar Khan.
When you get right down to it, AIML itself is actually a database. It’s indexed/searched by <pattern>, <that> and <topic>. So essentially, and in ways that actually matter, there’s not much difference. Now of course things aren’t actually that simple, and there are complexities and nuances involved with using various databases (MySQL, for example), and there’s the issue of maintaining multiple AIML files vresus a single database, but the core concept is still to store information that can be searched and retrieved.
As a “real world” example, take a look at Program O. It uses a MySQL database to hold the AIML categories for access and manipulation and it works rather well this way. This can be compared to another chatbot engine (Program AB) that uses a data object called a “GraphMaster” to contain and access the AIML categories. Each uses very different approaches to the same goal, but they both get the job done.
So in answer to your second question, yes. You can perform the same tasks in a traditional database that you can do with AIML, and even more. It all depends on your specific needs and skill level. I hope this helps.