Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9237287
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:30:11+00:00 2026-06-18T07:30:11+00:00

My question is – is there a way to join two entities in Dataomic,

  • 0

My question is – is there a way to join two entities in Dataomic, that don’t have a reference in the schema, without resorting to writing two nested iterators (a manual join).

In the Datomic Doco – they give an example of a query specifying two parameters.

[:find ?n ?u
 :where
 [?c :community/name ?n]
 [?c :community/url ?u]]

They call this a ‘join’ – because the underlying structure is a key-value database – so even attributes of the same entity need to be ‘joined’ together.

Then they give an example of a join between two entities that have a reference (assume the reference is defined in the schema which is not shown here):

[:find ?c_name
 :where
 [?c :community/name ?c_name]
 [?c :community/neighborhood ?n]
 [?n :neighborhood/district ?d]
 [?d :district/region :region/ne]]

My question is – is a query like the above possible without a reference in the schema? Or would I have to resort to writing an iterator and trawling through the results?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T07:30:13+00:00Added an answer on June 18, 2026 at 7:30 am

    Any variable that occurs more than once in the :where clause is implictly joined over.

    So you can ask for names that belong to a community as well as to a neighbourhoord

    (def results (q '[:find ?name :where [_ :neighborhood/name ?name] 
                                         [_ :district/name ?name]] 
                     (db conn)))
    

    Is this what you were asking for? (ids are just ignored in this example)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Question: is there a better way to do that? VB.Net Function GuidToBase64(ByVal guid As
Question context: let say that there is some really important row in config/locales/en.yml that
Question: Why there is extra space in 2.3.3? This is a strange behaviour that
Question: Is there a way to detect what XHtml conformance setting a particular ASP.Net
Question in title... In short - I have a WCF service exposing operations that
Question in Contact Form 7 wordpress, is there a way to get the emails
I don't have much knowledge about the IPv6 protocol, so sorry if the question
Question says it all - is there a class somewhere in Windows Forms that
Question : Is there a service or a system methodology that would allow someone
Question: Is there a way to make view PERSON for user jack point to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.