You can do AI with java for what it's worth. AI is all about containing the solutions to a manageable set. If you want to begin, start with MySQL 5.x so you at least have Stored Proceedures. Database was never engineered for speed. DB is geared for making impossible possible, it is highly abstract and yet capable of modeling life situations much more precisely in a declarative syntax. Data mining is its own science and I would opinion that would end up being the mechanism you seek.