The similarities as well as the differences of the optimal velocity model(OV model) and the Nagel-Schreckenberg model (NS model) are compared by both analytical and numerical approaches. By analyzing the rules of both models, we prove that the NS model is a discrete form model of OV model. By numerical simulations, OV model with different parameters and stochastic NS model are compared from two aspects, namely the fundamental diagram and their dynamics under open boundary conditions. The results show that these two models have very similar behaviors. However, they are different in essence, and each model has their own advantages, which makes it useful. This study provides a basis for the application and improvement of traffic flow models.