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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:09:33+00:00 2026-05-17T19:09:33+00:00

I am trying to figure out how you design data storage in a document

  • 0

I am trying to figure out how you design data storage in a document storage system like CouchDB or MongoDB.

I don’t use JOIN’s anymore in my queries and just stick to searches for rows with certain indexes that meet my criterion. For example, I might look for recent comments (ORDER BY date) or all active users (WHERE status = 1). In other words, my search logic is all based on indexed int columns stored in RAM.

Moving over to NoSQL, There don’t seem to be any indexes – so I’m trying to figure out these databases filter results without looking through each row manually.
Update: somehow I missed this: http://vivu.tv/portal/archive.jsp?flow=783-586-4282&id=1270584002677

As for design, using the examples of storing a post with all comments as one document doesn’t seem like it’s logically sound. How would you find recent comments? Or how would you find the comments of a certain user?

Where can I go to learn how to convert schema’s (and my way of thinking) so that I can build out apps using these document databases?

Update:
I just didn’t spend enough time going through the MongoDB site I guess. The documentation seems to cover most of the things needed like using indexes to filter results just like in sql. Also http://www.mongodb.org/display/DOCS/SQL+to+Mongo+Mapping+Chart and http://rickosborne.org/download/SQL-to-MongoDB.pdf were just what I needed.

  • 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-17T19:09:34+00:00Added an answer on May 17, 2026 at 7:09 pm

    Actually it’s not so much that there are no indexes as that there are no default indexes. With SQL if you don’t create an index searching will be slow. With most NoSQL systems if you don’t create an index searching won’t happen at all. The approach used for indexing depends on the specific system you are using – sometimes you use a search engine to index documents, sometimes it’s storing sets of ids for each possible value.

    I disagree with storing comments in a post document myself – it is more flexible to have comments as seperate documents indexed by post id. However, if it happens that you don’t care about those other queries (and your platform supports partial updates) a single document is the simplest solution – the right structure depends entirely on what you want to do with it.

    You won’t find anything generic to convert schemas since there is no single right answer. I think the best method is to think about the app rather than the data – if your sql blog app is reading several tables and creating a post object you know you should probably have a post document.

    You should also try to think of solutions other than running queries to take advantage of features in your NoSQL platform – for example with redis I would implement recent comments as a list which is updated and trimmed each time a comment is added. Effectively it’s a very specialized index – much more efficient than checking the date on every comment in the system and adding more keys/data types is not a problem when you don’t need to worry about updating schemas.

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

Sidebar

Related Questions

I'm a novice to SQL scripting. I am trying to figure out a design
I'm trying to figure out the best design pattern to insulate a child object
Trying to figure out an equation to get the current group a page would
In trying to figure out this problem (which is still unsolved and I still
I'm trying to figure out how big a certain database would be (it hasn't
I'm basically trying to figure out the simplest way to perform your basic insert
I'm trying to figure out why the control does not honor ZIndex. Example 1
I've been trying to figure out a regex to allow me to search for
I'm trying to figure out how to detect the type of credit card based
I'm trying to figure out what a Java applet's class file is doing under

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.