This paper is committed to applied research in Bayesian networks in data mining, for there is not a complete Bayesian networks in data mining algorithms, propose a heuristic in data mining to construct Bayesian network using sample data algorithm thought, this algorithm solves the problem by using sample data design the Bayesian network in data mining. Finally, the experimental analysis, established the model of college students study section, the experimental results show that the algorithm proposed in this paper, the design of simple practical method, the application of effective, compared with other algorithms and the characteristics of high precision, but also show the algorithm mining advantages in the aspects of data, to practice management, analysis, prediction and decision etc.