DZone
Database Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Database Zone > Artificial Documents in RavenDB 4.0

Artificial Documents in RavenDB 4.0

In this post, we take a look at a new feature of RavenDB 4.0, namely artificial documents, and how they can help with indexing and MapReduce operations.

Oren Eini user avatar by
Oren Eini
·
Jun. 02, 17 · Database Zone · Opinion
Like (1)
Save
Tweet
2.43K Views

Join the DZone community and get the full member experience.

Join For Free

Artificial documents are a really interesting feature. They allow you to define an index and specify that the result of the index will be… documents, as well.

Let's consider the following index, running on the Northwind dataset.

image

We can ask RavenDB to output the result of this index to a collection in addition to the normal indexing. This is done in the following manner:

image

And you can see the result here:

image

The questions here are, what is the point? Don’t we already have the exact same data indexed and available as a result of the MapReduce index? Why store it twice?

The answer is quite simple. With the output of the index going into documents, we can now define additional indexes on top of them, which gives us the option to very easily create recursive MapReduce operations. So you can do daily/monthly/yearly summaries very cheaply. We can also apply all the usual operations on documents (subscriptions and ETL processes come to mind immediately). That give you a lot of power, and without incurring a high complexity overhead.

Document

Published at DZone with permission of Oren Eini, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • How to Configure Git in Eclipse IDE
  • OpenTelemetry in Action: Identifying Database Dependencies
  • Role of Development Team in an Agile Environment
  • The Engineer’s Guide to Creating a Technical Debt Proposal

Comments

Database Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo