title: website for advertising. similar to OLX sites || mongodb dynamic models
body: <p>I'm thinking of using the object <a href="https://en.wikipedia.org/wiki/Entity%E2%80%93attribute%E2%80%93value_model" rel="nofollow noreferrer">attribute-value (EAV)</a> pattern for some things in one of my projects, but some questions on Stack Overflow say that using EAV is not a good way.</p>
  <p>Every ad will have different categories and some categories will have further sub categories. SO the table AD will have different fields depending on its category. For example, an ad for used car will have MAKE, MANUFACTURER etc but an ad for books will have Book title field, Author field etc.</p>
  <p><code>1) How appropriate is it to use the Object Attribute-Value (EAV) pattern from projects?</code></p>
  <p><code>2) if I use EAV to create a dynamic model, how can I validate the values ​​of the Category properties. ?</code></p>
  <p>I use  mongodb database .</p>
  <p>I found the following link and looked for other information as well
  --&gt; <a href="https://vertabelo.com/blog/designing-an-online-classifieds-data-model" rel="nofollow noreferrer">https://vertabelo.com/blog/designing-an-online-classifieds-data-model</a></p>
  <p><strong>if anyone has experience with this problem please guide me !!!</strong></p>