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 795293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:27:24+00:00 2026-05-14T22:27:24+00:00

As I understand it, you can enter any non-structured information into a document-oriented database.

  • 0

As I understand it, you can enter any non-structured information into a document-oriented database. Let’s imagine a document like this:

{
  name: 'John Blank',
  yearOfBirth: 1960
}

Later, in a new version, this structure is refactored to

{
  firstname: 'John',
  lastname: 'Blank',
  yearOfBirth: 1960
}

How do you do this with Document-Oriented databases? Do you have to prepare merge-scripts, that alter all your entries in the database? Or are there better ways you can handle changes in the structure?

  • 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-14T22:27:25+00:00Added an answer on May 14, 2026 at 10:27 pm

    Refactoring here implies that there’s a deterministic mapping from the old schema to the new schema. So the most effective option is to do the same thing you’d do with a SQL database and actually update the documents.

    Document-Oriented Databases do give you one other option, although it depends on which DODB and how you’re using it on the front-end. That option is to simply leave the data alone, and support the “old” definition in your application as a sort of backward-compatibility option. In other words, you’re doing these translations on-the-fly, as opposed to a permanent one-time update.

    This isn’t really an option with a SQL database because you’d have to keep the obsolete column around and possibly indexed. With a DODB, you’re not really wasting any data or index space. You’d have to weigh the advantages against the disadvantages.

    The primary disadvantage is, obviously, the inconsistency, which could grow over time and lead to bugs. Another disadvantage is possibly the computational expense of doing this on-the-fly, or the inability to effectively use the new structure (for example, you might want to index on just the lastname). So, most of the time, I think I would just choose to run a mass update.

    There is one clear advantage to preserving the old documents, however; if you’re not certain that your refactoring is perfect – for example, if the data in your name column didn’t follow a consistent convention, maybe in some cases it’s lastname, firstname and in other cases it’s firstname lastname and in other cases it’s company name – then doing your conversions on-the-fly without making a permanent update allows you to refine the mapping over time, so you can use the firstname and lastname fields when available but fall back to the name guessing-game for legacy data.

    As stated, I’d probably reserve the second option for exceptional cases, where I’m not confident that I’ll be able to get the “refactoring” correct for every record/document. Nevertheless, it’s an option that is available to you that you don’t really have with other types of databases.

    Aside from those two, I don’t see any other clear alternatives. It’s kind of a binary decision; either you permanently update the existing data or you don’t.

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

Sidebar

Related Questions

I understand I can create an enum like this: public enum MyEnum { ONE(1),
I don't understand why can't i access values like this: object = { test:{
![enter image description here][1]On my two demo and screenshot, you can understand that so
I understand I can apply several options to the ServiceContract (like Name , Namespace
I'm using Visual Studio 2008 for C#. I can't understand why this simple code
I can understand binary operation 11 & x , for example if x =
I can understand the string.Join( ) var stringies1 =new [] {Blood, is, Thicker, Than,
I can understand the difference between a signed char and an unsigned one. But
As you can understand from title, i modified Settings.cs file.Added some properties, some code
So far I can understand HTML.ActionLink and URL.RouteURL but still trying to absorb where

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.