Resistive random access memory (RRAM) devices are promising candidates for next generation high capacity data storage due to their superior properties such as cost-effective fabrication, high operating speed, low power consumption, and long data retention. Particularly, the two dimensional (2D)-materials-based RRAM has attracted researchers' attention because of its unique physical and chemical properties without the constraint of lattice matching. In this review, the switching mechanisms and modeling of RRAM devices based on the 2D materials such as hexagonal-boron nitride (h-BN) and graphene are discussed. Firstly, the monolayer and multilayer h-BN RRAMs are introduced, and their mechanisms and compact model are further described. Then, the mechanisms of graphene electrodebased RRAM (GE-RRAM) for different applications are also introduced and compared. Furthermore, the electrical conductivity, multi-physic and compact models of GE-RRAM are introduced. This review paper provides the guidance for the design and optimization of the 2D-materials-based RRAM in the next generation memories.