Fact: An unconditional base assertion. parent(alice, bob). states that Alice is a parent of Bob. In logic programming, a fact is a statement that is simply true, without conditions. In Prolog, parent(alice, bob). states that Alice is a parent of Bob. Facts are the base data of a logic program. Rules combine them to derive new knowledge. From parent facts, a rule can define who is a grandparent, and the system can then answer questions such as "who are Bob's grandparents?"
The idea is close to a row in a database table. A table of parents with two columns holds the same facts, and a SQL query or view plays the role of a rule. That is why logic programming and relational databases feel related. Both describe what is true and let an engine work out the answers.
Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use this skill when designing clean architecture for a new microservice, when refactoring a monolith to use bounded contexts, when implementing hexagonal or onion architecture patterns, or when debugging dependency cycles between application layers.