Querying a social website's data
Assume that you run a social networking website. On such a website, your users might be have "friendly" relations with other users. Besides, you have access to some data related to their behavior, such as information about what items they've bought from your website.
The goal of this recipe is to capture these relationships and behavior-related data, so that we are able to derive interesting facts out of them. As it turns out, it is possible in core.logic to specify facts that are relations between data and to query these relations in goals.
In the following section, we will answer the questions: who are a given user's friends? Who is reachable from a user's network? What did someone's friend buy? You'll even see ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access