Statistics reveal that globally, the aging population in different stages of dementia are struggling to cope with daily activities and are progressively becoming dependent on care takers thereby making dementia care a challenging social problem. Healthcare systems in smart environments that aim to address this growing social need require the support of technology to recognize and respond in an ubiquitous manner. To incorporate an efficient activity recognition and abnormality detection system in smart environments, the routine activities of the occupant are modeled and any deviation from the activity model is recognized as abnormality. Recognition systems are generally designed using machine learning strategies and in this paper a novel hybrid, data and knowledge-driven approach is introduced. Markov Logic Network (MLN) used in our design is a suitable approach for activity recognition as it integrates common sense knowledge with a probabilistic model that augments the recognition ability of the system. The proposed activity recognition system for dementia care uses a hierarchical approach to detect abnormality in occupant behavior using MLN. The abnormality in the context of dementia care is identified in terms of factors associated with the activity such as objects, location, time and duration. The task of recognition is done in a hierarchical manner based on the priority of the factor that is associated with each layer. The motivation for designing a hierarchical approach was to enable each layer to commence its computation after inferring from the lower layers that the ongoing activity was normal with regard to the associated factors. This hierarchical feature enables quick decisions, as factors that require immediate attention are processed first at the lowest layer. Experimental results indicate that the hierarchical approach has higher accuracy in recognition and efficient response time when compared to the existing approaches