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

  • SEARCH
  • Home
  • 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 6149761
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:30:28+00:00 2026-05-23T19:30:28+00:00

As with most, I come from and RDMS world trying to get my head

  • 0

As with most, I come from and RDMS world trying to get my head around noSQL databases and specifically document stores (as I find them the most interesting).

I am try to understand how to perform some set-based operations using a document database (I’m playing with RavenDB).

So as per my understanding:

  • Union (as in SQL UNION) is very straight forward append. Additionally
    unions between different sets (SQL JOIN) can be achieved map/reduce. The
    example given in the RavenDB mythology book with Comment counts on
    Blogs entries is a good start.
  • Intersection can be performed using a number of techniques from
    de-normalization right through to creating a “mapping” or “link”
    document as described here (and the aggregator example below). In an RDMS this would be performed using a simple “INNER JOIN” or “WHERE x IN”
  • Subtract (Relative Complement) is where I am getting stuck. In an RDMS this operation is simply a “WHERE x NOT IN” or a “LEFT JOIN” where the joined set is NULL.

Using a real world example let’s say we have an RSS aggregator (such as Google Reader) which has millions if not billions of RSS entries with thousands of users, each tagging favourite, etc.

In this example we focus on entry, user and tag; where tag acts as a link between user and entry.

user {string id, string name /*etc.*/}
entry {string id, string title, string url /*etc.*/}
tag {string userId, string entryId, string[] tags} /* (favourite, read, etc.)*/

With the above approach it is easy to perform the intersection between entry and user using tag. But I cannot get my head around how one would perform a subtract. For instance “Return all items that do not have any tags” or even more daunting “return the latest 1000 items without any tag”.

So my question:

  • Can you point me to some reading material on the matter?
  • Can you share some ideas on how one can accomplish the task
    efficiently?

Note: I know that you lose query flexibility with document databases, but surely there must be a way to do this?

  • 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-05-23T19:30:29+00:00Added an answer on May 23, 2026 at 7:30 pm

    Amok,
    What you want cannot really be done easily in non relational databases.
    Mostly because they don’t think in sets and have strong ties to distributed computing.
    You can’t really do efficient sets without having access to all the data, for example, and that pretty much means that any set based operation is going to have to need access to all of that.
    Since NoSQL dbs are usually used in distributed scenarios, they can’t really support that.
    RavenDB, specifically, allows some operations on a specified set, but it is built strongly on the assumption of independent documents, that don’t have strong relations to other documents, or documents that need to be manipulated all together in the same fashion.

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

Sidebar

Related Questions

Possible Duplicate: Where does ‘Hello world’ come from? Hello world! is the most commonly
I wonder what's the most effective way to render ANYTHING that might come from
I come from a ASP.Net background and taking baby steps in open source world.
I really come from the world of Http and never did much with the
There are a lot of great open-source projects on github. Most of them come
Most of us write conditionals like: if (resultIndex == 0) ...but occaisionally I come
I have never come across this issue but most recently I noticed that a
Most objects in SAP ERP can be double clicked to get more information in
Most databases support some form of insert into select... statement. insert into a select
I am learning C++. I come from a background of: .NET and VB6. I

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.