The document proposes a rule-based approach for entity resolution. It defines a new class of rules that can describe complex matching conditions between records and entities. An online algorithm is developed to identify which entity each record refers to by applying rules. A rule discovery algorithm is also proposed that can effectively and efficiently discover rules from data. Experimental results on real datasets show that the rule-based entity resolution and rule discovery algorithms achieve high performance.