More or less your answer is a good approximation. Machine learning is a family of algorithms, you can develop just the tools in an abstract way (pure machine learning) or you can use it in a particular dataset.
For example, having a dataset, you can apply this algorithms to get hidden patters in your data (this is the relationship with data mining) or to build a model to predict or classify new data (this is the relationship with data science in general) .
Data mining is all about examining the large database which are previously exists and to examining it in a meaningful way to generate useful information.
Data science is a combination of data inference, algorithm development, and technology in order to solve analytically complex problems.