Jump to content
We've recently updated our Privacy Statement, available here ×

How to design domain containing 2 data sources


lbjmj236

Recommended Posts

Hi all,


I am facing a problem in Domain design. There are 2 types of social media posts in my database, say facebook and twitter. The records are stored separately in 2 tables, while their primary key(post id) is stored in a third table in pair of topics. 1 topic pairs with multiple post ids.


      --Tables: FB_POST(id, content), TW_POST(id, content), TOPIC(topic, id)


      --Query: Find all social media posts regarding a topic, e.g. 'Inside Out'.


If I only create 1 join tree in domain, it gives no results. Because no post shares the same id across 2 social platform.


If I duplicate the TOPIC table and create 2 join trees in the domain, then how could they both be imported to a single Ad Hoc view? If not, what can I do to implement this query?


Thanks


Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Thanks for all the answers.

I have followed @hozawa link and completed example query by outer join. Then another issue happens becasue my goal is to find all posts for every TOPIC. The query ran for hours and I never got results. I think it is because the outer join is too expensive in this case, especially tables here are huge.

For @djohnson53 suggestion, it is doing subselect during creating derived tables. It worked for sure. But can we figure out a way to make it more general and find all posts attached to every TOPIC?

Thanks again.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...