In this paper, we proposes a method to automatically construct SHACL schemas for RDF knowledge graphs(KGs) generated by Direct Mapping(DM). DM and SHACL are all W3C recommendations. DM consists of rules to transform the data in an RDB into an RDF graph. SHACL is a language to describe and validate the structure of RDF graphs. The proposed method automatically translates the integrity constraints as well as the structure information in an RDB schema into SHACL. Thus, our SHACL schemas are able to check integrity instead of RDBMSs. This is a consideration to assure database consistency even when RDBs are served as virtual RDF KGs. We tested our results on 24 DM test cases, published by W3C. It was shown that they are effective in describing and validating RDF KGs.