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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:57:23+00:00 2026-06-17T13:57:23+00:00

Such as in stack overflow? I noticed that some tags are synonyms. For example

  • 0

Such as in stack overflow?

I noticed that some tags are synonyms. For example restaurant and restaurants. Some tags are hierarchical. For example, food -> restaurant.

How do you store the data structure in mongodb?

Do you have sets of synonyms where the default is the id?

Also what would you do if user search for restaurant or restaurants, for example?

Do you convert all search into it’s default form and search the tag or do you expand the search to all of it’s synonym?

What’s the standard way?

I am using mongodb.

  • 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-06-17T13:57:24+00:00Added an answer on June 17, 2026 at 1:57 pm

    The StackOverflow schema is relational. (Specifically MS SQL Server 2008) It maintains a many-to-many relation between Tags and Posts. And it maintains a unidirectional relationship of Tags with their synonyms.

    Your restaurants example appears to be a classification system where nodes names in the classification may have synonyms. In this case the data structure of the classification may be more important than the actual node names. How synonym’s are implemented would be highly dependent on the data structure and anticipated query patterns. Look at the Data Modeling Patterns docs to see a variety of different data structures.

    Mongo doesn’t have any name aliasing functionality built into the core DB server. Some ORM’s provide a limited name aliasing capability on the client side. For example mongoose through virtual attributes. These should be used with caution though because they don’t provide an underlying performance benefit, and may obscure what’s really happening in the database.

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

Sidebar

Related Questions

I'm wondering how to get an stack overflow error with a simple example, such
Apps such as FML, TWI etc that display user supplied data have the ability
I have noticed that if an element, such as span or p, has a
I'm somehow creating a stack overflow in Flex 3...I'm trying to get data out
I'm new to Stack Overflow, but I have a question about writing some Java
I know that normalization has been extensively discussed on Stack Overflow. I've read many
A basic question but there is no such question on Stack Overflow (for ASP.NET)
Before writing this question I have checked various questions on Stack Overflow such as:
I noticed a few websites such as Yahoo and Stackoverflow having response headers that
How can I implement a diff function, such as Stack Overflow's question revision history?

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.