The SERM (Structured Entity Relationship Diagram) data model is a hierarchical extension of the classic ER (Entity Relationship) model. The hierarchical structure of the SERM diagram means that any closed circuit relationship can cause inconsistency and lack of data integrity. The occurrence of these problems is uncertain and should be systematically investigated. Therefore, there is a clear need to develop an approach supporting the definition of logical rules that would control these elements. The aim of the article is to present the framework supporting the intelligent design of relational databases. Its main aspects include identification and semi-automatic handling of logical rules based on the SERM model. An important advantage of the approach is that it does not limit itself to building a semantic data model, but also uses it to design database programming objects such as procedures, functions and triggers that guard the consistency of databases.