Along with widespread information communication technology, digital management has been applied to a variety of fields. Considering the rapidly growing importance of medical treatment, for which medical record management plays a crucial role, it is time to make full use of digital techniques in the medical field. Doctors in different departments and locations can check the electronic records of patients without complex steps and can even consult together via the Internet. In this paper, we design a hierarchical–object–relational management system for electronic records (HORME). HORME can not only achieve the essentials of traditional paper‐based record but can also satisfy the requirements of privacy and security according to the factorization problem, which makes it possible to protect the right of the legal doctors, patients, and hospitals. Copyright © 2013 John Wiley & Sons, Ltd.