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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T21:13:05+00:00 2026-05-13T21:13:05+00:00

I have a requirement to implement contact database. This contact database is special in

  • 0

I have a requirement to implement contact database. This contact database is special in a way that user should be able to dynamically (on runtime) add properties he/she wants to track about the contact. Some of these properties are of type string, other numbers and dates. Some of the properties have pre-defined values, others are free fields etc.. User wants to be also able to query such structure fast and easily. The database needs to handle easily 500 000 contacts each having around 10 properties.

It leads to dynamic property model having Contact class with dynamic properties.

class Contact{

private Map<DynamicProperty, Collection<DynamicValue> values> propertiesAndValues;

//other userfull methods

}

The question is how can I store such a structure in “some database” – it does not have to be RDBMS so that I can easily express queries such as

Get all contacts whose name starts with Martin, they are from Company of size 5000 or less, order by time when this contact was inserted in a database, only first 100 results (provide pagination), where each of these segments correspond to a dynamic property.

I need:

  • filtering – equal, partial equal, (bigger, smaller for integers, dates) and maybe aggregation – but it is not necessary at this point
  • sorting
  • pagination

I was considering RDBMS, but this leads more less to this structure which is quite hard to query and it tends to be slow for this amount of data

contact(id serial pk,....);

dynamic_property(dp_id serial pk, ...);

--only one of the values is not empty
dynamic_property_value(dpv_id serial pk, dynamic_property_fk int, value_integer int, date_value timestamp, text_value text);

contact_properties(pav_id serial pk, contact_id_fk int, dynamic_propert_fk int);

property_and_its_value(pav_id_fk int, dpv_id int);

I consider following options:

  • store contacts in RDBMS and use Lucene for querying – is there anything that would help with this?
  • Store dynamic properties as XML and store it to rdbms and use xpath support – unfortunatelly it seems to be pretty slow for 500000 contacts
  • use another database – Mango DB or Jackrabbit to store this information

Which way would you go and why?

  • 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-13T21:13:05+00:00Added an answer on May 13, 2026 at 9:13 pm

    Have you considered using Lucene for your querying needs? You could probably get away with just using Lucene and store all your data in the index. Although I wouldn’t recommend using Lucene as your only persistence store.

    Alternatively, you could use Lucene along with a RDBMS and take advantage of something like Compass.

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

Sidebar

Related Questions

I have a requirement to implement an Unsaved Changes prompt in an ASP .Net
I have a requirement to implement a single VB.NET instance of an application on
I have a requirement to implement IP camera's for my client's Organization(May be 5
I have a requirement to implement some kind of dictionary object. Something like MyDict<K,V1,
I have an requirement to implement a custom keyboard for a Cocoa Touch data
I know I'm gonna get down votes, but I have to make sure if
I have a table of phone numbers, storing the phone number as varchar(20). I
Here is the problem : our main class (say : Contract) change every year.
I am developing an application for schools in South Africa which is required to

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.