You might benefit from checking out the free classes from Stanford University for Machine learning, databases, and AI.
http://www.ml-class.org/course/auth/welcome is the machine learning one....
What you're describing sounds like a combination of all 3...and isn't trivial. But those classes are free, and they have lots of resources explaining each of those concepts with labs....