The CAP theorem states that in a distributed system, it is impossible to simultaneously achieve Consistency, Availability, and Partition tolerance. Database systems need to prioritize two of these properties, often sacrificing one.