Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 4 Exercise 2 Answer #27

Open
apterf opened this issue Aug 13, 2015 · 0 comments
Open

Chapter 4 Exercise 2 Answer #27

apterf opened this issue Aug 13, 2015 · 0 comments

Comments

@apterf
Copy link

apterf commented Aug 13, 2015

Hi I am learning datalog with the website of this project. It is quite fun but I have a small question here.

In Chapter 4 Exercise 2, the instruction guide likes "To find all installed attributes you must use the :db.install/attribute attribute".

However, the answer without using ":db.install/attribute" will trigger the correct answer. Just got a little bit confusing about it.

Here is the answer which also trigger the results:

[:find ?attr ?type ?card
 :where

 [?a :db/cardinality ?c]
 [?c :db/ident ?card]

 [?a :db/valueType ?t]
 [?t :db/ident ?type]

 [?a :db/ident ?attr]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant