Reasoning about Entity Relationship Diagrams with Complex Attribute Dependencies